def main(): # # Scanner # if sys.argv[1].lower() == "-scan" and sys.argv[2].lower() == "-uac": scanner(uac=True, persist=False).start() elif sys.argv[1].lower() == "-scan" and sys.argv[2].lower() == "-persist": scanner(uac=False, persist=True).start() # # UAC bypass # elif sys.argv[1].lower() == "-use" and sys.argv[2].lower() == "-uac": function(uac=True, persist=False).run(id=sys.argv[3], payload=sys.argv[4]) # # Persistence # elif sys.argv[1].lower() == "-use" and sys.argv[2].lower( ) == "-persist" and sys.argv[3].lower() == "-add": function(uac=False, persist=True).run(id=sys.argv[4], payload=sys.argv[5], add=True) elif sys.argv[1].lower() == "-use" and sys.argv[2].lower( ) == "-persist" and sys.argv[3].lower() == "-remove": function(uac=False, persist=True).run(id=sys.argv[4], payload=sys.argv[5], add=False)
def main(): try: if sys.argv[1].lower() == "-scan": scanner().start() elif sys.argv[1].lower() == "-use": function().run(sys.argv[2], sys.argv[3]) else: pass except Exception as error: pass
def main(): scan_cmds = ["uac", "persist", "elevate"] parser = argparse.ArgumentParser() parser.add_argument("-s", "--scan", nargs="+", required=False, help="Scan for either uac, persist or elevate method") parser.add_argument("-u", "--use", nargs="+", required=False, help="Use either uac, persist or elevate method") parser.add_argument("-i", "--id", nargs="+", required=False, help="Id of method") parser.add_argument("-p", "--payload", nargs="+", required=False, help="Full path to payload, can include params") parser.add_argument("-r", "--remove", action="store_true", required=False, help="Removes installed persistence") args = parser.parse_args() if args.scan: if not all([_ in scan_cmds for _ in args.scan]): parser.print_help() scanner(**{scan_cmds[_]: scan_cmds[_] in args.scan for _ in range(3)}).start() if args.use and args.id: if not all([_ in scan_cmds for _ in args.use]): parser.print_help() if scan_cmds[0] in args.use and args.payload: function(uac=True, persist=False, elevate=False).run(id=args.id[0], payload=args.payload) if scan_cmds[1] in args.use: function(uac=False, persist=True, elevate=False).run(id=args.id[0], payload=args.payload, add=(False if args.remove else True)) if scan_cmds[2] in args.use and args.payload: function(uac=False, persist=False, elevate=True).run(id=args.id[0], payload=args.payload)
def main(): scan_cmds = ["uac", "persist", "elevate", "execute"] parser = argparse.ArgumentParser() parser.add_argument("-s", "--scan", nargs="+", required=False) parser.add_argument("-u", "--use", nargs="+", required=False) parser.add_argument("-i", "--id", nargs="+", required=False) parser.add_argument("-p", "--payload", nargs="+", required=False) parser.add_argument("-a", "--add", action="store_true", required=False) parser.add_argument("-r", "--remove", action="store_true", required=False) args = parser.parse_args() if args.scan: if scan_cmds[0] in args.scan: scanner(uac=True, persist=False, elevate=False, execute=False).start() elif scan_cmds[1] in args.scan: scanner(uac=False, persist=True, elevate=False, execute=False).start() elif scan_cmds[2] in args.scan: scanner(uac=False, persist=False, elevate=True, execute=False).start() elif scan_cmds[3] in args.scan: scanner(uac=False, persist=False, elevate=False, execute=True).start() else: parser.print_help() if args.use: if scan_cmds[0] in args.use: if args.id: if args.payload: function(uac=True, persist=False, elevate=False, execute=False).run(id=args.id[0], payload=args.payload[0]) elif scan_cmds[1] in args.use: if args.add: function(uac=False, persist=True, elevate=False, execute=False).run(id=args.id[0], payload=args.payload[0], add=True) elif args.remove: function(uac=False, persist=True, elevate=False, execute=False).run(id=args.id[0], payload=args.payload[0], add=False) elif scan_cmds[2] in args.use: if args.id: if args.payload: function(uac=False, persist=False, elevate=True, execute=False).run(id=args.id[0], payload=args.payload[0]) elif scan_cmds[3] in args.use: if args.id: if args.payload: function(uac=False, persist=False, elevate=False, execute=True).run(id=args.id[0], payload=args.payload[0]) else: parser.print_help()
def main(): scan_cmds = ["uac", "persist", "elevate", "execute"] parser = argparse.ArgumentParser() parser.add_argument("-s", "--scan", nargs="+", required=False) parser.add_argument("-u", "--use", nargs="+", required=False) parser.add_argument("-i", "--id", nargs="+", required=False) parser.add_argument("-p", "--payload", nargs="+", required=False) parser.add_argument("-r", "--remove", action="store_true", required=False) args = parser.parse_args() if args.scan: if not all([_ in scan_cmds for _ in args.scan]): parser.print_help() scanner(**{scan_cmds[_]: scan_cmds[_] in args.scan for _ in range(4)}).start() if args.use and args.id: if not all([_ in scan_cmds for _ in args.scan]): parser.print_help() if scan_cmds[0] in args.use and args.payload: function(uac=True, persist=False, elevate=False, execute=False).run(id=args.id[0], payload=args.payload[0]) if scan_cmds[1] in args.use: function(uac=False, persist=True, elevate=False, execute=False).run(id=args.id[0], payload=args.payload[0], add=(False if args.remove else True)) if scan_cmds[2] in args.use and args.payload: function(uac=False, persist=False, elevate=True, execute=False).run(id=args.id[0], payload=args.payload[0]) if scan_cmds[3] in args.use and args.payload: function(uac=False, persist=False, elevate=False, execute=True).run(id=args.id[0], payload=args.payload[0])