ronin 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. data/ChangeLog.md +24 -26
  2. data/Gemfile +24 -12
  3. data/README.md +39 -22
  4. data/Rakefile +2 -4
  5. data/gemspec.yml +27 -30
  6. data/lib/ronin/address.rb +3 -6
  7. data/lib/ronin/cached_file.rb +4 -3
  8. data/lib/ronin/campaign.rb +2 -1
  9. data/lib/ronin/credential.rb +3 -2
  10. data/lib/ronin/database/database.rb +3 -0
  11. data/lib/ronin/database/migrations/create_addresses_table.rb +1 -3
  12. data/lib/ronin/database/migrations/create_open_ports_table.rb +0 -3
  13. data/lib/ronin/database/migrations/create_organizations_table.rb +1 -6
  14. data/lib/ronin/database/migrations/create_urls_table.rb +1 -4
  15. data/lib/ronin/database/migrations.rb +0 -2
  16. data/lib/ronin/email_address.rb +5 -3
  17. data/lib/ronin/environment.rb +1 -1
  18. data/lib/ronin/host_name.rb +4 -3
  19. data/lib/ronin/host_name_ip_address.rb +3 -2
  20. data/lib/ronin/ip_address.rb +5 -4
  21. data/lib/ronin/ip_address_mac_address.rb +3 -2
  22. data/lib/ronin/mac_address.rb +3 -1
  23. data/lib/ronin/model/has_authors/class_methods.rb +2 -2
  24. data/lib/ronin/model/has_authors/has_authors.rb +1 -1
  25. data/lib/ronin/model/has_license/class_methods.rb +22 -5
  26. data/lib/ronin/{database/migrations/create_tags_table.rb → model/has_unique_name/class_methods.rb} +20 -15
  27. data/lib/ronin/model/has_unique_name/has_unique_name.rb +72 -0
  28. data/lib/ronin/model/has_unique_name.rb +2 -51
  29. data/lib/ronin/model/model.rb +1 -1
  30. data/lib/ronin/open_port.rb +5 -8
  31. data/lib/ronin/organization.rb +2 -5
  32. data/lib/ronin/os.rb +3 -2
  33. data/lib/ronin/os_guess.rb +3 -2
  34. data/lib/ronin/password.rb +2 -1
  35. data/lib/ronin/port.rb +2 -1
  36. data/lib/ronin/repository.rb +2 -1
  37. data/lib/ronin/service.rb +2 -1
  38. data/lib/ronin/service_credential.rb +2 -1
  39. data/lib/ronin/software.rb +2 -1
  40. data/lib/ronin/spec/database.rb +4 -0
  41. data/lib/ronin/target.rb +3 -2
  42. data/lib/ronin/tcp_port.rb +4 -2
  43. data/lib/ronin/ui/cli/cli.rb +2 -3
  44. data/lib/ronin/ui/cli/command.rb +48 -16
  45. data/lib/ronin/ui.rb +0 -1
  46. data/lib/ronin/url.rb +9 -10
  47. data/lib/ronin/url_scheme.rb +15 -1
  48. data/lib/ronin/version.rb +1 -1
  49. data/lib/ronin/web_credential.rb +3 -2
  50. data/ronin.gemspec +2 -2
  51. data/spec/model/cacheable_spec.rb +9 -6
  52. data/spec/model/has_authors_spec.rb +60 -0
  53. data/spec/model/has_description_spec.rb +8 -6
  54. data/spec/model/has_license_spec.rb +31 -12
  55. data/spec/model/has_name_spec.rb +12 -10
  56. data/spec/model/has_title_spec.rb +8 -6
  57. data/spec/model/has_version_spec.rb +58 -0
  58. data/spec/model/model_spec.rb +1 -3
  59. data/spec/model/models/authored_model.rb +11 -0
  60. data/spec/model/models/described_model.rb +0 -1
  61. data/spec/model/models/licensed_model.rb +0 -1
  62. data/spec/model/models/named_model.rb +0 -1
  63. data/spec/model/models/titled_model.rb +0 -1
  64. data/spec/model/models/versioned_model.rb +11 -0
  65. data/spec/model/spec_helper.rb +2 -2
  66. data/spec/ui/cli/classes/test_command.rb +7 -1
  67. data/spec/ui/cli/command_spec.rb +6 -0
  68. metadata +94 -267
  69. data/lib/ronin/database/migrations/create_taggings_table.rb +0 -45
  70. data/lib/ronin/ui/hexdump/extensions/file.rb +0 -39
  71. data/lib/ronin/ui/hexdump/extensions/kernel.rb +0 -31
  72. data/lib/ronin/ui/hexdump/extensions.rb +0 -21
  73. data/lib/ronin/ui/hexdump/hexdump.rb +0 -92
  74. data/lib/ronin/ui/hexdump.rb +0 -21
  75. data/spec/model/models/lazy_model.rb +0 -9
  76. data/spec/support/inflector_spec.rb +0 -20
