示例#1
0
    def do_decompile(args):
        """
        Description: Decompile target APK with apktool.jar

        Requirements: Target APK

        Usage: decompile <name_of_output_directory> && </path/to/apk>
        """
        try:
            from framework.brains.apk.decompile import Decompile
            if args[0] and args[1]:
                decompile = Decompile(args.split()[0], args.split()[1])
                decompile.run_decompile()
            else:
                print(
                    t.red("[{0}] ".format(datetime.now()) +
                          t.white(enum.ARGUMENTS)))
        except Exception as e:
            if e.message == enum.STRING_INDEX_ERROR or e.message == enum.LIST_INDEX_ERROR:
                print(
                    t.red("[{0}] ".format(datetime.now()) +
                          t.white(enum.ARGUMENTS)))
                print(
                    t.red("[{0}] ".format(datetime.now()) +
                          t.white(enum.DECOMPILE_USAGE)))
        except ImportError as e:
            print(
                t.red("[{0}] ".format(datetime.now()) +
                      t.white(enum.IMPORT_ERROR_DECOMPILE)))
            Logger.run_logger(e.message)
示例#2
0
    def do_decompile(args):

        """
        Description: Decompile target APK with apktool.jar

        Requirements: Target APK

        Usage: decompile <name_of_output_directory> && </path/to/apk>
        """

        try:
            from framework.brains.apk.decompile import Decompile
            decompile = Decompile(args.split()[0], args.split()[1])
            decompile.run_decompile()
        except ImportError as e:
            print(t.red("[{0}] ".format(datetime.now()) + "Unable to import Decompile"))
            Logger.run_logger(e.message)
示例#3
0
文件: cmd.py 项目: hiw0rld/lobotomy
    def do_decompile(args):
        """
        Description: Decompile target APK with apktool.jar

        Requirements: Target APK

        Usage: decompile <name_of_output_directory> && </path/to/apk>
        """
        try:
            from framework.brains.apk.decompile import Decompile

            if args[0] and args[1]:
                decompile = Decompile(args.split()[0], args.split()[1])
                decompile.run_decompile()
            else:
                print(t.red("[{0}] ".format(datetime.now()) + t.white(enum.ARGUMENTS)))
        except Exception as e:
            if e.message == enum.STRING_INDEX_ERROR or e.message == enum.LIST_INDEX_ERROR:
                print(t.red("[{0}] ".format(datetime.now()) + t.white(enum.ARGUMENTS)))
                print(t.red("[{0}] ".format(datetime.now()) + t.white(enum.DECOMPILE_USAGE)))
        except ImportError as e:
            print(t.red("[{0}] ".format(datetime.now()) + t.white(enum.IMPORT_ERROR_DECOMPILE)))
            Logger.run_logger(e.message)