ronin-dorks 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt ADDED
@@ -0,0 +1,18 @@
1
+ === 0.1.0 / 2008-08-21
2
+
3
+ * Initial release.
4
+ * Provides convenience methods for many common Google (tm) Dorks:
5
+ * Search for URLs containing a specified string:
6
+ * Search for URLs containing a specified pattern:
7
+ * Search for Indexes of unprotected <tt>cgi-bin</tt> directories.
8
+ * Search for unprotected MySQL dump files.
9
+ * Search for unprotected MySQL dump files containing the password hash
10
+ 'admin'.
11
+ * Search for Certificate Practice Statement documents.
12
+ * Search for Network Vulnerability Assessemnt reports.
13
+ * Search for order receipts.
14
+ * Search for <tt>robots.txt</tt> files.
15
+ * Search for unprotected PHP MyAdmin panels.
16
+ * Search for <tt>emails.xls</tt> files.
17
+ * Search for <tt>finances.xls</tt> files.
18
+
data/Manifest.txt ADDED
@@ -0,0 +1,8 @@
1
+ History.txt
2
+ Manifest.txt
3
+ README.txt
4
+ Rakefile
5
+ lib/ronin/dorks.rb
6
+ lib/ronin/dorks/version.rb
7
+ lib/ronin/web/dorks.rb
8
+ test/test_ronin_dorks.rb
data/README.txt ADDED
@@ -0,0 +1,87 @@
1
+ = Ronin Dorks
2
+
3
+ * http://ronin.rubyforge.org/dorks/
4
+ * Postmodern Modulus III
5
+
6
+ == DESCRIPTION:
7
+
8
+ Ronin Dorks is a Ruby library for Ronin that provides support for various
9
+ Google (tm) Dorks functionality.
10
+
11
+ Ronin is a Ruby platform designed for information security and data
12
+ exploration tasks. Ronin allows for the rapid development and distribution
13
+ of code over many of the common Source-Code-Management (SCM) systems.
14
+
15
+ === Free
16
+
17
+ All source code within Ronin is licensed under the GPL-2, therefore no user
18
+ will ever have to pay for Ronin or updates to Ronin. Not only is the
19
+ source code free, the Ronin project will not sell enterprise grade security
20
+ snake-oil solutions, give private training classes or later turn Ronin into
21
+ commercial software.
22
+
23
+ === Modular
24
+
25
+ Ronin was not designed as one monolithic library but instead as a collection
26
+ of libraries which can be individually installed. This allows users to pick
27
+ and choose what functionality they want in Ronin.
28
+
29
+ === Decentralized
30
+
31
+ Ronin does not have a central repository of exploits and payloads which
32
+ all developers contribute to. Instead Ronin has Overlays, repositories of
33
+ code that can be hosted on any CVS/SVN/Git/Rsync server. Users can then use
34
+ Ronin to quickly install or update Overlays. This allows developers and
35
+ users to form their own communities, independent of the main developers
36
+ of Ronin.
37
+
38
+ == FEATURES/PROBLEMS:
39
+
40
+ * Provides convenience methods for many common Google (tm) Dorks:
41
+ * Search for URLs containing a specified string:
42
+ * Search for URLs containing a specified pattern:
43
+ * Search for Indexes of unprotected <tt>cgi-bin</tt> directories.
44
+ * Search for unprotected MySQL dump files.
45
+ * Search for unprotected MySQL dump files containing the password hash
46
+ 'admin'.
47
+ * Search for Certificate Practice Statement documents.
48
+ * Search for Network Vulnerability Assessemnt reports.
49
+ * Search for order receipts.
50
+ * Search for <tt>robots.txt</tt> files.
51
+ * Search for unprotected PHP MyAdmin panels.
52
+ * Search for <tt>emails.xls</tt> files.
53
+ * Search for <tt>finances.xls</tt> files.
54
+
55
+ == SYNOPSIS:
56
+
57
+ $ ronin dorks
58
+
59
+ == REQUIREMENTS:
60
+
61
+ * Ronin >= 0.0.9
62
+ * GScraper >= 0.2.0
63
+
64
+ == INSTALL:
65
+
66
+ $ sudo gem install ronin-dorks
67
+
68
+ == LICENSE:
69
+
70
+ Ronin SQL - A Ruby library for Ronin that provides support for various
71
+ Google (tm) Dorks and Hacking functionality.
72
+
73
+ Copyright (c) 2008 Hal Brodigan (postmodern.mod3 at gmail.com)
74
+
75
+ This program is free software; you can redistribute it and/or modify
76
+ it under the terms of the GNU General Public License as published by
77
+ the Free Software Foundation; either version 2 of the License, or
78
+ (at your option) any later version.
79
+
80
+ This program is distributed in the hope that it will be useful,
81
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
82
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83
+ GNU General Public License for more details.
84
+
85
+ You should have received a copy of the GNU General Public License
86
+ along with this program; if not, write to the Free Software
87
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
data/Rakefile ADDED
@@ -0,0 +1,13 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+ require './lib/ronin/dorks/version.rb'
6
+
7
+ Hoe.new('ronin-dorks', Ronin::Dorks::VERSION) do |p|
8
+ p.rubyforge_name = 'ronin'
9
+ p.developer('Postmodern Modulus III', 'postmodern.mod3@gmail.com')
10
+ p.extra_deps = [['ronin', '>=0.0.9'], ['gscraper', '>=0.2.1']]
11
+ end
12
+
13
+ # vim: syntax=Ruby
@@ -0,0 +1,25 @@
1
+ #
2
+ #--
3
+ # Ronin Dorks - A Ruby library for Ronin that provides support for various
4
+ # Google (tm) Dorks functionality.
5
+ #
6
+ # Copyright (c) 2008 Hal Brodigan (postmodern.mod3 at gmail.com)
7
+ #
8
+ # This program is free software; you can redistribute it and/or modify
9
+ # it under the terms of the GNU General Public License as published by
10
+ # the Free Software Foundation; either version 2 of the License, or
11
+ # (at your option) any later version.
12
+ #
13
+ # This program is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with this program; if not, write to the Free Software
20
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
+ #++
22
+ #
23
+
24
+ require 'ronin/web/dorks'
25
+ require 'ronin/dorks/version'
@@ -0,0 +1,28 @@
1
+ #
2
+ #--
3
+ # Ronin Dorks - A Ruby library for Ronin that provides support for various
4
+ # Google (tm) Dorks functionality.
5
+ #
6
+ # Copyright (c) 2008 Hal Brodigan (postmodern.mod3 at gmail.com)
7
+ #
8
+ # This program is free software; you can redistribute it and/or modify
9
+ # it under the terms of the GNU General Public License as published by
10
+ # the Free Software Foundation; either version 2 of the License, or
11
+ # (at your option) any later version.
12
+ #
13
+ # This program is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with this program; if not, write to the Free Software
20
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
+ #++
22
+ #
23
+
24
+ module Ronin
25
+ module Dorks
26
+ VERSION = '0.1.0'
27
+ end
28
+ end
@@ -0,0 +1,149 @@
1
+ #
2
+ #--
3
+ # Ronin Dorks - A Ruby library for Ronin that provides support for various
4
+ # Google (tm) Dorks functionality.
5
+ #
6
+ # Copyright (c) 2008 Hal Brodigan (postmodern.mod3 at gmail.com)
7
+ #
8
+ # This program is free software; you can redistribute it and/or modify
9
+ # it under the terms of the GNU General Public License as published by
10
+ # the Free Software Foundation; either version 2 of the License, or
11
+ # (at your option) any later version.
12
+ #
13
+ # This program is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with this program; if not, write to the Free Software
20
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
+ #++
22
+ #
23
+
24
+ require 'ronin/web/web'
25
+ require 'ronin/extensions/uri'
26
+ require 'ronin/formatting/digest'
27
+
28
+ require 'json'
29
+ require 'gscraper/search'
30
+
31
+ module Ronin
32
+ module Web
33
+ module Dorks
34
+ include GScraper
35
+
36
+ #
37
+ # Creates either a <tt>GScraper::Search::WebQuery</tt> or a
38
+ # <tt>GScraper::Search::AJAXQuery</tt> with the given _options_.
39
+ # If a _block_ is given, it will be passed the newly created
40
+ # query object.
41
+ #
42
+ # _options_ may contain the following keys:
43
+ # <tt>:ajax</tt>:: Specifies wether or not to create a
44
+ # <tt>GScraper::Search::AJAXQuery</tt>.
45
+ #
46
+ def Dorks.search(options={},&block)
47
+ if options[:ajax] == true
48
+ return Search.ajax_query(options,&block)
49
+ else
50
+ return Search.query(options,&block)
51
+ end
52
+ end
53
+
54
+ def Dorks.inurl(pattern,options={},&block)
55
+ Dorks.search(options.merge(:inurl => pattern),&block)
56
+ end
57
+
58
+ def Dorks.string_inurl(string,options={},&block)
59
+ Dorks.inurl("'#{string}'",options,&block)
60
+ end
61
+
62
+ def Dorks.allinurl(patterns,options={},&block)
63
+ Dorks.search(options.merge(:allinurl => patterns),&block)
64
+ end
65
+
66
+ def Dorks.all_strings_inurl(patterns,options={},&block)
67
+ Dorks.search(options.merge(:allinurl => patterns.map { |pattern|
68
+ "'#{pattern}'"
69
+ }),&block)
70
+ end
71
+
72
+ def Dorks.index_of_cgi_bin(options={},&block)
73
+ Dorks.search(options.merge(:exact_phrase => 'Index of cgi-bin'),&block)
74
+ end
75
+
76
+ def Dorks.mysql_dump(options={},&block)
77
+ query = []
78
+
79
+ query << "Host: #{options[:host]}" if options[:host]
80
+ query << "Database: #{options[:database]}" if options[:database]
81
+ query << options[:version] if options[:version]
82
+
83
+ query << "\"#{options[:sql]}\"" if options[:sql]
84
+ query << options[:password].to_s.md5 if options[:password]
85
+
86
+ return Dorks.search(options.merge(:query => query,
87
+ :exact_phrase => '"#mysql dump"',
88
+ :filetype => :sql),&block)
89
+ end
90
+
91
+ def Dorks.mysql_dump_admin(options={},&block)
92
+ Dorks.mysql_dump(options.merge(:password => :admin),&block)
93
+ end
94
+
95
+ def Dorks.cps(options={},&block)
96
+ Dorks.search(options.merge(:exact_phrase => 'Certificate Practice Statement',
97
+ :inurl => '(PDF | DOC)'),&block)
98
+ end
99
+
100
+ def Dorks.vuln_report(options={},&block)
101
+ Dorks.search(options.merge(:exact_phrase => 'Network Vulnerability Assessment'),&block)
102
+ end
103
+
104
+ def Dorks.receipts(options={},&block)
105
+ Dorks.search(options.merge(:exact_phrase => 'Thank you for your order',
106
+ :with_words => ['receipt'],
107
+ :filetype => :pdf),&block)
108
+ end
109
+
110
+ def Dorks.robots_txt(options={},&block)
111
+ Dorks.search(options.merge(:exact_phrase => 'robots.txt',
112
+ :with_words => ['Disallow'],
113
+ :filetype => :txt),&block)
114
+ end
115
+
116
+ def Dorks.php_my_admin(options={},&block)
117
+ Dorks.search(options.merge(:with_words => ['phpMyAdmin'],
118
+ :exact_phrase => 'running on',
119
+ :inurl => 'main.php'),&block)
120
+ end
121
+
122
+ def Dorks.qbw(options={},&block)
123
+ Dorks.search(options.merge(:query => 'qbw',
124
+ :filetype => 'QBW'),&block)
125
+ end
126
+
127
+ def Dorks.emails_xls(options={},&block)
128
+ Dorks.search(options.merge(:filetype => 'xls',
129
+ :inurl => '"email.xls"'),&block)
130
+ end
131
+
132
+ def Dorks.index_for_finances_xls(options={},&block)
133
+ Dorks.search(options.merge(:query => 'finances.xls',
134
+ :intitle => '"Index of"'),&block)
135
+ end
136
+
137
+ def Dorks.download_file(options={},&block)
138
+ Dorks.search(options.merge(:allinurl => ['download.php?',
139
+ 'file']),&block)
140
+ end
141
+
142
+ def Dorks.download_pdf(options={},&block)
143
+ Dorks.search(options.merge(:allinurl => ['download.php?',
144
+ 'file',
145
+ '.pdf']),&block)
146
+ end
147
+ end
148
+ end
149
+ end
File without changes
metadata ADDED
@@ -0,0 +1,93 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ronin-dorks
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Postmodern Modulus III
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-08-21 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: ronin
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.9
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: gscraper
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.2.1
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: hoe
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 1.7.0
44
+ version:
45
+ description: Ronin Dorks is a Ruby library for Ronin that provides support for various Google (tm) Dorks functionality. Ronin is a Ruby platform designed for information security and data exploration tasks. Ronin allows for the rapid development and distribution of code over many of the common Source-Code-Management (SCM) systems.
46
+ email:
47
+ - postmodern.mod3@gmail.com
48
+ executables: []
49
+
50
+ extensions: []
51
+
52
+ extra_rdoc_files:
53
+ - History.txt
54
+ - Manifest.txt
55
+ - README.txt
56
+ files:
57
+ - History.txt
58
+ - Manifest.txt
59
+ - README.txt
60
+ - Rakefile
61
+ - lib/ronin/dorks.rb
62
+ - lib/ronin/dorks/version.rb
63
+ - lib/ronin/web/dorks.rb
64
+ - test/test_ronin_dorks.rb
65
+ has_rdoc: true
66
+ homepage: http://ronin.rubyforge.org/dorks/
67
+ post_install_message:
68
+ rdoc_options:
69
+ - --main
70
+ - README.txt
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: "0"
78
+ version:
79
+ required_rubygems_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: "0"
84
+ version:
85
+ requirements: []
86
+
87
+ rubyforge_project: ronin
88
+ rubygems_version: 1.2.0
89
+ signing_key:
90
+ specification_version: 2
91
+ summary: Ronin Dorks is a Ruby library for Ronin that provides support for various Google (tm) Dorks functionality
92
+ test_files:
93
+ - test/test_ronin_dorks.rb