options = {} if args.c: options['required_options'] = {} for option in args.c: name, value = option.split("=") options['required_options'][name] = [value, ""] # pull out any msfvenom payloads/options if args.msfpayload: if args.msfoptions: options['msfvenom'] = [args.msfpayload, args.msfoptions] else: options['msfvenom'] = [args.msfpayload, None] # manually set the payload controller.SetPayload(args.l, args.p, options) # generate the payload code code = controller.GeneratePayload() # write out the payload code to the proper output file outName = controller.OutputMenu(controller.payload, code, showTitle=False, interactive=False, OutputBaseChoice=args.o) # Catch ctrl + c interrupts from the user except KeyboardInterrupt: print "\n[!] Exiting...\n"
for option in args.c: name, value = option.split("=") options['required_options'][name] = [value, ""] # pull out any msfvenom shellcode specification and msfvenom options if args.msfpayload: if args.msfoptions: options['msfvenom'] = [args.msfpayload, args.msfoptions] else: options['msfvenom'] = [args.msfpayload, None] # manually set the payload in the controller object controller.SetPayload(args.p, options) # generate the payload code code = controller.GeneratePayload() # write out the payload code to the proper output file outName = controller.OutputMenu(controller.payload, code, showTitle=False, interactive=False, args=args) # Catch ctrl + c interrupts from the user except KeyboardInterrupt: print helpers.color("\n\n [!] Exiting...\n", warning=True) except EOFError: print helpers.color("\n\n [!] Exiting...\n", warning=True)