From b8faa78da1fece75fa84fcf1fea86bdb318c3d3a Mon Sep 17 00:00:00 2001 From: Oleksii Shevchuk Date: Mon, 27 May 2019 10:35:40 +0300 Subject: [PATCH] pupyge/.NET_oneliner - fix (?) case with non-connect payloads --- pupy/pupygen.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pupy/pupygen.py b/pupy/pupygen.py index d633169c..f6e5b8bb 100755 --- a/pupy/pupygen.py +++ b/pupy/pupygen.py @@ -757,8 +757,13 @@ def pupygen(args, config, pupsrv, display): raise NoOutput() elif args.format == '.NET_oneliner': - i = conf['launcher_args'].index('--host')+1 - link_ip, _ = conf['launcher_args'][i].split(':',1) + link_ip = None + try: + i = conf['launcher_args'].index('--host')+1 + link_ip, _ = conf['launcher_args'][i].split(':',1) + except ValueError: + pass + rawdll = generate_binary_from_template( display, conf, 'windows', arch=args.arch, shared=True, debug=args.debug)[0]