data/ChangeLog.md CHANGED
@@ -5,34 +5,32 @@
5
5
  * Require i18n ~> 0.4.1.
6
6
  * Require tzinfo ~> 0.3.22.
7
7
  * Require activesupport ~> 3.0.0.
8
- * Require dm-do-adapter ~> 1.0.2.
9
- * Require dm-sqlite-adapter ~> 1.0.2.
10
- * Require dm-core ~> 1.0.2.
11
- * Require dm-types ~> 1.0.2.
12
- * Require dm-constraints ~> 1.0.2.
13
- * Require dm-migrations ~> 1.0.2.
14
- * Require dm-validations ~> 1.0.2.
15
- * Require dm-serializer ~> 1.0.2.
16
- * Require dm-aggregates ~> 1.0.2.
17
- * Require dm-timestamps ~> 1.0.2.
18
- * Require dm-tags ~> 1.0.2.
19
- * Require dm-is-predefined ~> 0.3.0.
20
- * Require uri-query_params ~> 0.5.2.
21
- * Require open_namespace ~> 0.3.0.
22
- * Require parameters ~> 0.2.3.
23
- * Require data_paths ~> 0.2.1.
24
- * Require contextify ~> 0.2.0.
25
- * Require env ~> 0.1.2.
26
- * Require pullr ~> 0.1.2.
8
+ * Require dm-do-adapter ~> 1.1.0.
9
+ * Require dm-sqlite-adapter ~> 1.1.0.
10
+ * Require dm-core ~> 1.1.0.
11
+ * Require dm-types ~> 1.1.0.
12
+ * Require dm-constraints ~> 1.1.0.
13
+ * Require dm-migrations ~> 1.1.0.
14
+ * Require dm-validations ~> 1.1.0.
15
+ * Require dm-serializer ~> 1.1.0.
16
+ * Require dm-aggregates ~> 1.1.0.
17
+ * Require dm-timestamps ~> 1.1.0.
18
+ * Require dm-is-predefined ~> 0.3.1.
19
+ * Require uri-query_params ~> 0.5, >= 0.5.2.
20
+ * Require open_namespace ~> 0.3.
21
+ * Require parameters ~> 0.2, >= 0.2.3.
22
+ * Require data_paths ~> 0.2, >= 0.2.1.
23
+ * Require contextify ~> 0.2.
24
+ * Require env ~> 0.1, >= 0.1.2.
25
+ * Require pullr ~> 0.1, >= 0.1.2.
26
+ * Require hexdump ~> 0.1.
27
+ * Require ripl ~> 0.3.
28
+ * Require ripl-multi_line ~> 0.2.
29
+ * Require ripl-auto_indent ~> 0.1.
30
+ * Require ripl-short_errors ~> 0.1.
31
+ * Require ripl-color_result ~> 0.2.
27
32
  * Require thor ~> 0.14.3.
28
- * Require ripl ~> 0.3.0.
29
- * Require ripl-multi_line ~> 0.2.0.
30
- * Require ripl-auto_indent ~> 0.1.0.
31
- * Require ripl-short_errors ~> 0.1.0.
32
- * Require ripl-color_result ~> 0.2.0.
33
33
  * Require ronin-support ~> 0.1.0.
34
- * Require bundler ~> 1.0.0.
35
- * Require yard ~> 0.6.4.
36
34
  * Added `ronin/bootstrap` which only loads configuration and the Database.
37
35
  * Added {Ronin::Database::Migrations}.
38
36
  * Added {Ronin::Model::HasUniqueName}.
data/Gemfile CHANGED
@@ -1,26 +1,38 @@
1
- require 'ore/specification'
2
-
3
1
  source 'https://rubygems.org'
