예제 #1
0
def extract_asar():
    try:
        with Asar.open('./app.asar') as a:
            try:
                a.extract('./app')
            except FileExistsError:
                answer = input('asar already extracted, overwrite? (Y/n): ')

                if answer.lower().startswith('n'):
                    print('Exiting.')
                    return False

                shutil.rmtree('./app')
                a.extract('./app')

        shutil.move('./app.asar', './original_app.asar')
    except FileNotFoundError as e:
        print('WARNING: app.asar not found')
    return True
예제 #2
0
def extract_asar():
    try:
        with Asar.open("./core.asar") as a:
            try:
                a.extract("./core")
            except FileExistsError:
                answer = input("asar already extracted, overwrite? (Y/n): ")

                if answer.lower().startswith("n"):
                    print("Exiting.")
                    return False

                shutil.rmtree("./core")
                a.extract("./core")

        shutil.move("./core.asar", "./original_core.asar")
    except FileNotFoundError as e:
        print("WARNING: app.asar not found")

    return True