Class: Snackhack2::SSRF
- Inherits:
-
Object
- Object
- Snackhack2::SSRF
- Defined in:
- lib/snackhack2/ssrf.rb
Instance Attribute Summary collapse
-
#site ⇒ Object
Returns the value of attribute site.
Instance Method Summary collapse
-
#initialize ⇒ SSRF
constructor
A new instance of SSRF.
- #ssrf ⇒ Object
Constructor Details
#initialize ⇒ SSRF
Returns a new instance of SSRF.
8 9 10 |
# File 'lib/snackhack2/ssrf.rb', line 8 def initialize @site = site end |
Instance Attribute Details
#site ⇒ Object
Returns the value of attribute site.
7 8 9 |
# File 'lib/snackhack2/ssrf.rb', line 7 def site @site end |
Instance Method Details
#ssrf ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/snackhack2/ssrf.rb', line 11 def ssrf url = @site.gsub("SSRF", "http://google.com") ht = HTTParty.get(url) if ht.body.include?("Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.") puts "Boom Shaka. It's vulnerable to SSRF..." end end |