def __cli_report_pdf(args): filename = args.output if args.output else f'report_{args.hash}.pdf' mobsf = MobSF(args.apikey, args.server) result = mobsf.report_pdf(args.hash, pdfname=filename) print(f'Wrote report to {result}')
def __cli_scan(args): mobsf = MobSF(args.apikey, args.server) result = mobsf.scan(args.scantype, args.filename, args.hash, rescan=args.rescan) print(result)
def __cli_report_json(args): mobsf = MobSF(args.apikey, args.server) result = mobsf.report_json(args.hash) if args.output: if args.output is True: filename = f'report_{args.hash}.json' else: filename = args.output with open(filename, 'w') as f: json.dump(result, f, indent=4) else: print(json.dumps(result, indent=4))
def __cli_delete(args): mobsf = MobSF(args.apikey, args.server) result = mobsf.delete_scan(args.hash) print(result)
def __cli_view_source(args): mobsf = MobSF(args.apikey, args.server) result = mobsf.scan(args.scantype, args.filename, args.hash) print(result)
def __cli_scans(args): mobsf = MobSF(args.apikey, args.server) result = mobsf.scans(args.page, args.pagesize) print(result)
def __cli_upload(args): mobsf = MobSF(args.apikey, args.server) result = mobsf.upload(args.file) print(result)