From f9971648da88be6c2927e2d0e21c77b1ac977226 Mon Sep 17 00:00:00 2001 From: n1nj4sec Date: Fri, 30 Oct 2015 22:23:03 +0100 Subject: [PATCH] preventing errors on pupygen --- pupy/pupygen.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pupy/pupygen.py b/pupy/pupygen.py index af0200c2..0a021f1b 100755 --- a/pupy/pupygen.py +++ b/pupy/pupygen.py @@ -6,6 +6,7 @@ import argparse import sys import os.path +import re from pupylib.utils.network import get_local_ip from network.conf import transports @@ -61,7 +62,10 @@ if __name__=="__main__": myhost=myip else: myhost=args.host[0] - + if re.match("^.*:[0-9]+$", myhost):#auto fixing errors when entering host:port + myhost, p=myhost.rsplit(':',1) + if args.port==443: + args.port=p outpath=None if args.type=="exe_x86": binary=get_edit_pupyx86_exe(myhost, args.port, args.transport)