From 1d7bcbf21863a16fdd54e8c38e1a6ad51a154b02 Mon Sep 17 00:00:00 2001 From: acevest Date: Sun, 20 Sep 2015 01:10:22 +0800 Subject: [PATCH] ... --- tools/hack/ant.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/hack/ant.py b/tools/hack/ant.py index d9a203a..d017094 100755 --- a/tools/hack/ant.py +++ b/tools/hack/ant.py @@ -46,7 +46,8 @@ def ClientEntry() : cs.send(data) elif fd == cs : rsp = DoRecv(cs) - print rsp + sys.stdout.write(rsp) + sys.stdout.flush() except Exception, e : print('[*] Exception! Exiting. {0}'.format(str(e))) @@ -57,14 +58,13 @@ def ExecuteCommand(cmd) : try : output = subprocess.check_output(cmd.strip(), stderr=subprocess.STDOUT, shell=True) except Exception, e: - output = 'Failed to execute command. {0}'.format(str(e)) + output = 'Failed to execute command. {0}\n'.format(str(e)) return output def ClientHandler(cs, ca) : global gArgs while True : if gArgs.shell : - print "SendShell" cs.send("") rs, _, _ = select.select([cs, sys.stdin], [], []) for fd in rs : -- 2.44.0