From c2224a6b491d9d2c7e4a7ab362fbc29be4f844ba Mon Sep 17 00:00:00 2001 From: Emilio Pinna Date: Fri, 28 Sep 2018 17:57:23 +0100 Subject: [PATCH] Add easy_install file-write --- _gtfobins/easy_install.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/_gtfobins/easy_install.md b/_gtfobins/easy_install.md index 7241849..3f10577 100644 --- a/_gtfobins/easy_install.md +++ b/_gtfobins/easy_install.md @@ -36,6 +36,13 @@ functions: else: import SimpleHTTPServer as s, SocketServer as ss ss.TCPServer(("", int(e["LPORT"])), s.SimpleHTTPRequestHandler).serve_forever()' > $TF/setup.py easy_install $TF + file-write: + - description: It needs an absolute local file path. + code: | + TF=$(mktemp -d) + echo "import os; + os.execl('$(whereis python)', 'python', '-c', 'open(\"/tmp/file_to_write\",\"w+\").write(\"DATA\")')" > $TF/setup.py + easy_install $TF file-read: - description: The read file content is wrapped within program messages. code: |