4
2
 
5
- DATA_MAPPER = 'http://github.com/datamapper'
6
- DM_VERSION = '~> 1.0.2'
7
- RONIN = 'http://github.com/ronin-ruby'
3
+ DM_URI = 'http://github.com/datamapper'
4
+ DM_VERSION = '~> 1.1.0'
5
+ DO_VERSION = '~> 0.10.3'
6
+ RONIN_URI = 'http://github.com/ronin-ruby'
8
7
 
9
8
  gemspec
10
9
 
10
+ # DataMapper dependencies
11
+ # gem 'data_objects', DO_VERSION, :git => "#{DM_URI}/do.git"
12
+ # gem 'do_sqlite3', DO_VERSION, :git => "#{DM_URI}/do.git"
13
+ # gem 'dm-do-adapter', DM_VERSION, :git => "#{DM_URI}/dm-do-adapter.git"
14
+ # gem 'dm-sqlite-adapter', DM_VERSION, :git => "#{DM_URI}/dm-sqlite-adapter.git"
15
+ # gem 'dm-core', DM_VERSION, :git => "#{DM_URI}/dm-core.git"
16
+ # gem 'dm-types', DM_VERSION, :git => "#{DM_URI}/dm-types.git"
17
+ # gem 'dm-constraints', DM_VERSION, :git => "#{DM_URI}/dm-constraints.git"
18
+ # gem 'dm-migrations', DM_VERSION, :git => "#{DM_URI}/dm-migrations.git"
19
+ # gem 'dm-validations', DM_VERSION, :git => "#{DM_URI}/dm-validations.git"
20
+ # gem 'dm-serializer', DM_VERSION, :git => "#{DM_URI}/dm-serializer.git"
21
+ # gem 'dm-aggregates', DM_VERSION, :git => "#{DM_URI}/dm-aggregates.git"
22
+ # gem 'dm-timestamps', DM_VERSION, :git => "#{DM_URI}/dm-timestamps.git"
23
+
11
24
  # Library dependencies
12
- # gem 'ronin-support', '~> 0.1.0', :git => "#{RONIN}/ronin-support.git"
25
+ # gem 'ronin-support', '~> 0.1.0', :git => "#{RONIN_URI}/ronin-support.git"
13
26
 
14
27
  group :development do
15
28
  gem 'rake', '~> 0.8.7'
16
29
 
17
- gem 'ore-core', '~> 0.1.1'
18
- gem 'ore-tasks', '~> 0.3.0'
19
- gem 'rspec', '~> 2.3.0'
30
+ gem 'ore-tasks', '~> 0.4'
31
+ gem 'rspec', '~> 2.4'
20
32
 
21
- gem 'kramdown', '~> 0.12.0'
33
+ gem 'kramdown', '~> 0.12'
22
34
  gem 'ruby-graphviz', '~> 0.9.10'
23
- gem 'dm-visualizer', '~> 0.1.0'
35
+ gem 'dm-visualizer', '~> 0.2.0'
24
36
  end
25
37
 
26
38
  group :test do
@@ -31,7 +43,7 @@ group :test do
31
43
 
32
44
  unless (DM_ADAPTERS & adapters).empty?
33
45
  adapters.each do |adapter|
34
- gem "dm-#{adapter}-adapter", DM_VERSION, :git => "#{DATA_MAPPER}/dm-#{adapter}-adapter.git"
46
+ gem "dm-#{adapter}-adapter", DM_VERSION, :git => "#{DM_URI}/dm-#{adapter}-adapter.git"
35
47
  end
36
48
  end
37
49
  end
data/README.md CHANGED
@@ -71,6 +71,7 @@ Mercurial or Git.
71
71
  * Convenience methods provided by
