Skip to content

Instantly share code, notes, and snippets.

@nuke99
Created June 13, 2012 07:00
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 nuke99/cad947b654efd9c687a0 to your computer and use it in GitHub Desktop.
Save nuke99/cad947b654efd9c687a0 to your computer and use it in GitHub Desktop.
require 'socket'
host = 'http://192.168.1.102/attack/'
port = 80
s = TCPSocket.open host, port
s.puts "GET / HTTP/1.1\r\n"
s.puts "Host: Firefox"
s.puts "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
s.puts "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"
s.puts "\r\n"
while line = s.gets
puts line.chop
end
s.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment