Class: Snackhack2::SSRF

Inherits:
Object
  • Object
show all
Defined in:
lib/snackhack2/ssrf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSSRF

Returns a new instance of SSRF.



9
10
11
# File 'lib/snackhack2/ssrf.rb', line 9

def initialize
  @site = site
end

Instance Attribute Details

#siteObject

Returns the value of attribute site.



7
8
9
# File 'lib/snackhack2/ssrf.rb', line 7

def site
  @site
end

Instance Method Details

#port_scanObject



12
13
# File 'lib/snackhack2/ssrf.rb', line 12

def port_scan
end

#ssrf_googleObject



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