72
72
  [ronin-support](http://github.com/ronin-ruby/ronin-support#readme).
73
73
  * Provides a customized Ruby Console with:
74
+ * Syntax highlighting.
74
75
  * Tab-completion enabled.
75
76
  * Auto-indentation enabled.
76
77
  * Pretty-Print loaded.
@@ -128,30 +129,46 @@ Remove a Database:
128
129
  ## Requirements
129
130
 
130
131
  * [Ruby](http://www.ruby-lang.org/) >= 1.8.7
131
- * [ActiveSupport](http://rubygems.org/gems/activesupport) >= 3.0.0
132
132
  * [DataMapper](http://datamapper.org/):
133
- * [dm-do-adapter](http://github.com/datamapper/dm-do-adapter) ~> 1.0.2
134
- * [dm-sqlite-adapter](http://github.com/datamapper/dm-sqlite-adapter)
135
- ~> 1.0.2
133
+ * [dm-do-adapter](http://github.com/datamapper/dm-do-adapter#readme)
134
+ ~> 1.1.0
135
+ * [dm-sqlite-adapter](http://github.com/datamapper/dm-sqlite-adapter#readme)
136
+ ~> 1.1.0
136
137
  * [libsqlite3](http://sqlite.org/)
137
- * [dm-core](http://github.com/datamapper/dm-core) ~> 1.0.2
138
- * [dm-types](http://github.com/datamapper/dm-types) ~> 1.0.2
139
- * [dm-migrations](http://github.com/datamapper/dm-migrations) ~> 1.0.2
140
- * [dm-validations](http://github.com/datamapper/dm-validations) ~> 1.0.2
141
- * [dm-aggregates](http://github.com/datamapper/dm-aggregates) ~> 1.0.2
142
- * [dm-timestamps](http://github.com/datamapper/dm-timestamps) ~> 1.0.2
143
- * [dm-tags](http://github.com/datamapper/dm-tags) ~> 1.0.2
144
- * [dm-is-predefined](http://github.com/postmodern/dm-is-predefined/)
145
- ~> 0.3.0
146
- * [uri-query_params](http://github.com/postmodern/uri-query_params) ~> 0.4.0
147
- * [open_namespace](http://github.com/postmodern/open_namespace) ~> 0.3.0
148
- * [parameters](http://github.com/postmodern/parameters) ~> 0.2.2
149
- * [data_paths](http://github.com/postmodern/data_paths) ~> 0.2.1
150
- * [contextify](http://github.com/postmodern/contextify/) ~> 0.1.6
151
- * [env](http://github.com/postmodern/env) ~> 0.1.2
152
- * [pullr](http://github.com/postmodern/pullr/) ~> 0.1.2
153
- * [thor](http://github.com/wycats/thor/) ~> 0.14.2
154
- * [ronin-support](http://github.com/ronin-ruby/ronin-support/) ~> 0.1.0
138
+ * [dm-core](http://github.com/datamapper/dm-core#readme)
139
+ ~> 1.1.0
140
+ * [dm-types](http://github.com/datamapper/dm-types#readme)
141
+ ~> 1.1.0
142
+ * [dm-migrations](http://github.com/datamapper/dm-migrations#readme)
143
+ ~> 1.1.0
144
+ * [dm-validations](http://github.com/datamapper/dm-validations#readme)
145
+ ~> 1.1.0
146
+ * [dm-aggregates](http://github.com/datamapper/dm-aggregates#readme)
147
+ ~> 1.1.0
148
+ * [dm-timestamps](http://github.com/datamapper/dm-timestamps#readme)
149
+ ~> 1.1.0
150
+ * [dm-is-predefined](http://github.com/postmodern/dm-is-predefined#readme)
151
+ ~> 0.3.1
152
+ * [uri-query_params](http://github.com/postmodern/uri-query_params#readme)
153
+ ~> 0.5, >= 0.5.2
154
+ * [open_namespace](http://github.com/postmodern/open_namespace#readme)
155
+ ~> 0.3
156
+ * [parameters](http://github.com/postmodern/parameters#readme)
157
+ ~> 0.2, >= 0.2.3
158
+ * [data_paths](http://github.com/postmodern/data_paths#readme)
159
+ ~> 0.2, >= 0.2.1
160
+ * [contextify](http://github.com/postmodern/contextify#readme)
161
+ ~> 0.2
162
+ * [env](http://github.com/postmodern/env#readme)
163
+ ~> 0.1, >= 0.1.2
164
+ * [pullr](http://github.com/postmodern/pullr#readme)
165
+ ~> 0.1, >= 0.1.2
166
+ * [hexdump](http://github.com/postmodern/hexdump#readme)
167
+ ~> 0.1
168
+ * [thor](http://github.com/wycats/thor#readme)
169
+ ~> 0.14.3
170
+ * [ronin-support](http://github.com/ronin-ruby/ronin-support#readme)
171
+ ~> 0.1.0
155
172
 
156
173
  ## Install
157
174
 
data/Rakefile CHANGED
@@ -28,15 +28,12 @@ task :default => :spec
28
28
 
29
29
  require 'dm-visualizer/rake/graphviz_task'
30
30
  DataMapper::Visualizer::Rake::GraphVizTask.new(
31
- :bundle => [:default],
32
31
  :include => %w[lib],
33
32
  :require => %w[
34
33
  ronin/arch
35
34
  ronin/address
36
35
  ronin/author
37
36
  ronin/campaign
38
- ronin/comment
39
- ronin/country
40
37
  ronin/credential
41
38
  ronin/email_address
42
39
  ronin/host_name_ip_address
@@ -56,6 +53,7 @@ DataMapper::Visualizer::Rake::GraphVizTask.new(
56
53
  ronin/service_credential
57
54
  ronin/web_credential
58
55
  ronin/software
56
+ ronin/vendor
59
57
  ronin/target
60
58
  ronin/tcp_port
61
59
  ronin/udp_port
@@ -63,7 +61,7 @@ DataMapper::Visualizer::Rake::GraphVizTask.new(
63
61
  ronin/url_query_param
64
62
  ronin/url
65
63
  ronin/user_name
66
- ronin/vendor
64
+ ronin/password
67
65
  ]
68
66
  )
69
67
 
data/gemspec.yml CHANGED
@@ -32,46 +32,43 @@ post_install_message: |
32
32
 
33
33
  *************************************************************************
34
34
 
35
- required_ruby_version: >= 1.8.7
35
+ required_ruby_version: ">= 1.8.7"
36
36
 
37
37
  dependencies:
38
- i18n: ~> 0.4.1
39
- tzinfo: ~> 0.3.22
40
- activesupport: ~> 3.0.0
41
38
  # DataMapper adapters
42
- dm-do-adapter: ~> 1.0.2
43
- dm-sqlite-adapter: ~> 1.0.2
39
+ dm-do-adapter: ~> 1.1.0.rc2
40
+ dm-sqlite-adapter: ~> 1.1.0.rc2
44
41
  # DataMapper dependencies
45
- dm-core: ~> 1.0.2
46
- dm-types: ~> 1.0.2
47
- dm-constraints: ~> 1.0.2
48
- dm-migrations: ~> 1.0.2
49
- dm-validations: ~> 1.0.2
50
- dm-serializer: ~> 1.0.2
51
- dm-aggregates: ~> 1.0.2
52
- dm-timestamps: ~> 1.0.2
53
- dm-tags: ~> 1.0.2
42
+ dm-core: ~> 1.1.0.rc2
43
+ dm-types: ~> 1.1.0.rc2
44
+ dm-constraints: ~> 1.1.0.rc2
45
+ dm-migrations: ~> 1.1.0.rc2
46
+ dm-validations: ~> 1.1.0.rc2
47
+ dm-serializer: ~> 1.1.0.rc2
48
+ dm-aggregates: ~> 1.1.0.rc2
49
+ dm-timestamps: ~> 1.1.0.rc2
54
50
  # DataMapper plugins
55
- dm-is-predefined: ~> 0.3.0
51
+ dm-is-predefined: ~> 0.3.1
56
52
  # Library dependencies
57
- uri-query_params: ~> 0.5.2
58
- open_namespace: ~> 0.3.0
59
- parameters: ~> 0.2.3
60
- data_paths: ~> 0.2.1
61
- contextify: ~> 0.2.0
62
- env: ~> 0.1.2
63
- pullr: ~> 0.1.2
53
+ uri-query_params: ~> 0.5, >= 0.5.2
54
+ open_namespace: ~> 0.3
55
+ parameters: ~> 0.2, >= 0.2.3
56
+ data_paths: ~> 0.2, >= 0.2.1
57
+ contextify: ~> 0.2
58
+ env: ~> 0.1, >= 0.1.2
59
+ pullr: ~> 0.1, >= 0.1.2
60
+ hexdump: ~> 0.1
61
+ ripl: ~> 0.3
62
+ ripl-multi_line: ~> 0.2
63
+ ripl-auto_indent: ~> 0.1
64
+ ripl-short_errors: ~> 0.1
65
+ ripl-color_result: ~> 0.3
64
66
  thor: ~> 0.14.3
65
- ripl: ~> 0.3.0
66
- ripl-multi_line: ~> 0.2.0
67
- ripl-auto_indent: ~> 0.1.0
68
- ripl-short_errors: ~> 0.1.0
69
- ripl-color_result: ~> 0.2.0
70
67
  # Ronin dependencies:
71
- ronin-support: ~> 0.1.0.rc1
68
+ ronin-support: ~> 0.1.0.rc2
72
69
 
73
70
  development_dependencies:
74
- bundler: ~> 1.0.0
71
+ bundler: ~> 1.0.10
75
72
  yard: ~> 0.6.4
76
73
  yard-contextify: ~> 0.1.0
77
74
  yard-parameters: ~> 0.1.0
data/lib/ronin/address.rb CHANGED
@@ -17,14 +17,14 @@
17
17
  # along with Ronin. If not, see <http://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
- require 'ronin/organization'
21
- require 'ronin/target'
22
20
  require 'ronin/model'
23
21
 
24
22
  require 'dm-timestamps'
25
- require 'dm-tags'
26
23
 
27
24
  module Ronin
25
+ autoload :Organization, 'ronin/organization'
26
+ autoload :Target, 'ronin/target'
27
+
28
28
  #
29
29
  # A base model which represents an Internet Address, such as:
30
30
  #
@@ -58,9 +58,6 @@ module Ronin
58
58
  # Tracks when the IP Address was first created
59
59
  timestamps :created_at
60
60
 
61
- # Tags
62
- has_tags_on :tags
63
-
64
61
  #
65
62
  # Finds an address.
66
63
  #
@@ -18,12 +18,13 @@
18
18
  #
19
19
 
20
20
  require 'ronin/support/inflector'
21
- require 'ronin/repository'
22
21
  require 'ronin/model'
23
22
 
24
23
  require 'contextify'
25
24
 
26
25
  module Ronin
26
+ autoload :Repository, 'ronin/repository'
27
+
27
28
  #
28
29
  # The {CachedFile} model stores information in the {Database} about
29
30
  # files that {Cacheable} Models were cached from. {CachedFile} also
@@ -92,7 +93,7 @@ module Ronin
92
93
  end
93
94
 
94
95
  # filter out non-Cacheable models
95
- return model if model.ancestors.include?(Cacheable)
96
+ return model if model < Cacheable
96
97
  end
97
98
 
98
99
  #
@@ -127,7 +128,7 @@ module Ronin
127
128
  blocks.each do |name,block|
128
129
  model = Contextify.contexts[name]
129
130
 
130
- if model.ancestors.include?(Cacheable)
131
+ if model < Cacheable
131
132
  # create the fresh object
132
133
  object = model.new()
133
134
 
@@ -20,9 +20,10 @@
20
20
  require 'ronin/model'
21
21
  require 'ronin/model/has_unique_name'
22
22
  require 'ronin/model/has_description'
23
- require 'ronin/target'
24
23
 
25
24
  module Ronin
25
+ autoload :Target, 'ronin/target'
26
+
26
27
  #
27
28
  # Represents a grouping of targeted {Address}es.
28
29
  #
@@ -17,11 +17,12 @@
17
17
  # along with Ronin. If not, see <http://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
- require 'ronin/user_name'
21
- require 'ronin/password'
22
20
  require 'ronin/model'
23
21
 
24
22
  module Ronin
23
+ autoload :UserName, 'ronin/user_name'
24
+ autoload :Password, 'ronin/password'
25
+
25
26
  #
26
27
  # Represents Credentials used to access services or websites.
27
28
  #
@@ -205,6 +205,9 @@ module Ronin
205
205
 
206
206
  # auto-upgrade the database repository
207
207
  Database.upgrade!(&block)
208
+
209
+ # finalize the model relationships
210
+ DataMapper.finalize
208
211
  end
209
212
 
210
213
  #
@@ -18,7 +18,6 @@
18
18
  #
19
19
 
20
20
  require 'ronin/database/migrations/create_organizations_table'
21
- require 'ronin/database/migrations/create_taggings_table'
22
21
  require 'ronin/database/migrations/migrations'
23
22
 
24
23
  module Ronin
@@ -26,7 +25,7 @@ module Ronin
26
25
  module Migrations
27
26
  migration(
28
27
  :create_addresses_table,
29
- :needs => [:create_organizations_table, :create_taggings_table]
28
+ :needs => :create_organizations_table
30
29
  ) do
31
30
  up do
32
31
  create_table :ronin_addresses do
@@ -36,7 +35,6 @@ module Ronin
36
35
  column :address, String, :not_null => true
37
36
  column :organization_id, Integer
38
37
  column :created_at, Time, :not_null => true
39
- column :frozen_tag_list, Text
40
38
  end
41
39
 
42
40
  create_index :ronin_addresses, :address, :unique => true
@@ -19,7 +19,6 @@
19
19
 
20
20
  require 'ronin/database/migrations/create_addresses_table'
21
21
  require 'ronin/database/migrations/create_ports_table'
22
- require 'ronin/database/migrations/create_taggings_table'
23
22
  require 'ronin/database/migrations/migrations'
24
23
 
25
24
  module Ronin
@@ -30,7 +29,6 @@ module Ronin
30
29
  :needs => [
31
30
  :create_addresses_table,
32
31
  :create_ports_table,
33
- :create_taggings_table
34
32
  ]
35
33
  ) do
36
34
  up do
@@ -41,7 +39,6 @@ module Ronin
41
39
  column :service_id, Integer
42
40
  column :last_scanned_at, Time
43
41
  column :created_at, Time, :not_null => true
44
- column :frozen_tag_list, Text
45
42
  end
46
43
 
47
44
  create_index :ronin_open_ports,
@@ -17,23 +17,18 @@
17
17
  # along with Ronin. If not, see <http://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
- require 'ronin/database/migrations/create_taggings_table'
21
20
  require 'ronin/database/migrations/migrations'
22
21
 
23
22
  module Ronin
24
23
  module Database
25
24
  module Migrations
26
- migration(
27
- :create_organizations_table,
28
- :needs => :create_taggings_table
29
- ) do
25
+ migration(:create_organizations_table) do
30
26
  up do
31
27
  create_table :ronin_organizations do
32
28
  column :id, Integer, :serial => true
33
29
  column :name, String, :not_null => true
34
30
  column :description, Text, :not_null => true
35
31
  column :created_at, Time, :not_null => true
36
- column :frozen_tag_list, Text
37
32
  end
38
33
 
39
34
  create_index :ronin_organizations, :name, :unique => true
@@ -21,7 +21,6 @@ require 'ronin/database/migrations/create_url_schemes_table'
21
21
  require 'ronin/database/migrations/create_url_query_params_table'
22
22
  require 'ronin/database/migrations/create_addresses_table'
23
23
  require 'ronin/database/migrations/create_ports_table'
24
- require 'ronin/database/migrations/create_taggings_table'
25
24
  require 'ronin/database/migrations/migrations'
26
25
 
27
26
  module Ronin
@@ -33,8 +32,7 @@ module Ronin
33
32
  :create_url_schemes_table,
34
33
  :create_url_query_params_table,
35
34
  :create_addresses_table,
36
- :create_ports_table,
37
- :create_taggings_table
35
+ :create_ports_table
38
36
  ]
39
37
  ) do
40
38
  up do
@@ -47,7 +45,6 @@ module Ronin
47
45
  column :fragment, String
48
46
  column :last_scanned_at, Time
49
47
  column :created_at, Time, :not_null => true
50
- column :frozen_tag_list, Text
51
48
  end
52
49
 
53
50
  create_index :ronin_urls, :scheme_id,
@@ -18,8 +18,6 @@
18
18
  #
19
19
 
20
20
  require 'ronin/database/migrations/migrations'
21
- require 'ronin/database/migrations/create_tags_table'
22
- require 'ronin/database/migrations/create_taggings_table'
23
21
  require 'ronin/database/migrations/create_arches_table'
24
22
  require 'ronin/database/migrations/create_os_table'
25
23
  require 'ronin/database/migrations/create_vendors_table'
@@ -17,13 +17,14 @@
17
17
  # along with Ronin. If not, see <http://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
- require 'ronin/user_name'
21
- require 'ronin/host_name'
22
20
  require 'ronin/model'
23
21
 
24
22
  require 'dm-timestamps'
25
23
 
26
24
  module Ronin
25
+ autoload :UserName, 'ronin/user_name'
26
+ autoload :HostName, 'ronin/host_name'
27
+
27
28
  #
28
29
  # Represents email addresses that can be stored in the {Database}.
29
30
  #
@@ -41,7 +42,8 @@ module Ronin
41
42
  belongs_to :host_name
42
43
 
43
44
  # Any IP addresses associated with the host name.
44
- has 0..n, :ip_addresses, :through => :host_name
45
+ has 0..n, :ip_addresses, :through => :host_name,
46
+ :model => 'IPAddress'
45
47
 
46
48
  # Any web credentials that are associated with the email address.
47
49
  has 0..n, :web_credentials
@@ -24,10 +24,10 @@ require 'ronin/ronin'
24
24
  require 'ronin/extensions'
25
25
  require 'ronin/formatting/extensions'
26
26
  require 'ronin/network/extensions'
27
- require 'ronin/ui/hexdump/extensions'
28
27
  require 'ronin/ui/output/helpers'
29
28
 
30
29
  require 'chars/extensions'
30
+ require 'hexdump/extensions'
31
31
 
32
32
  #
33
33
  # Includes the Ronin namespace and output helper methods.
@@ -18,14 +18,15 @@
18
18
  #
19
19
 
20
20
  require 'ronin/address'
21
- require 'ronin/host_name_ip_address'
22
- require 'ronin/url'
23
- require 'ronin/email_address'
24
21
  require 'ronin/model'
25
22
 
26
23
  require 'resolv'
27
24
 
28
25
  module Ronin
26
+ autoload :HostNameIPAddress, 'ronin/host_name_ip_address'
27
+ autoload :URL, 'ronin/url'
28
+ autoload :EmailAddress, 'ronin/email_address'
29
+
29
30
  #
30
31
  # Represents host names that can be stored in the {Database}.
31
32
  #
@@ -17,13 +17,14 @@
17
17
  # along with Ronin. If not, see <http://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
- require 'ronin/host_name'
21
- require 'ronin/ip_address'
22
20
  require 'ronin/model'
23
21
 
24
22
  require 'dm-timestamps'
25
23
 
26
24
  module Ronin
25
+ autoload :HostName, 'ronin/host_name'
26
+ autoload :IPAddress, 'ronin/ip_address'
27
+
27
28
  #
28
29
  # Associates a {HostName} with an {IPAddress}.
29
30
  #
@@ -19,15 +19,16 @@
19
19
 
20
20
  require 'ronin/model'
21
21
  require 'ronin/address'
22
- require 'ronin/ip_address_mac_address'
23
- require 'ronin/host_name_ip_address'
24
- require 'ronin/os_guess'
25
- require 'ronin/os'
26
22
 
27
23
  require 'ipaddr'
28
24
  require 'resolv'
29
25
 
30
26
  module Ronin
27
+ autoload :IPAddressMACAddress, 'ronin/ip_address_mac_address'
28
+ autoload :HostNameIPAddress, 'ronin/host_name_ip_address'
29
+ autoload :OSGuess, 'ronin/os_guess'
30
+ autoload :OS, 'ronin/os'
31
+
31
32
  #
32
33
  # Represents IP addresses that can be stored in the {Database}.
33
34
  #
@@ -17,13 +17,14 @@
17
17
  # along with Ronin. If not, see <http://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
- require 'ronin/ip_address'
21
- require 'ronin/mac_address'
22
20
  require 'ronin/model'
23
21
 
24
22
  require 'dm-timestamps'
25
23
 
26
24
  module Ronin
25
+ autoload :IPAddress, 'ronin/ip_address'
26
+ autoload :MACAddress, 'ronin/mac_address'
27
+
27
28
  #
28
29
  # Associates an {IPAddress} with a {MACAddress}.
29
30
  #
@@ -18,10 +18,12 @@
18
18
  #
19
19
 
20
20
  require 'ronin/address'
21
- require 'ronin/ip_address_mac_address'
22
21
  require 'ronin/model'
23
22
 
24
23
  module Ronin
24
+ autoload :IPAddressMACAddress, 'ronin/ip_address_mac_address'
25
+ autoload :IPAddress, 'ronin/ip_address'
26
+
25
27
  #
26
28
  # Represents MAC addresses that can be stored in the {Database}.
27
29
  #