ronin 0.2.4 → 0.3.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.tar.gz.sig +0 -0
- data/History.txt +95 -0
- data/Manifest.txt +55 -25
- data/README.txt +64 -52
- data/Rakefile +21 -14
- data/bin/ronin +1 -1
- data/bin/ronin-add +1 -1
- data/bin/ronin-console +1 -1
- data/bin/ronin-help +1 -1
- data/bin/ronin-install +1 -1
- data/bin/ronin-list +1 -1
- data/bin/ronin-remove +1 -1
- data/bin/ronin-uninstall +1 -1
- data/bin/ronin-update +1 -1
- data/lib/ronin.rb +2 -4
- data/lib/ronin/arch.rb +66 -21
- data/lib/ronin/author.rb +27 -18
- data/lib/ronin/cacheable.rb +63 -23
- data/lib/ronin/code/emittable.rb +1 -4
- data/lib/ronin/code/reference.rb +2 -5
- data/lib/ronin/code/symbol_table.rb +1 -4
- data/lib/ronin/code/token.rb +1 -4
- data/lib/ronin/config.rb +31 -10
- data/lib/ronin/database.rb +1 -4
- data/lib/ronin/database/database.rb +42 -23
- data/lib/ronin/database/exceptions.rb +1 -4
- data/lib/ronin/database/exceptions/invalid_config.rb +1 -4
- data/lib/ronin/environment.rb +1 -5
- data/lib/ronin/extensions.rb +1 -5
- data/lib/ronin/extensions/array.rb +8 -6
- data/lib/ronin/extensions/file.rb +9 -4
- data/lib/ronin/extensions/ip_addr.rb +33 -13
- data/lib/ronin/extensions/kernel.rb +44 -9
- data/lib/ronin/extensions/meta.rb +1 -4
- data/lib/ronin/extensions/string.rb +8 -7
- data/lib/ronin/extensions/uri.rb +1 -4
- data/lib/ronin/extensions/uri/http.rb +1 -48
- data/lib/ronin/extensions/uri/query_params.rb +27 -8
- data/lib/ronin/formatting.rb +1 -4
- data/lib/ronin/formatting/binary.rb +1 -4
- data/lib/ronin/formatting/digest.rb +1 -4
- data/lib/ronin/formatting/extensions.rb +1 -4
- data/lib/ronin/formatting/extensions/binary.rb +1 -4
- data/lib/ronin/formatting/extensions/binary/file.rb +3 -28
- data/lib/ronin/formatting/extensions/binary/integer.rb +31 -12
- data/lib/ronin/formatting/extensions/binary/string.rb +59 -36
- data/lib/ronin/formatting/extensions/digest.rb +1 -4
- data/lib/ronin/formatting/extensions/digest/string.rb +31 -9
- data/lib/ronin/formatting/extensions/http.rb +1 -4
- data/lib/ronin/formatting/extensions/http/string.rb +16 -9
- data/lib/ronin/formatting/extensions/text.rb +1 -4
- data/lib/ronin/formatting/extensions/text/array.rb +17 -7
- data/lib/ronin/formatting/extensions/text/string.rb +70 -27
- data/lib/ronin/formatting/http.rb +1 -4
- data/lib/ronin/formatting/text.rb +1 -4
- data/lib/ronin/license.rb +72 -65
- data/lib/ronin/model.rb +1 -4
- data/lib/ronin/model/has_description.rb +37 -8
- data/lib/ronin/model/has_license.rb +12 -8
- data/lib/ronin/model/has_name.rb +10 -7
- data/lib/ronin/model/has_version.rb +14 -4
- data/lib/ronin/model/model.rb +71 -14
- data/lib/ronin/network.rb +1 -4
- data/lib/ronin/network/esmtp.rb +1 -4
- data/lib/ronin/network/extensions.rb +1 -4
- data/lib/ronin/network/extensions/esmtp.rb +1 -4
- data/lib/ronin/network/extensions/esmtp/net.rb +49 -21
- data/lib/ronin/network/extensions/http.rb +1 -4
- data/lib/ronin/network/extensions/http/net.rb +319 -531
- data/lib/ronin/network/extensions/imap.rb +1 -4
- data/lib/ronin/network/extensions/imap/net.rb +50 -23
- data/lib/ronin/network/extensions/pop3.rb +1 -4
- data/lib/ronin/network/extensions/pop3/net.rb +40 -17
- data/lib/ronin/network/extensions/smtp.rb +1 -4
- data/lib/ronin/network/extensions/smtp/net.rb +49 -21
- data/lib/ronin/network/extensions/tcp.rb +1 -4
- data/lib/ronin/network/extensions/tcp/net.rb +234 -31
- data/lib/ronin/network/extensions/telnet.rb +1 -4
- data/lib/ronin/network/extensions/telnet/net.rb +83 -51
- data/lib/ronin/network/extensions/udp.rb +1 -4
- data/lib/ronin/network/extensions/udp/net.rb +164 -27
- data/lib/ronin/{sessions.rb → network/helpers.rb} +10 -13
- data/lib/ronin/network/helpers/esmtp.rb +129 -0
- data/lib/ronin/{sessions/session.rb → network/helpers/helper.rb} +25 -17
- data/lib/ronin/network/helpers/http.rb +444 -0
- data/lib/ronin/network/helpers/imap.rb +115 -0
- data/lib/ronin/network/helpers/pop3.rb +110 -0
- data/lib/ronin/network/helpers/smtp.rb +123 -0
- data/lib/ronin/network/helpers/tcp.rb +309 -0
- data/lib/ronin/network/helpers/telnet.rb +158 -0
- data/lib/ronin/network/helpers/udp.rb +197 -0
- data/lib/ronin/network/http.rb +3 -156
- data/lib/ronin/network/http/exceptions.rb +1 -4
- data/lib/ronin/network/http/exceptions/unknown_request.rb +1 -4
- data/lib/ronin/network/http/http.rb +214 -0
- data/lib/ronin/network/http/proxy.rb +308 -0
- data/lib/ronin/network/imap.rb +7 -6
- data/lib/ronin/network/pop3.rb +7 -6
- data/lib/ronin/network/smtp.rb +1 -4
- data/lib/ronin/network/smtp/email.rb +34 -18
- data/lib/ronin/network/smtp/smtp.rb +19 -7
- data/lib/ronin/network/tcp.rb +1 -4
- data/lib/ronin/network/telnet.rb +25 -12
- data/lib/ronin/network/udp.rb +1 -4
- data/lib/ronin/os.rb +43 -21
- data/lib/ronin/path.rb +29 -9
- data/lib/ronin/platform.rb +1 -4
- data/lib/ronin/platform/exceptions.rb +1 -4
- data/lib/ronin/platform/exceptions/extension_not_found.rb +1 -4
- data/lib/ronin/platform/exceptions/overlay_cached.rb +1 -4
- data/lib/ronin/platform/exceptions/overlay_not_found.rb +1 -4
- data/lib/ronin/platform/extension.rb +195 -52
- data/lib/ronin/platform/extension_cache.rb +60 -24
- data/lib/ronin/platform/maintainer.rb +15 -8
- data/lib/ronin/platform/object_cache.rb +29 -8
- data/lib/ronin/platform/overlay.rb +82 -26
- data/lib/ronin/platform/overlay_cache.rb +179 -56
- data/lib/ronin/platform/platform.rb +154 -58
- data/lib/ronin/platform/ronin.rb +38 -11
- data/lib/ronin/product.rb +17 -17
- data/lib/ronin/rpc.rb +1 -4
- data/lib/ronin/rpc/call.rb +1 -4
- data/lib/ronin/rpc/client.rb +1 -4
- data/lib/ronin/rpc/console.rb +1 -4
- data/lib/ronin/rpc/exceptions.rb +1 -4
- data/lib/ronin/rpc/exceptions/not_implemented.rb +1 -4
- data/lib/ronin/rpc/exceptions/response_missing.rb +1 -4
- data/lib/ronin/rpc/response.rb +1 -4
- data/lib/ronin/rpc/service.rb +1 -4
- data/lib/ronin/rpc/shell.rb +1 -4
- data/lib/ronin/scanners.rb +1 -4
- data/lib/ronin/scanners/exceptions.rb +1 -4
- data/lib/ronin/scanners/exceptions/unknown_category.rb +1 -4
- data/lib/ronin/scanners/scanner.rb +82 -26
- data/lib/ronin/static.rb +1 -4
- data/lib/ronin/static/finders.rb +1 -4
- data/lib/ronin/static/static.rb +16 -7
- data/lib/ronin/templates.rb +2 -4
- data/lib/ronin/templates/erb.rb +24 -10
- data/lib/ronin/templates/template.rb +130 -0
- data/lib/ronin/ui.rb +2 -6
- data/lib/ronin/ui/command_line.rb +1 -4
- data/lib/ronin/ui/command_line/command.rb +137 -68
- data/lib/ronin/ui/command_line/command_line.rb +52 -29
- data/lib/ronin/ui/command_line/commands/add.rb +39 -67
- data/lib/ronin/ui/command_line/commands/console.rb +23 -27
- data/lib/ronin/ui/command_line/commands/help.rb +10 -29
- data/lib/ronin/ui/command_line/commands/install.rb +31 -56
- data/lib/ronin/ui/command_line/commands/list.rb +34 -52
- data/lib/ronin/ui/command_line/commands/remove.rb +12 -32
- data/lib/ronin/ui/command_line/commands/uninstall.rb +11 -31
- data/lib/ronin/ui/command_line/commands/update.rb +15 -35
- data/lib/ronin/ui/command_line/exceptions.rb +1 -4
- data/lib/ronin/ui/command_line/exceptions/unknown_command.rb +1 -4
- data/lib/ronin/ui/console.rb +54 -23
- data/lib/ronin/ui/hexdump.rb +1 -4
- data/lib/ronin/ui/hexdump/extensions.rb +1 -4
- data/lib/ronin/ui/hexdump/extensions/file.rb +8 -6
- data/lib/ronin/ui/hexdump/extensions/kernel.rb +4 -5
- data/lib/ronin/ui/hexdump/hexdump.rb +8 -5
- data/lib/ronin/{sessions/exceptions.rb → ui/output.rb} +3 -5
- data/lib/ronin/ui/output/handler.rb +121 -0
- data/lib/ronin/ui/output/helpers.rb +110 -0
- data/lib/ronin/ui/output/output.rb +144 -0
- data/lib/ronin/ui/shell.rb +38 -12
- data/lib/ronin/version.rb +2 -5
- data/lib/ronin/{sessions/exceptions/variable_missing.rb → yard.rb} +2 -10
- data/lib/ronin/{ronin.rb → yard/handlers.rb} +5 -15
- data/lib/ronin/yard/handlers/ruby.rb +27 -0
- data/lib/ronin/yard/handlers/ruby/base.rb +27 -0
- data/lib/ronin/yard/handlers/ruby/belongs_to_handler.rb +45 -0
- data/lib/ronin/yard/handlers/ruby/eval_block_handler.rb +18 -0
- data/lib/ronin/yard/handlers/ruby/has_handler.rb +49 -0
- data/lib/ronin/yard/handlers/ruby/legacy.rb +26 -0
- data/lib/ronin/yard/handlers/ruby/legacy/belongs_to_handler.rb +41 -0
- data/lib/ronin/yard/handlers/ruby/legacy/eval_block_handler.rb +19 -0
- data/lib/ronin/yard/handlers/ruby/legacy/has_handler.rb +34 -0
- data/lib/ronin/yard/handlers/ruby/legacy/metaclass_eval_handler.rb +21 -0
- data/lib/ronin/yard/handlers/ruby/legacy/property_handler.rb +41 -0
- data/lib/ronin/yard/handlers/ruby/legacy/scanner_handler.rb +61 -0
- data/lib/ronin/yard/handlers/ruby/metaclass_eval_handler.rb +18 -0
- data/lib/ronin/yard/handlers/ruby/property_handler.rb +45 -0
- data/lib/ronin/yard/handlers/ruby/scanner_handler.rb +66 -0
- data/spec/author_spec.rb +3 -3
- data/spec/extensions/classes/some_class.rb +2 -0
- data/spec/extensions/kernel_spec.rb +17 -0
- data/spec/extensions/uri/http_spec.rb +0 -31
- data/spec/formatting/binary/integer_spec.rb +4 -0
- data/spec/formatting/text/string_spec.rb +96 -0
- data/spec/license_spec.rb +6 -6
- data/spec/model/classes/basic_model.rb +13 -0
- data/spec/model/classes/custom_model.rb +17 -0
- data/spec/model/classes/described_model.rb +10 -0
- data/spec/model/has_description_spec.rb +42 -0
- data/spec/model/has_license_spec.rb +18 -4
- data/spec/model/model_spec.rb +68 -0
- data/spec/network/helpers/classes/test_helper.rb +11 -0
- data/spec/network/helpers/classes/uses_test_helper.rb +10 -0
- data/spec/network/helpers/helper_spec.rb +25 -0
- data/spec/network/{http_spec.rb → http/http_spec.rb} +0 -0
- data/spec/network/http/proxy_spec.rb +116 -0
- data/spec/os_spec.rb +4 -4
- data/spec/platform/extension_cache_spec.rb +14 -0
- data/spec/platform/extension_spec.rb +11 -0
- data/spec/platform/platform_spec.rb +8 -0
- data/spec/product_spec.rb +9 -9
- data/spec/spec_helper.rb +1 -1
- data/spec/templates/classes/{uses_erb.rb → example_erb.rb} +1 -1
- data/spec/templates/classes/example_template.rb +21 -0
- data/spec/templates/erb_spec.rb +2 -2
- data/spec/templates/helpers/static.rb +5 -0
- data/spec/templates/helpers/static/templates/_relative.erb +1 -0
- data/spec/templates/helpers/static/templates/example.erb +1 -0
- data/spec/templates/template_spec.rb +41 -0
- data/spec/ui/command_line/classes/test_command.rb +23 -0
- data/spec/ui/command_line/command_spec.rb +31 -0
- data/spec/ui/output_spec.rb +29 -0
- data/static/ronin/platform/overlay.xsl +135 -114
- data/tasks/spec.rb +1 -0
- data/tasks/yard.rb +18 -0
- metadata +98 -59
- metadata.gz.sig +0 -0
- data/TODO.txt +0 -15
- data/lib/ronin/extensions/hash.rb +0 -62
- data/lib/ronin/sessions/esmtp.rb +0 -57
- data/lib/ronin/sessions/http.rb +0 -678
- data/lib/ronin/sessions/imap.rb +0 -54
- data/lib/ronin/sessions/pop3.rb +0 -52
- data/lib/ronin/sessions/smtp.rb +0 -57
- data/lib/ronin/sessions/tcp.rb +0 -100
- data/lib/ronin/sessions/telnet.rb +0 -55
- data/lib/ronin/sessions/udp.rb +0 -73
- data/lib/ronin/ui/command_line/options.rb +0 -136
- data/lib/ronin/ui/diagnostics.rb +0 -66
- data/lib/ronin/ui/verbose.rb +0 -58
- data/spec/extensions/hash_spec.rb +0 -38
- data/spec/sessions/classes/test_session.rb +0 -11
- data/spec/sessions/classes/uses_test_session.rb +0 -10
- data/spec/sessions/session_spec.rb +0 -25
- data/spec/ui/verbose_spec.rb +0 -17
data/lib/ronin/platform/ronin.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
require 'ronin/platform/platform'
|
|
@@ -31,8 +28,19 @@ module Ronin
|
|
|
31
28
|
#
|
|
32
29
|
# Provides transparent access to Platform.extension via constants.
|
|
33
30
|
#
|
|
31
|
+
# @param [String] name
|
|
32
|
+
# The constant name to map to an extension in the extension cache.
|
|
33
|
+
#
|
|
34
|
+
# @return [Extension]
|
|
35
|
+
# The extension that maps to the constant _name_.
|
|
36
|
+
#
|
|
37
|
+
# @raise [NameError]
|
|
38
|
+
# No extension could be found in the extension cache, that maps to the
|
|
39
|
+
# constant _name_.
|
|
40
|
+
#
|
|
41
|
+
# @example
|
|
34
42
|
# Ronin::Shellcode
|
|
35
|
-
# # => #<Ronin::Platform::Extension: ...>
|
|
43
|
+
# # => #<Ronin::Platform::Extension: @name="shellcode" ...>
|
|
36
44
|
#
|
|
37
45
|
def Ronin.const_missing(name)
|
|
38
46
|
name = name.to_s
|
|
@@ -48,23 +56,42 @@ module Ronin
|
|
|
48
56
|
#
|
|
49
57
|
# Provides transparent access to Platform.extension via methods.
|
|
50
58
|
#
|
|
59
|
+
# @param [Symbol, String] name
|
|
60
|
+
# The name of the extension to search for within the extension cache.
|
|
61
|
+
#
|
|
62
|
+
# @yield [ext]
|
|
63
|
+
# If a block is given, it will be passed the extension which has the
|
|
64
|
+
# matching _name_.
|
|
65
|
+
#
|
|
66
|
+
# @yieldparam [Extension] ext
|
|
67
|
+
# The matching extension.
|
|
68
|
+
#
|
|
69
|
+
# @return [Extension]
|
|
70
|
+
# The matching extension.
|
|
71
|
+
#
|
|
72
|
+
# @raise [NoMethodError]
|
|
73
|
+
# No extension could be found in the extension cache with the
|
|
74
|
+
# matching _name_.
|
|
75
|
+
#
|
|
76
|
+
# @example
|
|
51
77
|
# shellcode
|
|
52
78
|
# # => #<Ronin::Platform::Extension: ...>
|
|
53
79
|
#
|
|
80
|
+
# @example
|
|
54
81
|
# shellcode do |ext|
|
|
55
|
-
#
|
|
82
|
+
# puts ext.exposed_methods
|
|
56
83
|
# end
|
|
57
84
|
#
|
|
58
|
-
def method_missing(
|
|
85
|
+
def method_missing(name,*args,&block)
|
|
59
86
|
if args.length == 0
|
|
60
|
-
|
|
87
|
+
ext_name = name.id2name
|
|
61
88
|
|
|
62
89
|
# return an extension if available
|
|
63
|
-
if Platform.has_extension?(
|
|
64
|
-
return Platform.extension(
|
|
90
|
+
if Platform.has_extension?(ext_name)
|
|
91
|
+
return Platform.extension(ext_name,&block)
|
|
65
92
|
end
|
|
66
93
|
end
|
|
67
94
|
|
|
68
|
-
return super(
|
|
95
|
+
return super(name,*args,&block)
|
|
69
96
|
end
|
|
70
97
|
end
|
data/lib/ronin/product.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
require 'ronin/model'
|
|
@@ -46,15 +43,19 @@ module Ronin
|
|
|
46
43
|
validates_present :name, :version
|
|
47
44
|
|
|
48
45
|
#
|
|
49
|
-
# Creates a new Product object
|
|
46
|
+
# Creates a new Product object.
|
|
50
47
|
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
# <tt>:vendor</tt>:: The vendor of the product. Will default to the
|
|
54
|
-
# product name, if not given.
|
|
48
|
+
# @param [Hash] attributes
|
|
49
|
+
# Attributes of the product.
|
|
55
50
|
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
51
|
+
# @option attributes [String] :name
|
|
52
|
+
# The name of the product.
|
|
53
|
+
#
|
|
54
|
+
# @option attributes [String] :vendor
|
|
55
|
+
# The vendor of the product.
|
|
56
|
+
#
|
|
57
|
+
# @option attributes [String] :version
|
|
58
|
+
# The vesion of the product.
|
|
58
59
|
#
|
|
59
60
|
def initialize(attributes={})
|
|
60
61
|
attributes[:vendor] ||= attributes[:name]
|
|
@@ -63,14 +64,13 @@ module Ronin
|
|
|
63
64
|
end
|
|
64
65
|
|
|
65
66
|
#
|
|
66
|
-
#
|
|
67
|
+
# Converts the product to a String.
|
|
68
|
+
#
|
|
69
|
+
# @return [String]
|
|
70
|
+
# The product vendor, name and version.
|
|
67
71
|
#
|
|
68
72
|
def to_s
|
|
69
|
-
|
|
70
|
-
return "#{self.vendor} #{self.name} #{self.version}"
|
|
71
|
-
else
|
|
72
|
-
return "#{self.name} #{self.version}"
|
|
73
|
-
end
|
|
73
|
+
[self.vendor, self.name, self.version].compact.join(' ')
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
end
|
data/lib/ronin/rpc.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
require 'ronin/rpc/exceptions'
|
data/lib/ronin/rpc/call.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
require 'ronin/rpc/exceptions/not_implemented'
|
data/lib/ronin/rpc/client.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
require 'ronin/rpc/exceptions/not_implemented'
|
data/lib/ronin/rpc/console.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
require 'ronin/rpc/service'
|
data/lib/ronin/rpc/exceptions.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
require 'ronin/rpc/exceptions/not_implemented'
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
module Ronin
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
module Ronin
|
data/lib/ronin/rpc/response.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
require 'ronin/rpc/exceptions/not_implemented'
|
data/lib/ronin/rpc/service.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
module Ronin
|
data/lib/ronin/rpc/shell.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
require 'ronin/rpc/service'
|
data/lib/ronin/scanners.rb
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
require 'ronin/scanners/exceptions'
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
require 'ronin/scanners/exceptions/unknown_category'
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
module Ronin
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
|
|
3
|
-
# Ronin - A Ruby platform designed for information security and data
|
|
4
|
-
# exploration tasks.
|
|
2
|
+
# Ronin - A Ruby platform for exploit development and security research.
|
|
5
3
|
#
|
|
6
4
|
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
5
|
#
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
# You should have received a copy of the GNU General Public License
|
|
19
17
|
# along with this program; if not, write to the Free Software
|
|
20
18
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
-
#++
|
|
22
19
|
#
|
|
23
20
|
|
|
24
21
|
require 'ronin/scanners/exceptions/unknown_category'
|
|
@@ -32,15 +29,22 @@ module Ronin
|
|
|
32
29
|
def self.included(base)
|
|
33
30
|
base.metaclass_eval do
|
|
34
31
|
#
|
|
35
|
-
#
|
|
36
|
-
#
|
|
32
|
+
# The defined categories and their scanners for the class.
|
|
33
|
+
#
|
|
34
|
+
# @return [Hash]
|
|
35
|
+
# The categories and the scanners defined for the them within
|
|
36
|
+
# the class.
|
|
37
37
|
#
|
|
38
38
|
def scanners
|
|
39
39
|
@scanners ||= {}
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
#
|
|
43
|
-
#
|
|
43
|
+
# Collects all categories that the class and ancestors scan
|
|
44
|
+
# for.
|
|
45
|
+
#
|
|
46
|
+
# @return [Set]
|
|
47
|
+
# The category names of all defined scanners.
|
|
44
48
|
#
|
|
45
49
|
def scans_for
|
|
46
50
|
names = Set[]
|
|
@@ -55,8 +59,15 @@ module Ronin
|
|
|
55
59
|
end
|
|
56
60
|
|
|
57
61
|
#
|
|
58
|
-
#
|
|
59
|
-
#
|
|
62
|
+
# Specifies whether or not there are scanners defined for the
|
|
63
|
+
# specified category.
|
|
64
|
+
#
|
|
65
|
+
# @param [Symbol, String] name
|
|
66
|
+
# The name of the category to search for scanners within.
|
|
67
|
+
#
|
|
68
|
+
# @return [Boolean]
|
|
69
|
+
# Specifies whether there is a scanner defined for the
|
|
70
|
+
# specified category.
|
|
60
71
|
#
|
|
61
72
|
def scans_for?(name)
|
|
62
73
|
name = name.to_sym
|
|
@@ -71,7 +82,16 @@ module Ronin
|
|
|
71
82
|
end
|
|
72
83
|
|
|
73
84
|
#
|
|
74
|
-
#
|
|
85
|
+
# Collects all scanners in the specified category.
|
|
86
|
+
#
|
|
87
|
+
# @param [Symbol, String] name
|
|
88
|
+
# The category name to return all scanners for.
|
|
89
|
+
#
|
|
90
|
+
# @return [Array]
|
|
91
|
+
# All scanners in the specified category.
|
|
92
|
+
#
|
|
93
|
+
# @raise [UnknownCategory]
|
|
94
|
+
# No category has the specified name.
|
|
75
95
|
#
|
|
76
96
|
def scanners_in(name)
|
|
77
97
|
name = name.to_sym
|
|
@@ -94,22 +114,34 @@ module Ronin
|
|
|
94
114
|
end
|
|
95
115
|
|
|
96
116
|
#
|
|
97
|
-
# Defines a scanner
|
|
98
|
-
#
|
|
117
|
+
# Defines a scanner in the category for the class.
|
|
118
|
+
#
|
|
119
|
+
# @param [Symbol, String] name
|
|
120
|
+
# The name of the category to define the scanner for.
|
|
121
|
+
#
|
|
122
|
+
# @yield [target, results, (options)]
|
|
123
|
+
# The block that will be called when the scanner is ran.
|
|
99
124
|
#
|
|
100
|
-
#
|
|
101
|
-
#
|
|
102
|
-
# _block_.
|
|
125
|
+
# @yieldparam [Object] target
|
|
126
|
+
# The target object to scan.
|
|
103
127
|
#
|
|
128
|
+
# @yieldparam [Proc] results
|
|
129
|
+
# A callback for enqueuing results from the scanner in
|
|
130
|
+
# real-time.
|
|
131
|
+
#
|
|
132
|
+
# @yieldparam [Hash] options
|
|
133
|
+
# Additional scanner-options that can be used to configure
|
|
134
|
+
# the scanning.
|
|
135
|
+
#
|
|
136
|
+
# @example Defining a scanner for the +:lfi+ category.
|
|
104
137
|
# scanner(:lfi) do |url,results|
|
|
105
|
-
# ...
|
|
138
|
+
# # ...
|
|
106
139
|
# end
|
|
107
140
|
#
|
|
108
|
-
#
|
|
109
|
-
#
|
|
110
|
-
#
|
|
141
|
+
# @example Defining a scanner for the +:sqli+ category, that
|
|
142
|
+
# accepts additional scanner-options.
|
|
111
143
|
# scanner(:sqli) do |url,results,options|
|
|
112
|
-
# ...
|
|
144
|
+
# # ...
|
|
113
145
|
# end
|
|
114
146
|
#
|
|
115
147
|
def scanner(name,&block)
|
|
@@ -160,18 +192,36 @@ module Ronin
|
|
|
160
192
|
end
|
|
161
193
|
|
|
162
194
|
#
|
|
163
|
-
# Runs
|
|
164
|
-
# If
|
|
165
|
-
# against each_target
|
|
166
|
-
#
|
|
195
|
+
# Runs all scanners in the given categories against +each_target+.
|
|
196
|
+
# If no categories are specified, all categories will be ran
|
|
197
|
+
# against +each_target+.
|
|
198
|
+
#
|
|
199
|
+
# @param [Hash{Symbol => true,Hash}] categories
|
|
200
|
+
# The categories to scan for, with additional per-category
|
|
201
|
+
# scanner-options.
|
|
202
|
+
#
|
|
203
|
+
# @return [Hash]
|
|
204
|
+
# The results grouped by scanner category.
|
|
167
205
|
#
|
|
168
|
-
#
|
|
169
|
-
#
|
|
206
|
+
# @yield [category, result]
|
|
207
|
+
# The block that may receive the scanner results for categories
|
|
208
|
+
# in real-time.
|
|
170
209
|
#
|
|
210
|
+
# @yieldparam [Symbol] category
|
|
211
|
+
# The category the result belongs to.
|
|
212
|
+
#
|
|
213
|
+
# @yieldparam [Object] result
|
|
214
|
+
# The result object enqueued by the scanner.
|
|
215
|
+
#
|
|
216
|
+
# @example Scanning a specific category.
|
|
171
217
|
# url.scan(:rfi => true)
|
|
218
|
+
# # => {:rfi => [...]}
|
|
172
219
|
#
|
|
220
|
+
# @example Scanning multiple categories, with scanner-options.
|
|
173
221
|
# url.scan(:lfi => true, :sqli => {:params => ['id', 'catid']})
|
|
222
|
+
# # => {:lfi => [...], :sqli => [...]}
|
|
174
223
|
#
|
|
224
|
+
# @example Receiving scanner results from categories in real-time.
|
|
175
225
|
# url.scan(:lfi => true, :rfi => true) do |category,result|
|
|
176
226
|
# puts "[#{category}] #{result.inspect}"
|
|
177
227
|
# end
|
|
@@ -231,6 +281,12 @@ module Ronin
|
|
|
231
281
|
# each target object to be scanned. By default, the method will call
|
|
232
282
|
# the specified _block_ once, simply passing it the +self+ object.
|
|
233
283
|
#
|
|
284
|
+
# @yield [target]
|
|
285
|
+
# The block that will be passed each target object to be scanned.
|
|
286
|
+
#
|
|
287
|
+
# @yieldparam [Object] target
|
|
288
|
+
# The target object to be scanned.
|
|
289
|
+
#
|
|
234
290
|
def each_target(&block)
|
|
235
291
|
block.call(self)
|
|
236
292
|
end
|