Module: Ronin::Web::Dorks
Included Modules
GScraper
Public Visibility
Public Class Method Summary
| all_strings_intext(strings, options = {}, &block) | |
|---|---|
| all_strings_intitle(strings, options = {}, &block) | |
| all_strings_inurl(strings, options = {}, &block) | |
| allintext(pattern, options = {}, &block) | |
| allintitle(patterns, options = {}, &block) | |
| allinurl(patterns, options = {}, &block) | |
| cps(options = {}, &block) | |
| download_file(options = {}, &block) | |
| download_pdf(options = {}, &block) | |
| emails_xls(options = {}, &block) | |
| index_for_finances_xls(options = {}, &block) | |
| index_of(path = nil, options = {}, &block) | |
| index_of_cgi_bin(options = {}, &block) | |
| index_with_file(name, options = {}, &block) | |
| index_with_sql(options = {}, &block) | |
| intext(pattern, options = {}, &block) | |
| intitle(pattern, options = {}, &block) | |
| inurl(pattern, options = {}, &block) | |
| php_my_admin(options = {}, &block) | |
| qbw(options = {}, &block) | |
| receipts(options = {}, &block) | |
| robots_txt(options = {}, &block) | |
| search(options = {}, &block) |
Creates either a GScraper::Search::WebQuery or a. |
| sharepoint(options = {}, &block) | |
| sql_admin_dump(options = {}, &block) | |
| sql_dump(options = {}, &block) | |
| string_intext(string, options = {}, &block) | |
| string_intitle(string, options = {}, &block) | |
| string_inurl(string, options = {}, &block) | |
| vuln_report(options = {}, &block) |
Public Class Method Details
all_strings_intext
public
all_strings_intext(strings, options = {}, &block)
[View source]
120 121 122 123 124 |
# File 'lib/ronin/web/dorks/dorks.rb', line 120 def Dorks.all_strings_intext(strings,={},&block) Dorks.search(.merge(:allintext => strings.map { |string| "'#{string}'" }),&block) end |
all_strings_intitle
public
all_strings_intitle(strings, options = {}, &block)
[View source]
138 139 140 141 142 |
# File 'lib/ronin/web/dorks/dorks.rb', line 138 def Dorks.all_strings_intitle(strings,={},&block) Dorks.search(.merge(:allintitle => strings.map { |string| "'#{string}'" }),&block) end |
all_strings_inurl
public
all_strings_inurl(strings, options = {}, &block)
[View source]
156 157 158 159 160 |
# File 'lib/ronin/web/dorks/dorks.rb', line 156 def Dorks.all_strings_inurl(strings,={},&block) Dorks.search(.merge(:allinurl => strings.map { |string| "'#{string}'" }),&block) end |
allintext
public
allintext(pattern, options = {}, &block)
[View source]
112 113 114 |
# File 'lib/ronin/web/dorks/dorks.rb', line 112 def Dorks.allintext(pattern,={},&block) Dorks.search(.merge(:allintext => pattern),&block) end |
allintitle
public
allintitle(patterns, options = {}, &block)
[View source]
134 135 136 |
# File 'lib/ronin/web/dorks/dorks.rb', line 134 def Dorks.allintitle(patterns,={},&block) Dorks.search(.merge(:allintitle => patterns),&block) end |
allinurl
public
allinurl(patterns, options = {}, &block)
[View source]
152 153 154 |
# File 'lib/ronin/web/dorks/dorks.rb', line 152 def Dorks.allinurl(patterns,={},&block) Dorks.search(.merge(:allinurl => patterns),&block) end |
cps
public
cps(options = {}, &block)
[View source]
27 28 29 30 31 32 |
# File 'lib/ronin/web/dorks/documents.rb', line 27 def Dorks.cps(={},&block) Dorks.search(.merge( :exact_phrase => 'Certificate Practice Statement', :inurl => '(PDF | DOC)' ),&block) end |
download_file
public
download_file(options = {}, &block)
[View source]
202 203 204 205 206 |
# File 'lib/ronin/web/dorks/dorks.rb', line 202 def Dorks.download_file(={},&block) Dorks.search(.merge( :allinurl => ['download.php?', 'file'] ),&block) end |
download_pdf
public
download_pdf(options = {}, &block)
[View source]
208 209 210 211 212 213 214 215 216 |
# File 'lib/ronin/web/dorks/dorks.rb', line 208 def Dorks.download_pdf(={},&block) Dorks.search(.merge( :allinurl => [ 'download.php?', 'file', '.pdf' ] ),&block) end |
emails_xls
public
emails_xls(options = {}, &block)
[View source]
55 56 57 58 59 60 |
# File 'lib/ronin/web/dorks/documents.rb', line 55 def Dorks.emails_xls(={},&block) Dorks.search(.merge( :filetype => 'xls', :inurl => '"email.xls"' ),&block) end |
index_for_finances_xls
public
index_for_finances_xls(options = {}, &block)
[View source]
49 50 51 52 53 54 |
# File 'lib/ronin/web/dorks/index.rb', line 49 def Dorks.index_for_finances_xls(={},&block) Dorks.search(.merge( :query => 'finances.xls', :intitle => '"Index of"' ),&block) end |
index_of
public
index_of(path = nil, options = {}, &block)
[View source]
27 28 29 30 31 32 33 34 35 |
# File 'lib/ronin/web/dorks/index.rb', line 27 def Dorks.index_of(path=nil,={},&block) if path = .merge(:intitle => "\"Index of #{path}\"") else = .merge(:intitle => '"Index of"') end return Dorks.search(,&block) end |
index_of_cgi_bin
public
index_of_cgi_bin(options = {}, &block)
[View source]
37 38 39 |
# File 'lib/ronin/web/dorks/index.rb', line 37 def Dorks.index_of_cgi_bin(={},&block) Dorks.index_of('/cgi-bin',&block) end |
index_with_file
public
index_with_file(name, options = {}, &block)
[View source]
41 42 43 |
# File 'lib/ronin/web/dorks/index.rb', line 41 def Dorks.index_with_file(name,={},&block) Dorks.index_of(.merge(:intext => "\"#{name}\""),&block) end |
index_with_sql
public
index_with_sql(options = {}, &block)
[View source]
45 46 47 |
# File 'lib/ronin/web/dorks/index.rb', line 45 def Dorks.index_with_sql(={},&block) Dorks.index_of(.merge(:intext => '".sql"'),&block) end |
intext
public
intext(pattern, options = {}, &block)
[View source]
108 109 110 |
# File 'lib/ronin/web/dorks/dorks.rb', line 108 def Dorks.intext(pattern,={},&block) Dorks.search(.merge(:intext => pattern),&block) end |
intitle
public
intitle(pattern, options = {}, &block)
[View source]
126 127 128 |
# File 'lib/ronin/web/dorks/dorks.rb', line 126 def Dorks.intitle(pattern,={},&block) Dorks.search(.merge(:intitle => pattern),&block) end |
inurl
public
inurl(pattern, options = {}, &block)
[View source]
144 145 146 |
# File 'lib/ronin/web/dorks/dorks.rb', line 144 def Dorks.inurl(pattern,={},&block) Dorks.search(.merge(:inurl => pattern),&block) end |
php_my_admin
public
php_my_admin(options = {}, &block)
[View source]
194 195 196 197 198 199 200 |
# File 'lib/ronin/web/dorks/dorks.rb', line 194 def Dorks.php_my_admin(={},&block) Dorks.search(.merge( :with_words => ['phpMyAdmin'], :exact_phrase => 'running on', :inurl => 'main.php' ),&block) end |
qbw
public
qbw(options = {}, &block)
[View source]
48 49 50 51 52 53 |
# File 'lib/ronin/web/dorks/documents.rb', line 48 def Dorks.qbw(={},&block) Dorks.search(.merge( :query => 'qbw', :filetype => 'QBW' ),&block) end |
receipts
public
receipts(options = {}, &block)
[View source]
40 41 42 43 44 45 46 |
# File 'lib/ronin/web/dorks/documents.rb', line 40 def Dorks.receipts(={},&block) Dorks.search(.merge( :exact_phrase => 'Thank you for your order', :with_words => ['receipt'], :filetype => :pdf ),&block) end |
robots_txt
public
robots_txt(options = {}, &block)
[View source]
186 187 188 189 190 191 192 |
# File 'lib/ronin/web/dorks/dorks.rb', line 186 def Dorks.robots_txt(={},&block) Dorks.search(.merge( :exact_phrase => 'robots.txt', :with_words => ['Disallow'], :filetype => :txt ),&block) end |
search
public
search(options = {}, &block)
Creates either a GScraper::Search::WebQuery or a GScraper::Search::AJAXQuery with the given options. If a block is given, it will be passed the newly created query object.
options may contain the following keys:
| :ajax: | Specifies wether or not to create a GScraper::Search::AJAXQuery. |
| :query: | The search query. |
| :link: | Search for results which link to the specified URI. |
| :related: | Search for results which relate to the specified URI. |
| :info: | Return information about the specified URI. |
| :site: | Limit results to the specified site. |
| :filetype: | Limit results to those with the specified file-type. |
| :allintitle: | Search for results with all of the keywords appearing in the title. |
| :intitle: | Search for results with the keyword appearing in the title. |
| :allintext: | Search for results with all of the keywords appearing in the text. |
| :intext: | Search for results with the keyword appearing in the text. |
| :allinanchor: | Search for results with all of the keywords appearing in the text of links. |
| :inanchor: | Search for results with the keyword appearing in the text of links. |
| :exact_phrase: | Search for results containing the specified exact phrase. |
| :with_words: | Search for results containing all of the specified words. |
| :without_words: | Search for results not containing any of the specified words. |
| :numeric_range: | Search for results contain numbers that fall within the specified Range. |
| :define: | Search for results containing the definition of the specified keyword. |
If the :ajax option is not specified, then options may contain the following additional keys:
| :results_per_page: | Specifies the number of results for each page. |
| :language: | Search for results in the specified language. |
| :region: | Search for results from the specified region. |
| :within_past_day: | Search for results that were created within the past day. |
| :within_past_week: | Search for results that were created within the past week. |
| :within_past_month: | Search for results that were created within the past month. |
| :within_past_year: | Search for results that were created within the past year. |
:occurrs_within::
| :rights: | Search for results licensed under the specified license. |
| :filtered: | Specifies whether or not to use SafeSearch. Defaults to false, if not specified. |
If the :ajax option is specified, then options may contain the following additional keys:
| :language: | The search language. Defaults to :en. |
| :sig: | The search signature. Defaults to 582c1116317355adf613a6a843f19ece. |
| :key: | The search key. Defaults to :notsupplied. |
| :version: | The desired API version. Defaults to 1.0. |
[View source]
100 101 102 103 104 105 106 |
# File 'lib/ronin/web/dorks/dorks.rb', line 100 def Dorks.search(={},&block) if [:ajax] == true return Search.ajax_query(,&block) else return Search.query(,&block) end end |
sharepoint
sql_admin_dump
public
sql_admin_dump(options = {}, &block)
[View source]
182 183 184 |
# File 'lib/ronin/web/dorks/dorks.rb', line 182 def Dorks.sql_admin_dump(={},&block) Dorks.sql_dump(.merge(:password => 'admin'),&block) end |
sql_dump
public
sql_dump(options = {}, &block)
[View source]
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/ronin/web/dorks/dorks.rb', line 162 def Dorks.sql_dump(={},&block) query = [] query << "Host: #{options[:host]}" if [:host] query << "Database: #{options[:database]}" if [:database] query << [:version] if [:version] query << "\"#{options[:sql]}\"" if [:sql] if [:password] query << Digest::MD5.hexdigest([:password].to_s) end return Dorks.search(.merge( :query => query, :exact_phrase => '"SQL Dump"', :filetype => :sql ),&block) end |
string_intext
public
string_intext(string, options = {}, &block)
[View source]
116 117 118 |
# File 'lib/ronin/web/dorks/dorks.rb', line 116 def Dorks.string_intext(string,={},&block) Dorks.intext("'#{string}'",,&block) end |
string_intitle
public
string_intitle(string, options = {}, &block)
[View source]
130 131 132 |
# File 'lib/ronin/web/dorks/dorks.rb', line 130 def Dorks.string_intitle(string,={},&block) Dorks.intitle("'#{string}'",,&block) end |
string_inurl
public
string_inurl(string, options = {}, &block)
[View source]
148 149 150 |
# File 'lib/ronin/web/dorks/dorks.rb', line 148 def Dorks.string_inurl(string,={},&block) Dorks.inurl("'#{string}'",,&block) end |
vuln_report
public
vuln_report(options = {}, &block)
[View source]
34 35 36 37 38 |
# File 'lib/ronin/web/dorks/documents.rb', line 34 def Dorks.vuln_report(={},&block) Dorks.search(.merge( :exact_phrase => 'Network Vulnerability Assessment' ),&block) end |