diff --git a/SharPyShell.py b/SharPyShell.py index e2bfc01..25ff9ae 100755 --- a/SharPyShell.py +++ b/SharPyShell.py @@ -153,11 +153,14 @@ if __name__ == '__main__': create_interact_parser(subparsers) args = parser.parse_args() - if args.mode == 'generate': - generate_obj = Generate(args.password, args.encryption, args.obfuscator, args.endian_type, args.output) - generate_obj.generate() + if args.__contains__('mode'): + if args.mode == 'generate': + generate_obj = Generate(args.password, args.encryption, args.obfuscator, args.endian_type, args.output) + generate_obj.generate() - if args.mode == 'interact': - prompt = SharPyShellPrompt(args.password, args.encryption, args.default_shell, args.url, - args.user_agent, args.cookies, args.custom_header, args.insecure, args.proxy) - prompt.cmdloop('\n') + if args.mode == 'interact': + prompt = SharPyShellPrompt(args.password, args.encryption, args.default_shell, args.url, + args.user_agent, args.cookies, args.custom_header, args.insecure, args.proxy) + prompt.cmdloop('\n') + else: + parser.print_help()