ronin 0.1.2 → 0.1.3
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 +58 -25
- data/Manifest.txt +15 -16
- data/README.txt +16 -11
- data/Rakefile +9 -7
- data/TODO.txt +6 -1
- data/lib/ronin.rb +1 -1
- data/lib/ronin/arch.rb +7 -15
- data/lib/ronin/author.rb +1 -1
- data/lib/ronin/cache.rb +1 -1
- data/lib/ronin/cache/cache.rb +1 -1
- data/lib/ronin/cache/config.rb +1 -1
- data/lib/ronin/cache/exceptions.rb +1 -1
- data/lib/ronin/cache/exceptions/extension_not_found.rb +1 -1
- data/lib/ronin/cache/exceptions/overlay_cached.rb +1 -1
- data/lib/ronin/cache/exceptions/overlay_not_found.rb +1 -1
- data/lib/ronin/cache/extension.rb +15 -190
- data/lib/ronin/cache/extension_cache.rb +2 -2
- data/lib/ronin/cache/maintainer.rb +1 -1
- data/lib/ronin/cache/overlay.rb +8 -7
- data/lib/ronin/cache/overlay_cache.rb +1 -1
- data/lib/ronin/cache/ronin.rb +1 -1
- data/lib/ronin/chars.rb +1 -1
- data/lib/ronin/chars/char_set.rb +1 -1
- data/lib/ronin/chars/chars.rb +1 -1
- data/lib/ronin/code/emittable.rb +1 -1
- data/lib/ronin/code/reference.rb +1 -1
- data/lib/ronin/code/symbol_table.rb +1 -1
- data/lib/ronin/code/token.rb +1 -1
- data/lib/ronin/config.rb +16 -9
- data/lib/ronin/database.rb +2 -113
- data/lib/ronin/database/database.rb +124 -0
- data/lib/ronin/{exceptions/unknown_context.rb → database/exceptions.rb} +2 -5
- data/lib/ronin/{exceptions/context_not_found.rb → database/exceptions/invalid_config.rb} +4 -2
- data/lib/ronin/extensions.rb +1 -1
- data/lib/ronin/extensions/hash.rb +1 -1
- data/lib/ronin/extensions/meta.rb +1 -1
- data/lib/ronin/extensions/string.rb +1 -1
- data/lib/ronin/extensions/uri.rb +1 -1
- data/lib/ronin/extensions/uri/http.rb +1 -1
- data/lib/ronin/extensions/uri/query_params.rb +1 -1
- data/lib/ronin/formatting.rb +1 -1
- data/lib/ronin/formatting/binary.rb +1 -1
- data/lib/ronin/formatting/digest.rb +1 -1
- data/lib/ronin/formatting/extensions.rb +1 -1
- data/lib/ronin/formatting/extensions/binary.rb +1 -1
- data/lib/ronin/formatting/extensions/binary/integer.rb +1 -1
- data/lib/ronin/formatting/extensions/binary/string.rb +1 -1
- data/lib/ronin/formatting/extensions/digest.rb +1 -1
- data/lib/ronin/formatting/extensions/digest/string.rb +1 -1
- data/lib/ronin/formatting/extensions/html.rb +1 -1
- data/lib/ronin/formatting/extensions/html/string.rb +1 -1
- data/lib/ronin/formatting/extensions/http.rb +1 -1
- data/lib/ronin/formatting/extensions/http/string.rb +1 -1
- data/lib/ronin/formatting/extensions/text.rb +1 -1
- data/lib/ronin/formatting/extensions/text/string.rb +1 -1
- data/lib/ronin/formatting/html.rb +1 -1
- data/lib/ronin/formatting/http.rb +1 -1
- data/lib/ronin/formatting/text.rb +1 -1
- data/lib/ronin/{pending_context.rb → has_license.rb} +21 -22
- data/lib/ronin/hexdump.rb +1 -1
- data/lib/ronin/hexdump/extensions.rb +1 -1
- data/lib/ronin/hexdump/extensions/file.rb +1 -1
- data/lib/ronin/hexdump/extensions/kernel.rb +1 -1
- data/lib/ronin/hexdump/hexdump.rb +1 -1
- data/lib/ronin/license.rb +10 -15
- data/lib/ronin/model.rb +14 -12
- data/lib/ronin/models.rb +2 -2
- data/lib/ronin/network.rb +1 -1
- data/lib/ronin/network/esmtp.rb +1 -1
- data/lib/ronin/network/extensions.rb +1 -1
- data/lib/ronin/network/extensions/esmtp.rb +1 -1
- data/lib/ronin/network/extensions/esmtp/net.rb +1 -1
- data/lib/ronin/network/extensions/http.rb +1 -1
- data/lib/ronin/network/extensions/http/net.rb +1 -1
- data/lib/ronin/network/extensions/imap.rb +1 -1
- data/lib/ronin/network/extensions/imap/net.rb +1 -1
- data/lib/ronin/network/extensions/pop3.rb +1 -1
- data/lib/ronin/network/extensions/pop3/net.rb +1 -1
- data/lib/ronin/network/extensions/smtp.rb +1 -1
- data/lib/ronin/network/extensions/smtp/net.rb +1 -1
- data/lib/ronin/network/extensions/tcp.rb +1 -1
- data/lib/ronin/network/extensions/tcp/net.rb +17 -1
- data/lib/ronin/network/extensions/telnet.rb +1 -1
- data/lib/ronin/network/extensions/telnet/net.rb +1 -1
- data/lib/ronin/network/extensions/udp.rb +1 -1
- data/lib/ronin/network/extensions/udp/net.rb +1 -1
- data/lib/ronin/network/http.rb +1 -1
- data/lib/ronin/network/http/exceptions.rb +1 -1
- data/lib/ronin/network/http/exceptions/unknown_request.rb +1 -1
- data/lib/ronin/network/imap.rb +1 -1
- data/lib/ronin/network/pop3.rb +1 -1
- data/lib/ronin/network/smtp.rb +1 -1
- data/lib/ronin/network/smtp/email.rb +1 -1
- data/lib/ronin/network/smtp/smtp.rb +1 -1
- data/lib/ronin/network/tcp.rb +1 -1
- data/lib/ronin/network/telnet.rb +1 -1
- data/lib/ronin/network/udp.rb +1 -1
- data/lib/ronin/objectify.rb +24 -0
- data/lib/ronin/{exceptions/invalid_database_config.rb → objectify/exceptions.rb} +3 -5
- data/lib/ronin/{exceptions → objectify/exceptions}/object_context_not_found.rb +1 -1
- data/lib/ronin/{exceptions → objectify/exceptions}/unknown_object_context.rb +1 -1
- data/lib/ronin/{object_context.rb → objectify/objectify.rb} +54 -45
- data/lib/ronin/path.rb +1 -1
- data/lib/ronin/platform.rb +3 -1
- data/lib/ronin/product.rb +2 -1
- data/lib/ronin/ronin.rb +10 -10
- data/lib/ronin/rpc.rb +1 -1
- data/lib/ronin/rpc/call.rb +1 -1
- data/lib/ronin/rpc/client.rb +1 -1
- data/lib/ronin/rpc/console.rb +1 -1
- data/lib/ronin/rpc/exceptions.rb +1 -1
- data/lib/ronin/rpc/exceptions/not_implemented.rb +1 -1
- data/lib/ronin/rpc/exceptions/response_missing.rb +1 -1
- data/lib/ronin/rpc/response.rb +1 -1
- data/lib/ronin/rpc/service.rb +1 -1
- data/lib/ronin/rpc/shell.rb +1 -1
- data/lib/ronin/sessions.rb +1 -1
- data/lib/ronin/sessions/esmtp.rb +6 -8
- data/lib/ronin/sessions/http.rb +1 -1
- data/lib/ronin/sessions/imap.rb +6 -8
- data/lib/ronin/sessions/pop3.rb +6 -8
- data/lib/ronin/sessions/session.rb +1 -1
- data/lib/ronin/sessions/smtp.rb +6 -8
- data/lib/ronin/sessions/tcp.rb +48 -36
- data/lib/ronin/sessions/telnet.rb +7 -10
- data/lib/ronin/sessions/udp.rb +28 -29
- data/lib/ronin/sessions/web.rb +5 -7
- data/lib/ronin/target.rb +1 -0
- data/lib/ronin/translators/translator.rb +1 -1
- data/lib/ronin/ui/command_line.rb +1 -1
- data/lib/ronin/ui/command_line/command.rb +1 -1
- data/lib/ronin/ui/command_line/command_line.rb +7 -2
- data/lib/ronin/ui/command_line/commands.rb +2 -2
- data/lib/ronin/ui/command_line/commands/add.rb +8 -8
- data/lib/ronin/ui/command_line/commands/default.rb +1 -1
- data/lib/ronin/ui/command_line/commands/extension.rb +13 -26
- data/lib/ronin/ui/command_line/commands/help.rb +1 -1
- data/lib/ronin/ui/command_line/commands/install.rb +7 -7
- data/lib/ronin/ui/command_line/commands/list.rb +13 -7
- data/lib/ronin/ui/command_line/commands/overlay.rb +1 -1
- data/lib/ronin/ui/command_line/commands/remove.rb +4 -4
- data/lib/ronin/ui/command_line/commands/uninstall.rb +4 -4
- data/lib/ronin/ui/command_line/commands/update.rb +3 -3
- data/lib/ronin/ui/command_line/exceptions.rb +1 -1
- data/lib/ronin/ui/command_line/exceptions/unknown_command.rb +1 -1
- data/lib/ronin/ui/command_line/options.rb +1 -1
- data/lib/ronin/ui/command_line/param_parser.rb +73 -0
- data/lib/ronin/ui/console.rb +1 -1
- data/lib/ronin/ui/shell.rb +1 -1
- data/lib/ronin/version.rb +2 -2
- data/lib/ronin/web.rb +1 -1
- data/lib/ronin/web/web.rb +1 -1
- data/spec/chars/char_set_spec.rb +116 -118
- data/spec/chars/chars_spec.rb +54 -63
- data/spec/formatting/{binary_spec.rb → binary/integer_spec.rb} +0 -19
- data/spec/formatting/binary/string_spec.rb +32 -0
- data/spec/{object_context/object_context_spec.rb → objectify/objectify_spec.rb} +5 -3
- data/spec/path_spec.rb +21 -23
- data/spec/translators/translator_spec.rb +38 -40
- data/spec/ui/command_line/param_parser_spec.rb +58 -0
- data/static/extension.rb +9 -0
- metadata +43 -24
- data/lib/ronin/context.rb +0 -236
- data/spec/context/context_spec.rb +0 -84
- data/spec/context/helpers/book_context.rb +0 -15
- data/spec/context/helpers/book_review_context.rb +0 -21
- data/spec/context/helpers/contexts/neuromancer_review.rb +0 -15
- data/spec/context/helpers/contexts/snow_crash.rb +0 -8
- data/static/extension.rb.erb +0 -16
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -21,37 +21,39 @@
|
|
|
21
21
|
#++
|
|
22
22
|
#
|
|
23
23
|
|
|
24
|
-
require 'ronin/exceptions/unknown_object_context'
|
|
25
|
-
require 'ronin/exceptions/object_context_not_found'
|
|
24
|
+
require 'ronin/objectify/exceptions/unknown_object_context'
|
|
25
|
+
require 'ronin/objectify/exceptions/object_context_not_found'
|
|
26
26
|
require 'ronin/extensions/meta'
|
|
27
|
-
require 'ronin/context'
|
|
28
27
|
require 'ronin/model'
|
|
29
28
|
|
|
29
|
+
require 'contextify'
|
|
30
30
|
require 'parameters'
|
|
31
31
|
|
|
32
32
|
module Ronin
|
|
33
|
-
module
|
|
33
|
+
module Objectify
|
|
34
34
|
include DataMapper::Types
|
|
35
35
|
|
|
36
36
|
def self.included(base)
|
|
37
|
-
base.
|
|
38
|
-
include
|
|
37
|
+
base.module_eval do
|
|
38
|
+
include Contextify
|
|
39
39
|
include Parameters
|
|
40
|
-
include Model
|
|
40
|
+
include Ronin::Model
|
|
41
41
|
|
|
42
|
-
#
|
|
43
|
-
property :object_path, String
|
|
42
|
+
# Path to the object context
|
|
43
|
+
property :object_path, String
|
|
44
44
|
|
|
45
|
-
#
|
|
45
|
+
# Modification timestamp of the object context
|
|
46
46
|
property :object_timestamp, EpochTime
|
|
47
47
|
|
|
48
48
|
metaclass_def(:objectify) do |name|
|
|
49
|
-
|
|
49
|
+
name = name.to_s
|
|
50
50
|
|
|
51
|
-
contextify name
|
|
51
|
+
self.contextify name
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
Objectify.object_contexts[name] = self
|
|
54
|
+
|
|
55
|
+
meta_def(:load_object) do |path,*attributes|
|
|
56
|
+
Objectify.load_object(self.context_name,path,*attributes)
|
|
55
57
|
end
|
|
56
58
|
|
|
57
59
|
meta_def(:cache) do |path,*args|
|
|
@@ -70,10 +72,10 @@ module Ronin
|
|
|
70
72
|
end
|
|
71
73
|
|
|
72
74
|
meta_def(:search) do |*attribs|
|
|
73
|
-
all(*attribs).map { |obj| obj.
|
|
75
|
+
all(*attribs).map { |obj| obj.load_object }
|
|
74
76
|
end
|
|
75
77
|
|
|
76
|
-
# define
|
|
78
|
+
# define Ronin-level object loader method
|
|
77
79
|
Ronin.module_eval %{
|
|
78
80
|
def ronin_load_#{name}(path,*args,&block)
|
|
79
81
|
new_obj = #{self}.load_object(path,*args)
|
|
@@ -89,7 +91,7 @@ module Ronin
|
|
|
89
91
|
#
|
|
90
92
|
# Returns the Hash of all defined object-contexts.
|
|
91
93
|
#
|
|
92
|
-
def
|
|
94
|
+
def Objectify.object_contexts
|
|
93
95
|
@@ronin_object_contexts ||= {}
|
|
94
96
|
end
|
|
95
97
|
|
|
@@ -97,23 +99,24 @@ module Ronin
|
|
|
97
99
|
# Returns +true+ if there is an object-context defined with the
|
|
98
100
|
# specified _name_, returns +false+ otherwise.
|
|
99
101
|
#
|
|
100
|
-
def
|
|
101
|
-
|
|
102
|
+
def Objectify.is_object_context?(name)
|
|
103
|
+
Objectify.object_contexts.has_key?(name.to_sym)
|
|
102
104
|
end
|
|
103
105
|
|
|
104
106
|
#
|
|
105
107
|
# Loads the object context of the specified _name_ and from the
|
|
106
|
-
# specified _path_ with the given
|
|
107
|
-
# defined with the specified _name_, an UnknownObjectContext
|
|
108
|
+
# specified _path_ with the given _attributes_. If no object contexts
|
|
109
|
+
# were defined with the specified _name_, an UnknownObjectContext
|
|
108
110
|
# exception will be raised.
|
|
109
111
|
#
|
|
110
|
-
#
|
|
112
|
+
# Objectify.load_object(:note,'/path/to/my_notes.rb')
|
|
113
|
+
# # => #<Note:...>
|
|
111
114
|
#
|
|
112
|
-
def
|
|
113
|
-
name = name.
|
|
115
|
+
def Objectify.load_object(name,path,*attributes,&block)
|
|
116
|
+
name = name.to_s
|
|
114
117
|
|
|
115
|
-
unless
|
|
116
|
-
raise(UnknownObjectContext,"unknown object context
|
|
118
|
+
unless Objectify.is_object_context?(name)
|
|
119
|
+
raise(UnknownObjectContext,"unknown object context #{name.dump}",caller)
|
|
117
120
|
end
|
|
118
121
|
|
|
119
122
|
path = File.expand_path(path)
|
|
@@ -122,7 +125,7 @@ module Ronin
|
|
|
122
125
|
raise(ObjectContextNotFound,"object context #{path.dump} does not exist",caller)
|
|
123
126
|
end
|
|
124
127
|
|
|
125
|
-
new_obj =
|
|
128
|
+
new_obj = Contextify.load_context(name,path,*attributes)
|
|
126
129
|
new_obj.object_path = path
|
|
127
130
|
|
|
128
131
|
block.call(new_obj) if block
|
|
@@ -134,16 +137,16 @@ module Ronin
|
|
|
134
137
|
# +Array+ of loaded object contexts. If a _block_ is given, it will
|
|
135
138
|
# be passed each loaded object context.
|
|
136
139
|
#
|
|
137
|
-
#
|
|
140
|
+
# Objectify.load_contexts('/path/to/misc_contexts.rb') # => [...]
|
|
138
141
|
#
|
|
139
|
-
def
|
|
142
|
+
def Objectify.load_objects(path,&block)
|
|
140
143
|
path = File.expand_path(path)
|
|
141
144
|
|
|
142
145
|
unless File.file?(path)
|
|
143
146
|
raise(ObjectContextNotFound,"object context #{path.dump} does not exist",caller)
|
|
144
147
|
end
|
|
145
148
|
|
|
146
|
-
return
|
|
149
|
+
return Contextify.load_contexts(path) do |new_obj|
|
|
147
150
|
new_obj.object_path = path
|
|
148
151
|
|
|
149
152
|
block.call(new_obj) if block
|
|
@@ -153,8 +156,8 @@ module Ronin
|
|
|
153
156
|
#
|
|
154
157
|
# Cache all objects loaded from the specified _path_.
|
|
155
158
|
#
|
|
156
|
-
def
|
|
157
|
-
|
|
159
|
+
def Objectify.cache_objects(path)
|
|
160
|
+
Objectify.load_objects(path).each do |obj|
|
|
158
161
|
obj.cache
|
|
159
162
|
end
|
|
160
163
|
|
|
@@ -165,11 +168,11 @@ module Ronin
|
|
|
165
168
|
# Cache all objects loaded from the paths within the specified
|
|
166
169
|
# _directory_.
|
|
167
170
|
#
|
|
168
|
-
def
|
|
171
|
+
def Objectify.cache_objects_in(directory)
|
|
169
172
|
directory = File.expand_path(directory)
|
|
170
173
|
paths = Dir[File.join(directory,'**','*.rb')]
|
|
171
174
|
|
|
172
|
-
paths.each { |path|
|
|
175
|
+
paths.each { |path| Objectify.cache_objects(path) }
|
|
173
176
|
return nil
|
|
174
177
|
end
|
|
175
178
|
|
|
@@ -178,11 +181,11 @@ module Ronin
|
|
|
178
181
|
# the specified _directory_. Also cache objects which have yet to
|
|
179
182
|
# be cached.
|
|
180
183
|
#
|
|
181
|
-
def
|
|
184
|
+
def Objectify.mirror_objects_in(directory)
|
|
182
185
|
directory = File.expand_path(directory)
|
|
183
186
|
new_paths = Dir[File.join(directory,'**','*.rb')]
|
|
184
187
|
|
|
185
|
-
|
|
188
|
+
Objectify.object_contexts.each_value do |base|
|
|
186
189
|
objects = base.all(:object_path.like => "#{directory}%")
|
|
187
190
|
new_paths -= objects.map { |obj| obj.object_path }
|
|
188
191
|
|
|
@@ -191,17 +194,17 @@ module Ronin
|
|
|
191
194
|
end
|
|
192
195
|
|
|
193
196
|
# cache the remaining new paths
|
|
194
|
-
new_paths.each { |path|
|
|
197
|
+
new_paths.each { |path| Objectify.cache_objects(path) }
|
|
195
198
|
return nil
|
|
196
199
|
end
|
|
197
200
|
|
|
198
201
|
#
|
|
199
202
|
# Deletes all cached objects that existed in the specified _directory_.
|
|
200
203
|
#
|
|
201
|
-
def
|
|
204
|
+
def Objectify.expunge_objects_from(directory)
|
|
202
205
|
directory = File.expand_path(directory)
|
|
203
206
|
|
|
204
|
-
|
|
207
|
+
Objectify.object_contexts.each_value do |base|
|
|
205
208
|
base.all(:object_path.like => "#{directory}%").destroy!
|
|
206
209
|
end
|
|
207
210
|
|
|
@@ -209,11 +212,17 @@ module Ronin
|
|
|
209
212
|
end
|
|
210
213
|
|
|
211
214
|
#
|
|
212
|
-
#
|
|
213
|
-
#
|
|
215
|
+
# Loads a new object from the file pointed to by the +object_path+
|
|
216
|
+
# property.
|
|
214
217
|
#
|
|
215
|
-
def
|
|
216
|
-
|
|
218
|
+
def load_object
|
|
219
|
+
primary_keys = {}
|
|
220
|
+
|
|
221
|
+
key_properties.each do |prop|
|
|
222
|
+
primary_keys[prop.name] = attribute_get(prop.name)
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
new_obj = self.class.load_object(self.object_path,primary_keys)
|
|
217
226
|
end
|
|
218
227
|
|
|
219
228
|
#
|
|
@@ -267,7 +276,7 @@ module Ronin
|
|
|
267
276
|
else
|
|
268
277
|
if (!(dirty?) && stale?)
|
|
269
278
|
destroy
|
|
270
|
-
return
|
|
279
|
+
return load_object.cache
|
|
271
280
|
end
|
|
272
281
|
end
|
|
273
282
|
end
|
data/lib/ronin/path.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
data/lib/ronin/platform.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -23,12 +23,14 @@
|
|
|
23
23
|
|
|
24
24
|
require 'ronin/model'
|
|
25
25
|
require 'ronin/extensions/meta'
|
|
26
|
+
require 'ronin/extensions/string'
|
|
26
27
|
|
|
27
28
|
module Ronin
|
|
28
29
|
class Platform
|
|
29
30
|
|
|
30
31
|
include Model
|
|
31
32
|
|
|
33
|
+
# Primary key
|
|
32
34
|
property :id, Serial
|
|
33
35
|
|
|
34
36
|
# Name of the Operating System
|
data/lib/ronin/product.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -30,6 +30,7 @@ module Ronin
|
|
|
30
30
|
|
|
31
31
|
include Model
|
|
32
32
|
|
|
33
|
+
# Primary key
|
|
33
34
|
property :id, Serial
|
|
34
35
|
|
|
35
36
|
# Name
|
data/lib/ronin/ronin.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -21,22 +21,22 @@
|
|
|
21
21
|
#++
|
|
22
22
|
#
|
|
23
23
|
|
|
24
|
-
require 'ronin/
|
|
25
|
-
require 'ronin/console'
|
|
24
|
+
require 'ronin/objectify'
|
|
25
|
+
require 'ronin/ui/console'
|
|
26
26
|
|
|
27
27
|
module Ronin
|
|
28
28
|
#
|
|
29
|
-
# See
|
|
29
|
+
# See Objectify.load_objects.
|
|
30
30
|
#
|
|
31
|
-
def Ronin.
|
|
32
|
-
|
|
31
|
+
def Ronin.load_objects(path)
|
|
32
|
+
Objectify.load_objects(path)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
#
|
|
36
|
-
# See
|
|
36
|
+
# See Objectify.load_object.
|
|
37
37
|
#
|
|
38
|
-
def Ronin.
|
|
39
|
-
|
|
38
|
+
def Ronin.load_object(type,path)
|
|
39
|
+
Objectify.load_object(type,path)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
#
|
|
@@ -44,6 +44,6 @@ module Ronin
|
|
|
44
44
|
# it will be ran within the console.
|
|
45
45
|
#
|
|
46
46
|
def Ronin.console(script=nil,&block)
|
|
47
|
-
Console.start(script,&block)
|
|
47
|
+
UI::Console.start(script,&block)
|
|
48
48
|
end
|
|
49
49
|
end
|
data/lib/ronin/rpc.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
data/lib/ronin/rpc/call.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
data/lib/ronin/rpc/client.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
data/lib/ronin/rpc/console.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
data/lib/ronin/rpc/exceptions.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
data/lib/ronin/rpc/response.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
data/lib/ronin/rpc/service.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
data/lib/ronin/rpc/shell.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
data/lib/ronin/sessions.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A Ruby platform designed for information security and data
|
|
4
4
|
# exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
data/lib/ronin/sessions/esmtp.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Ronin - A ruby development platform designed for information security
|
|
4
4
|
# and data exploration tasks.
|
|
5
5
|
#
|
|
6
|
-
# Copyright (c) 2006-
|
|
6
|
+
# Copyright (c) 2006-2009 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
7
7
|
#
|
|
8
8
|
# This program is free software; you can redistribute it and/or modify
|
|
9
9
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -30,8 +30,8 @@ module Ronin
|
|
|
30
30
|
include Session
|
|
31
31
|
|
|
32
32
|
setup_session do
|
|
33
|
-
parameter :
|
|
34
|
-
parameter :
|
|
33
|
+
parameter :host, :description => 'ESMTP host'
|
|
34
|
+
parameter :port, :description => 'ESMTP port'
|
|
35
35
|
|
|
36
36
|
parameter :esmtp_login, :description => 'ESMTP login'
|
|
37
37
|
parameter :esmtp_user, :description => 'ESMTP user'
|
|
@@ -45,16 +45,14 @@ module Ronin
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
def esmtp_connect(options={},&block)
|
|
48
|
-
|
|
49
|
-
raise(ParamNotFound,"Missing parameter #{describe_param(:esmtp_host).dump}",caller)
|
|
50
|
-
end
|
|
48
|
+
require_params :host
|
|
51
49
|
|
|
52
|
-
options[:port] ||= @
|
|
50
|
+
options[:port] ||= @port
|
|
53
51
|
options[:login] ||= @esmtp_login
|
|
54
52
|
options[:user] ||= @esmtp_user
|
|
55
53
|
options[:password] ||= @esmtp_password
|
|
56
54
|
|
|
57
|
-
return ::Net.esmtp_connect(@
|
|
55
|
+
return ::Net.esmtp_connect(@host,options,&block)
|
|
58
56
|
end
|
|
59
57
|
|
|
60
58
|
def esmtp_session(options={},&block)
|