ronin 1.0.0.pre4 → 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemtest +0 -0
- data/ChangeLog.md +1 -0
- data/Gemfile +3 -1
- data/README.md +17 -19
- data/Rakefile +1 -0
- data/gemspec.yml +2 -1
- data/lib/ronin.rb +3 -0
- data/lib/ronin/address.rb +7 -3
- data/lib/ronin/arch.rb +2 -2
- data/lib/ronin/bootstrap.rb +3 -0
- data/lib/ronin/cached_file.rb +1 -1
- data/lib/ronin/campaign.rb +3 -32
- data/lib/ronin/class_methods.rb +17 -0
- data/lib/ronin/config.rb +25 -24
- data/lib/ronin/credential.rb +3 -0
- data/lib/ronin/database/migrations.rb +0 -1
- data/lib/ronin/database/migrations/create_credentials_table.rb +1 -2
- data/lib/ronin/database/migrations/graph.rb +6 -3
- data/lib/ronin/database/migrations/migration.rb +3 -0
- data/lib/ronin/database/migrations/migrations.rb +2 -2
- data/lib/ronin/email_address.rb +3 -0
- data/lib/ronin/engine/buildable.rb +3 -0
- data/lib/ronin/engine/class_methods.rb +3 -0
- data/lib/ronin/engine/deployable.rb +3 -0
- data/lib/ronin/engine/engine.rb +14 -0
- data/lib/ronin/engine/instance_methods.rb +3 -0
- data/lib/ronin/engine/verifiable.rb +3 -0
- data/lib/ronin/environment.rb +6 -0
- data/lib/ronin/host_name.rb +3 -0
- data/lib/ronin/host_name_ip_address.rb +3 -0
- data/lib/ronin/ip_address.rb +3 -0
- data/lib/ronin/ip_address_mac_address.rb +3 -0
- data/lib/ronin/license.rb +1 -1
- data/lib/ronin/mac_address.rb +3 -0
- data/lib/ronin/model/cacheable/cacheable.rb +1 -1
- data/lib/ronin/model/class_methods.rb +3 -0
- data/lib/ronin/model/has_authors/class_methods.rb +4 -0
- data/lib/ronin/model/has_authors/has_authors.rb +9 -5
- data/lib/ronin/model/has_description/class_methods.rb +4 -0
- data/lib/ronin/model/has_description/has_description.rb +6 -0
- data/lib/ronin/model/has_license/class_methods.rb +4 -0
- data/lib/ronin/model/has_license/has_license.rb +9 -5
- data/lib/ronin/model/has_name/class_methods.rb +4 -0
- data/lib/ronin/model/has_name/has_name.rb +6 -0
- data/lib/ronin/model/has_title/class_methods.rb +4 -0
- data/lib/ronin/model/has_title/has_title.rb +6 -0
- data/lib/ronin/model/has_unique_name.rb +7 -0
- data/lib/ronin/model/has_version/class_methods.rb +4 -0
- data/lib/ronin/model/has_version/has_version.rb +6 -0
- data/lib/ronin/model/model.rb +7 -0
- data/lib/ronin/model/types/description.rb +7 -2
- data/lib/ronin/open_port.rb +3 -0
- data/lib/ronin/organization.rb +3 -0
- data/lib/ronin/os.rb +2 -2
- data/lib/ronin/os_guess.rb +3 -0
- data/lib/ronin/password.rb +4 -1
- data/lib/ronin/port.rb +6 -1
- data/lib/ronin/ronin.rb +8 -0
- data/lib/ronin/service.rb +3 -0
- data/lib/ronin/service_credential.rb +3 -0
- data/lib/ronin/target.rb +3 -4
- data/lib/ronin/tcp_port.rb +4 -1
- data/lib/ronin/udp_port.rb +4 -1
- data/lib/ronin/ui/cli/cli.rb +1 -1
- data/lib/ronin/ui/cli/command.rb +6 -0
- data/lib/ronin/ui/cli/commands/repos.rb +33 -0
- data/lib/ronin/ui/cli/engine_command.rb +3 -0
- data/lib/ronin/ui/cli/model_command.rb +3 -0
- data/lib/ronin/ui/console.rb +5 -1
- data/lib/ronin/ui/hexdump/hexdump.rb +3 -0
- data/lib/ronin/ui/output/helpers.rb +59 -26
- data/lib/ronin/ui/output/output.rb +3 -0
- data/lib/ronin/ui/output/terminal/color.rb +32 -20
- data/lib/ronin/ui/output/terminal/raw.rb +23 -20
- data/lib/ronin/ui/shell.rb +3 -0
- data/lib/ronin/url.rb +8 -5
- data/lib/ronin/url_query_param.rb +3 -0
- data/lib/ronin/url_scheme.rb +3 -0
- data/lib/ronin/user_name.rb +4 -1
- data/lib/ronin/vendor.rb +1 -1
- data/lib/ronin/version.rb +1 -1
- data/lib/ronin/web_credential.rb +4 -1
- data/ronin.gemspec +7 -2
- data/spec/campaign_spec.rb +0 -25
- data/spec/url_spec.rb +5 -2
- metadata +48 -36
- data/lib/ronin/database/migrations/create_remote_files_table.rb +0 -52
- data/lib/ronin/proxy.rb +0 -178
- data/lib/ronin/proxy_credential.rb +0 -29
- data/lib/ronin/remote_file.rb +0 -152
@@ -142,7 +142,7 @@ module Ronin
|
|
142
142
|
# The database was successfully migrated up.
|
143
143
|
#
|
144
144
|
# @raise [UnknownMigration]
|
145
|
-
# A migration had a
|
145
|
+
# A migration had a dependency on an unknown migration.
|
146
146
|
#
|
147
147
|
# @since 1.0.1
|
148
148
|
#
|
@@ -167,7 +167,7 @@ module Ronin
|
|
167
167
|
# The database was successfully migrated down.
|
168
168
|
#
|
169
169
|
# @raise [UnknownMigration]
|
170
|
-
# A migration had a
|
170
|
+
# A migration had a dependency on an unknown migration.
|
171
171
|
#
|
172
172
|
# @since 1.0.1
|
173
173
|
#
|
data/lib/ronin/email_address.rb
CHANGED
data/lib/ronin/engine/engine.rb
CHANGED
@@ -34,6 +34,20 @@ module Ronin
|
|
34
34
|
module Engine
|
35
35
|
include UI::Output::Helpers
|
36
36
|
|
37
|
+
#
|
38
|
+
# Adds the following to the Class.
|
39
|
+
#
|
40
|
+
# * {Engine::InstanceMethods}
|
41
|
+
# * {Model}
|
42
|
+
# * {Model::HasName}
|
43
|
+
# * {Model::HasDescription}
|
44
|
+
# * {Model::HasVersion}
|
45
|
+
# * {Model::HasLicense}
|
46
|
+
# * {Model::HasAuthors}
|
47
|
+
# * {Model::Cacheable}
|
48
|
+
# * [Parameters](http://rubydoc.info/gems/parameters)
|
49
|
+
# * {ClassMethods}
|
50
|
+
#
|
37
51
|
def self.included(base)
|
38
52
|
base.send :include, Engine::InstanceMethods,
|
39
53
|
Model,
|
data/lib/ronin/environment.rb
CHANGED
@@ -17,6 +17,9 @@
|
|
17
17
|
# along with Ronin. If not, see <http://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
|
+
#
|
21
|
+
# Loads all extensions to core Ruby classes.
|
22
|
+
#
|
20
23
|
require 'ronin/ronin'
|
21
24
|
require 'ronin/extensions'
|
22
25
|
require 'ronin/formatting/extensions'
|
@@ -26,5 +29,8 @@ require 'ronin/ui/output/helpers'
|
|
26
29
|
|
27
30
|
require 'chars/extensions'
|
28
31
|
|
32
|
+
#
|
33
|
+
# Includes the Ronin namespace and output helper methods.
|
34
|
+
#
|
29
35
|
include Ronin
|
30
36
|
include Ronin::UI::Output::Helpers
|
data/lib/ronin/host_name.rb
CHANGED
data/lib/ronin/ip_address.rb
CHANGED
data/lib/ronin/license.rb
CHANGED
@@ -111,7 +111,7 @@ module Ronin
|
|
111
111
|
:description => 'GNU Lesser General Public License v3.0',
|
112
112
|
:url => 'http://www.gnu.org/licenses/lgpl-3.0.txt'
|
113
113
|
|
114
|
-
# The MIT "as-is"
|
114
|
+
# The MIT "as-is" License
|
115
115
|
predefine :mit,
|
116
116
|
:name => 'MIT',
|
117
117
|
:description => 'The MIT Licence',
|
data/lib/ronin/mac_address.rb
CHANGED
@@ -24,22 +24,26 @@ require 'ronin/author'
|
|
24
24
|
module Ronin
|
25
25
|
module Model
|
26
26
|
#
|
27
|
-
# Adds an `authors`
|
28
|
-
# model.
|
27
|
+
# Adds an `authors` relationship between a model and the {Author} model.
|
29
28
|
#
|
30
29
|
module HasAuthors
|
30
|
+
#
|
31
|
+
# Adds the `authors` relationship and {ClassMethods} to the model.
|
32
|
+
#
|
33
|
+
# @param [Class] base
|
34
|
+
# The model.
|
35
|
+
#
|
31
36
|
def self.included(base)
|
32
37
|
base.send :include, Model
|
33
38
|
base.send :extend, ClassMethods
|
34
39
|
|
35
40
|
base.module_eval do
|
36
41
|
# The authors associated with the model.
|
37
|
-
has 0..n, :authors, :through => DataMapper::Resource
|
38
|
-
:model => 'Ronin::Author'
|
42
|
+
has 0..n, :authors, Ronin::Author, :through => DataMapper::Resource
|
39
43
|
|
40
44
|
Ronin::Author.has 0..n, self.relationship_name,
|
41
45
|
:through => DataMapper::Resource,
|
42
|
-
:model => self
|
46
|
+
:model => self
|
43
47
|
end
|
44
48
|
end
|
45
49
|
|
@@ -27,6 +27,12 @@ module Ronin
|
|
27
27
|
# Adds a `description` property to a model.
|
28
28
|
#
|
29
29
|
module HasDescription
|
30
|
+
#
|
31
|
+
# Adds the `description` property and {ClassMethods} to the model.
|
32
|
+
#
|
33
|
+
# @param [Class] base
|
34
|
+
# The model.
|
35
|
+
#
|
30
36
|
def self.included(base)
|
31
37
|
base.send :include, Model
|
32
38
|
base.send :extend, ClassMethods
|
@@ -24,21 +24,25 @@ require 'ronin/license'
|
|
24
24
|
module Ronin
|
25
25
|
module Model
|
26
26
|
#
|
27
|
-
# Adds a `license`
|
27
|
+
# Adds a `license` relationship between a model and the {License} model.
|
28
28
|
#
|
29
29
|
module HasLicense
|
30
|
+
#
|
31
|
+
# Adds the `license` relationship and {ClassMethods} to the model.
|
32
|
+
#
|
33
|
+
# @param [Class] base
|
34
|
+
# The model.
|
35
|
+
#
|
30
36
|
def self.included(base)
|
31
37
|
base.send :include, Model
|
32
38
|
base.send :extend, ClassMethods
|
33
39
|
|
34
40
|
base.module_eval do
|
35
41
|
# The license
|
36
|
-
belongs_to :license, :required => false
|
37
|
-
:model => 'Ronin::License'
|
42
|
+
belongs_to :license, Ronin::License, :required => false
|
38
43
|
|
44
|
+
Ronin::License.has 0..n, self.relationship_name, :model => self
|
39
45
|
end
|
40
|
-
|
41
|
-
License.has License.n, base.relationship_name, :model => base.name
|
42
46
|
end
|
43
47
|
|
44
48
|
#
|
@@ -26,6 +26,12 @@ module Ronin
|
|
26
26
|
# Adds a `name` property to a model.
|
27
27
|
#
|
28
28
|
module HasName
|
29
|
+
#
|
30
|
+
# Adds the `name` property and {ClassMethods} to the model.
|
31
|
+
#
|
32
|
+
# @param [Class] base
|
33
|
+
# The model.
|
34
|
+
#
|
29
35
|
def self.included(base)
|
30
36
|
base.send :include, Model
|
31
37
|
base.send :extend, ClassMethods
|
@@ -26,6 +26,12 @@ module Ronin
|
|
26
26
|
# Adds a `title` property to a model.
|
27
27
|
#
|
28
28
|
module HasTitle
|
29
|
+
#
|
30
|
+
# Adds the `title` property and {ClassMethods} to the model.
|
31
|
+
#
|
32
|
+
# @param [Class] base
|
33
|
+
# The model.
|
34
|
+
#
|
29
35
|
def self.included(base)
|
30
36
|
base.send :include, Model
|
31
37
|
base.send :extend, ClassMethods
|
@@ -25,6 +25,13 @@ module Ronin
|
|
25
25
|
# Adds a unique `name` property to a model.
|
26
26
|
#
|
27
27
|
module HasUniqueName
|
28
|
+
#
|
29
|
+
# Adds the unique `name` property and {HasName::ClassMethods} to the
|
30
|
+
# model.
|
31
|
+
#
|
32
|
+
# @param [Class] base
|
33
|
+
# The model.
|
34
|
+
#
|
28
35
|
def self.included(base)
|
29
36
|
base.send :include, Model
|
30
37
|
base.send :extend, HasName::ClassMethods
|
@@ -26,6 +26,12 @@ module Ronin
|
|
26
26
|
# Adds a `version` property to a model.
|
27
27
|
#
|
28
28
|
module HasVersion
|
29
|
+
#
|
30
|
+
# Adds the `version` property and {ClassMethods} to the model.
|
31
|
+
#
|
32
|
+
# @param [Class] base
|
33
|
+
# The model.
|
34
|
+
#
|
29
35
|
def self.included(base)
|
30
36
|
base.send :include, Model
|
31
37
|
base.send :extend, ClassMethods
|
data/lib/ronin/model/model.rb
CHANGED
@@ -36,6 +36,13 @@ module Ronin
|
|
36
36
|
module Model
|
37
37
|
include Model::Types
|
38
38
|
|
39
|
+
#
|
40
|
+
# Sets up a class as a DataMapper model that can be used with the
|
41
|
+
# {Database}. Also adds {ClassMethods} to the new model.
|
42
|
+
#
|
43
|
+
# @param [Class] base
|
44
|
+
# The class that will be setup as a DataMapper model.
|
45
|
+
#
|
39
46
|
def self.included(base)
|
40
47
|
unless base.ancestors.include?(DataMapper::Resource)
|
41
48
|
base.send :include, DataMapper::Resource
|