Esempio n. 1
0
def main():
    print(START_STR)
    try:
        from core.parser import parse
        from core.controllers.controller import start

        args = parse()
        start(args)
    except Exception, e:
        print e
        import traceback
        traceback.print_exc()
        sys.exit(1)
Esempio n. 2
0
def main(args=None):
    print(START_STR)
    try:
        from core.parser import parse
        from core.controllers.controller import start

        args = parse()
        start(args)
    except Exception, e:
        print e
        import traceback
        traceback.print_exc()
        sys.exit(1)
Esempio n. 3
0
def start(path, log_level=logging.INFO, config_path=None):
    logging.basicConfig(format='%(asctime)s : %(levelname)s : %(filename)s : %(funcName)s() : %(message)s',
                        level=log_level)
    res = ctrl.start(path, config_path)
    res = filter(lambda vulns: vulns.reference, res)
    res = map(lambda e: _format(e.to_dict()), res)
    print json.dumps(res)
Esempio n. 4
0
def start(path, log_level=logging.INFO):
    logging.basicConfig(
        format=
        '%(asctime)s : %(levelname)s : %(filename)s : %(funcName)s() : %(message)s',
        level=log_level)
    res = ctrl.start(path)
    res = map(lambda e: e.to_dict(), res)
    return json.dumps(res)
Esempio n. 5
0
def main(args=None):
    """
    Main function of 3102 when running from command line.
    """

    try:
        setPaths(modulePath())

        banner()
        sys.path.insert(0, paths.THIRDPARTY_PATH)

        initOptions()
        start()
    except Exception, e:
        print e
        import traceback
        traceback.print_exc()
        sys.exit(1)
Esempio n. 6
0
def main(args=None):
    """
    Main function of 3102 when running from command line.
    """

    try:
        setPaths(modulePath())

        banner()
        sys.path.insert(0, paths.THIRDPARTY_PATH)

        initOptions()
        start()
    except Exception, e:
        print e
        import traceback
        traceback.print_exc()
        sys.exit(1)
Esempio n. 7
0
def main(args=None):
    """
    Main function of 3102 when running from command line.
    """

    try:
        paths.ROOT_PATH = modulePath()
        setPaths()

        banner()
        sys.path.insert(0, paths.THIRDPARTY_PATH)

        cmdLineOptions.update(parse().__dict__)
        initOptions(cmdLineOptions)
        start()
    except Exception, e:
        print e
        import traceback
        traceback.print_exc()
        sys.exit(1)
Esempio n. 8
0
        #     stderr=subprocess.STDOUT)
        # logs = []
        # # return_code=process.poll()
        # # while return_code is None:
        # #     line=process.stdout.readline()
        # #     line=line.strip()
        # #     logging.debug(line.replace('\n', '').replace('\r', ''))
        # #     logs.append(line)
        # #     return_code=process.poll()
        # #  for out_line in iter(process.stdout.readline, b''):
        #     #  logging.debug(out_line.replace('\n', '').replace('\r', ''))
        #     #  logs.append(out_line)
        # #  process.stdout.close()
        # process.wait()
        # with open(self.log_file, 'w') as f:
        #     f.writelines(logs)

        # os.system("{bin_path} -j 2 -d {plugin_path} {apk} > {log} 2>&1".format(bin_path=self.bin_path,
        #                                                     apk=self.apk_path,
        #                                                     plugin_path=self.plugin_task_path,
        #                                                     log=self.log_file))


if __name__ == '__main__':
    ctrl.start(
        r'D:\Store\document\all_my_work\CZY\ApkSec\test_apks\goatdroid.apk',
        skip_unpacker=True)
    jadx = Jadx()
    # print jadx.failed_files
    # print jadx.success_files(only_java=True)