ronin 1.1.0.rc2 → 1.1.0.rc3
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/ChangeLog.md +5 -0
- data/gemspec.yml +1 -1
- data/lib/ronin/campaign.rb +2 -2
- data/lib/ronin/email_address.rb +3 -3
- data/lib/ronin/host_name.rb +2 -2
- data/lib/ronin/ip_address.rb +3 -3
- data/lib/ronin/model/has_license/class_methods.rb +9 -9
- data/lib/ronin/ronin.rb +19 -0
- data/lib/ronin/script/script.rb +10 -3
- data/lib/ronin/ui/cli/command.rb +9 -10
- data/lib/ronin/ui/cli/commands/console.rb +2 -2
- data/lib/ronin/ui/console.rb +2 -2
- data/lib/ronin/ui/output/output.rb +6 -1
- data/lib/ronin/url.rb +6 -6
- data/lib/ronin/version.rb +1 -1
- metadata +3 -3
data/ChangeLog.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Require data_paths ~> 0.3.
|
|
5
5
|
* Require ronin-support ~> 0.2.
|
|
6
6
|
* Added `ronin/repositories`, for quickly loading all repositories.
|
|
7
|
+
* Added {Ronin#script}.
|
|
7
8
|
* Added {Ronin::AutoLoad}.
|
|
8
9
|
* Added {Ronin::Arch.arm}.
|
|
9
10
|
* Added {Ronin::Arch.mips}.
|
|
@@ -54,6 +55,9 @@
|
|
|
54
55
|
* Set the length of {Ronin::License.url} to 256.
|
|
55
56
|
* Merged `Ronin::Model::Cacheable` into {Ronin::Script}.
|
|
56
57
|
* Repositories can now cache/load scripts from the `scripts/` directory.
|
|
58
|
+
* Disable {Ronin::UI::Console.short_errors} if the `VERBOSE` environment
|
|
59
|
+
variable is set.
|
|
60
|
+
* Disable {Ronin::UI::Console.color} if the `STDOUT` is a tty.
|
|
57
61
|
* Set {Ronin::UI::Output.handler} to {Ronin::UI::Output::Terminal::Raw},
|
|
58
62
|
when `STDOUT` is not a tty.
|
|
59
63
|
* {Ronin::UI::CLI::ModelCommand#setup} now automatically calls
|
|
@@ -61,6 +65,7 @@
|
|
|
61
65
|
* Merged `query_method` into {Ronin::UI::CLI::ModelCommand#query}.
|
|
62
66
|
* Allow {Ronin::UI::CLI::ModelCommand.query_option} to map to Model
|
|
63
67
|
properties.
|
|
68
|
+
* Use DataMapper query-paths to improve performance of query-helper methods.
|
|
64
69
|
|
|
65
70
|
### 1.0.0 / 2011-03-25
|
|
66
71
|
|
data/gemspec.yml
CHANGED
data/lib/ronin/campaign.rb
CHANGED
|
@@ -64,7 +64,7 @@ module Ronin
|
|
|
64
64
|
# @api public
|
|
65
65
|
#
|
|
66
66
|
def self.targeting(addr)
|
|
67
|
-
all(
|
|
67
|
+
all('addresses.address' => addr)
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
#
|
|
@@ -81,7 +81,7 @@ module Ronin
|
|
|
81
81
|
# @api public
|
|
82
82
|
#
|
|
83
83
|
def self.targeting_orgs(names)
|
|
84
|
-
all(
|
|
84
|
+
all('organizations.name' => names)
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
#
|
data/lib/ronin/email_address.rb
CHANGED
|
@@ -67,7 +67,7 @@ module Ronin
|
|
|
67
67
|
# @api public
|
|
68
68
|
#
|
|
69
69
|
def self.with_hosts(names)
|
|
70
|
-
all(
|
|
70
|
+
all('host_name.address' => names)
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
#
|
|
@@ -84,7 +84,7 @@ module Ronin
|
|
|
84
84
|
# @api public
|
|
85
85
|
#
|
|
86
86
|
def self.with_ips(ips)
|
|
87
|
-
all(
|
|
87
|
+
all('ip_addresses.address' => ips)
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
#
|
|
@@ -101,7 +101,7 @@ module Ronin
|
|
|
101
101
|
# @api public
|
|
102
102
|
#
|
|
103
103
|
def self.with_users(names)
|
|
104
|
-
all(
|
|
104
|
+
all('user_name.name' => names)
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
#
|
data/lib/ronin/host_name.rb
CHANGED
|
@@ -68,7 +68,7 @@ module Ronin
|
|
|
68
68
|
# @api public
|
|
69
69
|
#
|
|
70
70
|
def self.with_ips(ips)
|
|
71
|
-
all(
|
|
71
|
+
all('ip_addresses.address' => ips)
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
#
|
|
@@ -85,7 +85,7 @@ module Ronin
|
|
|
85
85
|
# @api public
|
|
86
86
|
#
|
|
87
87
|
def self.with_ports(numbers)
|
|
88
|
-
all(
|
|
88
|
+
all('ports.number' => numbers)
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
#
|
data/lib/ronin/ip_address.rb
CHANGED
|
@@ -117,7 +117,7 @@ module Ronin
|
|
|
117
117
|
# @api public
|
|
118
118
|
#
|
|
119
119
|
def self.with_macs(macs)
|
|
120
|
-
all(
|
|
120
|
+
all('mac_addresses.address' => macs)
|
|
121
121
|
end
|
|
122
122
|
|
|
123
123
|
#
|
|
@@ -134,7 +134,7 @@ module Ronin
|
|
|
134
134
|
# @api public
|
|
135
135
|
#
|
|
136
136
|
def self.with_hosts(names)
|
|
137
|
-
all(
|
|
137
|
+
all('host_names.address' => names)
|
|
138
138
|
end
|
|
139
139
|
|
|
140
140
|
#
|
|
@@ -151,7 +151,7 @@ module Ronin
|
|
|
151
151
|
# @api public
|
|
152
152
|
#
|
|
153
153
|
def self.with_ports(numbers)
|
|
154
|
-
all(
|
|
154
|
+
all('ports.number' => numbers)
|
|
155
155
|
end
|
|
156
156
|
|
|
157
157
|
#
|
|
@@ -51,16 +51,16 @@ module Ronin
|
|
|
51
51
|
# @api public
|
|
52
52
|
#
|
|
53
53
|
def licensed_under(license)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
query = case license
|
|
55
|
+
when License
|
|
56
|
+
{:license => license}
|
|
57
|
+
when Symbol
|
|
58
|
+
{:license => License.predefined_resource(license)}
|
|
59
|
+
else
|
|
60
|
+
{'license.name' => license.to_s}
|
|
61
|
+
end
|
|
62
62
|
|
|
63
|
-
all(
|
|
63
|
+
all(query)
|
|
64
64
|
end
|
|
65
65
|
end
|
|
66
66
|
end
|
data/lib/ronin/ronin.rb
CHANGED
|
@@ -36,4 +36,23 @@ module Ronin
|
|
|
36
36
|
def self.included(base)
|
|
37
37
|
base.send :extend, ClassMethods
|
|
38
38
|
end
|
|
39
|
+
|
|
40
|
+
#
|
|
41
|
+
# Convenience method for loading Ronin {Script}s.
|
|
42
|
+
#
|
|
43
|
+
# @param [String] path
|
|
44
|
+
# The path to the file.
|
|
45
|
+
#
|
|
46
|
+
# @return [Script]
|
|
47
|
+
# The loaded script.
|
|
48
|
+
#
|
|
49
|
+
# @see Script.load_from
|
|
50
|
+
#
|
|
51
|
+
# @since 1.1.0
|
|
52
|
+
#
|
|
53
|
+
# @api public
|
|
54
|
+
#
|
|
55
|
+
def script(path)
|
|
56
|
+
Script.load_from(path)
|
|
57
|
+
end
|
|
39
58
|
end
|
data/lib/ronin/script/script.rb
CHANGED
|
@@ -33,6 +33,15 @@ require 'data_paths/finders'
|
|
|
33
33
|
require 'parameters'
|
|
34
34
|
|
|
35
35
|
module Ronin
|
|
36
|
+
#
|
|
37
|
+
# {Script} is a high-level module that enables a Class to load
|
|
38
|
+
# instances from files and cache them into the {Database}.
|
|
39
|
+
# Classes that include {Script}, may also include Script sub-modules
|
|
40
|
+
# that define behaviors of the Script Class:
|
|
41
|
+
#
|
|
42
|
+
# * {Buildable}
|
|
43
|
+
# * {Testable}
|
|
44
|
+
# * {Deployable}
|
|
36
45
|
#
|
|
37
46
|
# @since 1.1.0
|
|
38
47
|
#
|
|
@@ -90,11 +99,9 @@ module Ronin
|
|
|
90
99
|
# @return [Script]
|
|
91
100
|
# The loaded script.
|
|
92
101
|
#
|
|
93
|
-
# @see Cacheable.load_from
|
|
94
|
-
#
|
|
95
102
|
# @since 1.1.0
|
|
96
103
|
#
|
|
97
|
-
# @api
|
|
104
|
+
# @api semipublic
|
|
98
105
|
#
|
|
99
106
|
def Script.load_from(path)
|
|
100
107
|
path = File.expand_path(path)
|
data/lib/ronin/ui/cli/command.rb
CHANGED
|
@@ -126,7 +126,6 @@ module Ronin
|
|
|
126
126
|
:aliases => '-Q'
|
|
127
127
|
|
|
128
128
|
class_option :color, :type => :boolean, :default => true
|
|
129
|
-
class_option :no_color, :type => :boolean, :default => false
|
|
130
129
|
|
|
131
130
|
#
|
|
132
131
|
# Sets the namespace of a new {Command} class.
|
|
@@ -225,15 +224,15 @@ module Ronin
|
|
|
225
224
|
# @api semipublic
|
|
226
225
|
#
|
|
227
226
|
def setup
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
if self.options.
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
227
|
+
Output.verbose! if self.options.verbose?
|
|
228
|
+
Output.quiet! if self.options.quiet?
|
|
229
|
+
Output.silent! if self.options.silent?
|
|
230
|
+
|
|
231
|
+
Output.handler = if self.options.color?
|
|
232
|
+
Output::Terminal::Color
|
|
233
|
+
else
|
|
234
|
+
Output::Terminal::Raw
|
|
235
|
+
end
|
|
237
236
|
end
|
|
238
237
|
|
|
239
238
|
#
|
|
@@ -51,8 +51,8 @@ module Ronin
|
|
|
51
51
|
return
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
-
UI::Console.color =
|
|
55
|
-
UI::Console.short_errors =
|
|
54
|
+
UI::Console.color = !(options.color?)
|
|
55
|
+
UI::Console.short_errors = !(options.backtrace?)
|
|
56
56
|
|
|
57
57
|
options[:require].each do |path|
|
|
58
58
|
UI::Console.auto_load << path
|
data/lib/ronin/ui/console.rb
CHANGED
|
@@ -31,8 +31,8 @@ module Ronin
|
|
|
31
31
|
# The history file for the Console session
|
|
32
32
|
HISTORY_FILE = File.join(Config::PATH,'console.log')
|
|
33
33
|
|
|
34
|
-
@@color =
|
|
35
|
-
@@short_errors =
|
|
34
|
+
@@color = !(STDOUT.tty?)
|
|
35
|
+
@@short_errors = !(ENV.has_key?('VERBOSE'))
|
|
36
36
|
@@auto_load = []
|
|
37
37
|
@@setup_blocks = []
|
|
38
38
|
|
data/lib/ronin/url.rb
CHANGED
|
@@ -87,7 +87,7 @@ module Ronin
|
|
|
87
87
|
# @api public
|
|
88
88
|
#
|
|
89
89
|
def self.http
|
|
90
|
-
all(
|
|
90
|
+
all('scheme.name' => 'http')
|
|
91
91
|
end
|
|
92
92
|
|
|
93
93
|
#
|
|
@@ -101,7 +101,7 @@ module Ronin
|
|
|
101
101
|
# @api public
|
|
102
102
|
#
|
|
103
103
|
def self.https
|
|
104
|
-
all(
|
|
104
|
+
all('scheme.name' => 'https')
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
#
|
|
@@ -118,7 +118,7 @@ module Ronin
|
|
|
118
118
|
# @api public
|
|
119
119
|
#
|
|
120
120
|
def self.hosts(names)
|
|
121
|
-
all(
|
|
121
|
+
all('host.address' => names)
|
|
122
122
|
end
|
|
123
123
|
|
|
124
124
|
#
|
|
@@ -135,7 +135,7 @@ module Ronin
|
|
|
135
135
|
# @api public
|
|
136
136
|
#
|
|
137
137
|
def self.ports(numbers)
|
|
138
|
-
all(
|
|
138
|
+
all('port.number' => numbers)
|
|
139
139
|
end
|
|
140
140
|
|
|
141
141
|
#
|
|
@@ -186,7 +186,7 @@ module Ronin
|
|
|
186
186
|
# @api public
|
|
187
187
|
#
|
|
188
188
|
def self.query_param(name)
|
|
189
|
-
all(
|
|
189
|
+
all('query_params.name' => name)
|
|
190
190
|
end
|
|
191
191
|
|
|
192
192
|
#
|
|
@@ -203,7 +203,7 @@ module Ronin
|
|
|
203
203
|
# @api public
|
|
204
204
|
#
|
|
205
205
|
def self.query_value(value)
|
|
206
|
-
all(
|
|
206
|
+
all('query_params.value' => value)
|
|
207
207
|
end
|
|
208
208
|
|
|
209
209
|
#
|
data/lib/ronin/version.rb
CHANGED
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: ronin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: 6
|
|
5
|
-
version: 1.1.0.
|
|
5
|
+
version: 1.1.0.rc3
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Postmodern
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-
|
|
13
|
+
date: 2011-06-07 00:00:00 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: dm-sqlite-adapter
|
|
@@ -284,7 +284,7 @@ dependencies:
|
|
|
284
284
|
requirements:
|
|
285
285
|
- - ~>
|
|
286
286
|
- !ruby/object:Gem::Version
|
|
287
|
-
version: 0.2.0.
|
|
287
|
+
version: 0.2.0.rc2
|
|
288
288
|
type: :runtime
|
|
289
289
|
prerelease: false
|
|
290
290
|
version_requirements: *id024
|