Advertisement
hamzakiller21

var test vul !? xD

Dec 9th, 2014
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.73 KB | None | 0 0
  1. #!/user/bin/ruby
  2. require 'net/http'
  3. require 'uri'
  4. require 'open-uri'
  5. # hamza-xDz
  6. # lol devlope it
  7. def ent_url(url)
  8. return URI.parse(url)
  9. end
  10.  
  11. def post(dzs,input)
  12. urls=URI.parse(dzs)
  13. http = Net::HTTP.new(urls.host, 80)
  14. posts="#{input}=<script>alert(1)</script>"
  15. resp, data = http.get(urls.path, nil)
  16. dz, data  = http.post(urls.path, posts)
  17. if (dz.body.scan(/<script>alert(1)<\/script>/i))
  18. puts"[+] Found xss ->#{dzs} \npost:#{posts}\n"
  19. end
  20. end
  21.  
  22. def sourc_d(uri)
  23. begin
  24. f = open(uri)
  25. xd=f.readlines.join
  26. return xd
  27. rescue
  28. puts "#{uri} -> Error Cant Connect!?\n "
  29. end
  30. end
  31.  
  32. for inou in sourc_d('http://127.0.0.1/test.php').scan(/name='(.*?)'/)
  33. for x in inou
  34.  post('http://127.0.0.1/test.php',x.chomp)
  35.  
  36. end
  37.  
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement