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.
- #port_scan ⇒ Object
- #ssrf_google ⇒ Object
Constructor Details
#initialize ⇒ SSRF
Returns a new instance of SSRF.
9 10 11 |
# File 'lib/snackhack2/ssrf.rb', line 9 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
#port_scan ⇒ Object
12 13 |
# File 'lib/snackhack2/ssrf.rb', line 12 def port_scan end |
#ssrf_google ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/snackhack2/ssrf.rb', line 14 def ssrf_google 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 |