ronin-db-activerecord 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +14 -0
- data/.rubocop.yml +16 -0
- data/ChangeLog.md +11 -1
- data/Gemfile +4 -0
- data/README.md +1 -1
- data/Rakefile +3 -3
- data/db/migrate/{0014_create_ronin_ip_addresses_table.rb → 0001_create_ronin_ip_addresses_table.rb} +4 -0
- data/db/migrate/{0021_create_ronin_mac_addresses_table.rb → 0002_create_ronin_mac_addresses_table.rb} +4 -0
- data/db/migrate/{0001_create_ronin_ip_address_mac_addresses_table.rb → 0003_create_ronin_ip_address_mac_addresses_table.rb} +4 -0
- data/db/migrate/{0009_create_ronin_host_names_table.rb → 0004_create_ronin_host_names_table.rb} +4 -0
- data/db/migrate/{0025_create_ronin_ports_table.rb → 0005_create_ronin_ports_table.rb} +4 -0
- data/db/migrate/{0023_create_ronin_services_table.rb → 0006_create_ronin_services_table.rb} +4 -0
- data/db/migrate/{0018_create_ronin_open_ports_table.rb → 0007_create_ronin_open_ports_table.rb} +4 -0
- data/db/migrate/{0003_create_ronin_url_schemes_table.rb → 0008_create_ronin_url_schemes_table.rb} +4 -0
- data/db/migrate/{0019_create_ronin_urls_table.rb → 0009_create_ronin_urls_table.rb} +5 -0
- data/db/migrate/0010_create_ronin_advisories_table.rb +45 -0
- data/db/migrate/{0002_create_ronin_vulnerabilities_table.rb → 0011_create_ronin_vulnerabilities_table.rb} +14 -11
- data/db/migrate/{0004_create_ronin_url_query_param_names_table.rb → 0012_create_ronin_url_query_param_names_table.rb} +4 -0
- data/db/migrate/{0005_create_ronin_user_names_table.rb → 0013_create_ronin_user_names_table.rb} +4 -0
- data/db/migrate/{0006_create_ronin_software_vendors_table.rb → 0014_create_ronin_software_vendors_table.rb} +4 -0
- data/db/migrate/{0008_create_ronin_host_name_ip_addresses_table.rb → 0015_create_ronin_host_name_ip_addresses_table.rb} +4 -0
- data/db/migrate/{0010_create_ronin_arches_table.rb → 0016_create_ronin_arches_table.rb} +3 -0
- data/db/migrate/{0011_create_ronin_email_addresses_table.rb → 0017_create_ronin_email_addresses_table.rb} +4 -0
- data/db/migrate/{0012_create_ronin_oses_table.rb → 0018_create_ronin_oses_table.rb} +4 -0
- data/db/migrate/{0013_create_ronin_organizations_table.rb → 0019_create_ronin_organizations_table.rb} +4 -0
- data/db/migrate/{0015_create_ronin_os_guesses_table.rb → 0020_create_ronin_os_guesses_table.rb} +4 -0
- data/db/migrate/{0016_create_ronin_url_query_params_table.rb → 0021_create_ronin_url_query_params_table.rb} +4 -0
- data/db/migrate/{0017_create_ronin_passwords_table.rb → 0022_create_ronin_passwords_table.rb} +4 -0
- data/db/migrate/{0020_create_ronin_softwares_table.rb → 0023_create_ronin_softwares_table.rb} +5 -3
- data/db/migrate/{0022_create_ronin_countries_table.rb → 0024_create_ronin_countries_table.rb} +4 -0
- data/db/migrate/{0024_create_ronin_credentials_table.rb → 0025_create_ronin_credentials_table.rb} +4 -0
- data/db/migrate/0026_create_ronin_asns_table.rb +4 -0
- data/db/migrate/0027_create_ronin_http_query_param_names_table.rb +4 -0
- data/db/migrate/{0033_create_ronin_http_responses_table.rb → 0028_create_ronin_http_responses_table.rb} +5 -3
- data/db/migrate/{0032_create_ronin_http_requests_table.rb → 0029_create_ronin_http_requests_table.rb} +5 -3
- data/db/migrate/{0028_create_ronin_http_query_params_table.rb → 0030_create_ronin_http_query_params_table.rb} +4 -0
- data/db/migrate/{0029_create_ronin_http_header_names_table.rb → 0031_create_ronin_http_header_names_table.rb} +4 -0
- data/db/migrate/{0030_create_ronin_http_request_headers_table.rb → 0032_create_ronin_http_request_headers_table.rb} +4 -0
- data/db/migrate/{0031_create_ronin_http_response_headers_table.rb → 0033_create_ronin_http_response_headers_table.rb} +4 -0
- data/db/migrate/0034_create_ronin_service_credentials_table.rb +4 -0
- data/db/migrate/0035_create_ronin_web_credentials_table.rb +4 -0
- data/gemspec.yml +1 -1
- data/lib/ronin/db/advisory.rb +4 -4
- data/lib/ronin/db/asn.rb +3 -3
- data/lib/ronin/db/ip_address.rb +1 -1
- data/lib/ronin/db/mac_address.rb +2 -2
- data/lib/ronin/db/migrations.rb +11 -8
- data/lib/ronin/db/model/has_unique_name.rb +2 -4
- data/lib/ronin/db/model/importable.rb +3 -0
- data/lib/ronin/db/model/last_scanned_at.rb +3 -0
- data/lib/ronin/db/model.rb +3 -0
- data/lib/ronin/db/models.rb +3 -0
- data/lib/ronin/db/password.rb +3 -3
- data/lib/ronin/db/url.rb +20 -23
- data/lib/ronin/db/url_scheme.rb +1 -1
- data/lib/ronin/db/vulnerability.rb +4 -0
- data/ronin-db-activerecord.gemspec +3 -3
- metadata +34 -33
- data/db/migrate/0007_create_ronin_advisories_table.rb +0 -42
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# ronin-db-activerecord - ActiveRecord backend for the Ronin Database.
|
3
4
|
#
|
@@ -19,6 +20,9 @@
|
|
19
20
|
# along with ronin-db-activerecord. If not, see <https://www.gnu.org/licenses/>.
|
20
21
|
#
|
21
22
|
|
23
|
+
#
|
24
|
+
# Creates the `ronin_http_header_names` table.
|
25
|
+
#
|
22
26
|
class CreateRoninHttpHeaderNamesTable < ActiveRecord::Migration[7.0]
|
23
27
|
|
24
28
|
def change
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# ronin-db-activerecord - ActiveRecord backend for the Ronin Database.
|
3
4
|
#
|
@@ -19,6 +20,9 @@
|
|
19
20
|
# along with ronin-db-activerecord. If not, see <https://www.gnu.org/licenses/>.
|
20
21
|
#
|
21
22
|
|
23
|
+
#
|
24
|
+
# Creates the `ronin_http_request_headers` table.
|
25
|
+
#
|
22
26
|
class CreateRoninHttpRequestHeadersTable < ActiveRecord::Migration[7.0]
|
23
27
|
|
24
28
|
def change
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# ronin-db-activerecord - ActiveRecord backend for the Ronin Database.
|
3
4
|
#
|
@@ -19,6 +20,9 @@
|
|
19
20
|
# along with ronin-db-activerecord. If not, see <https://www.gnu.org/licenses/>.
|
20
21
|
#
|
21
22
|
|
23
|
+
#
|
24
|
+
# Creates the `ronin_http_response_headers` table.
|
25
|
+
#
|
22
26
|
class CreateRoninHttpResponseHeadersTable < ActiveRecord::Migration[7.0]
|
23
27
|
|
24
28
|
def change
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# ronin-db-activerecord - ActiveRecord backend for the Ronin Database.
|
3
4
|
#
|
@@ -19,6 +20,9 @@
|
|
19
20
|
# along with ronin-db-activerecord. If not, see <https://www.gnu.org/licenses/>.
|
20
21
|
#
|
21
22
|
|
23
|
+
#
|
24
|
+
# Creates the `ronin_service_credentials` table.
|
25
|
+
#
|
22
26
|
class CreateRoninServiceCredentialsTable < ActiveRecord::Migration[7.0]
|
23
27
|
|
24
28
|
def change
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#
|
2
3
|
# ronin-db-activerecord - ActiveRecord backend for the Ronin Database.
|
3
4
|
#
|
@@ -19,6 +20,9 @@
|
|
19
20
|
# along with ronin-db-activerecord. If not, see <https://www.gnu.org/licenses/>.
|
20
21
|
#
|
21
22
|
|
23
|
+
#
|
24
|
+
# Creates the `ronin_web_credentials` table.
|
25
|
+
#
|
22
26
|
class CreateRoninWebCredentialsTable < ActiveRecord::Migration[7.0]
|
23
27
|
|
24
28
|
def change
|
data/gemspec.yml
CHANGED
data/lib/ronin/db/advisory.rb
CHANGED
@@ -56,9 +56,9 @@ module Ronin
|
|
56
56
|
attribute :year, :integer
|
57
57
|
validates :year, allow_nil: true,
|
58
58
|
comparison: {
|
59
|
-
|
60
|
-
|
61
|
-
|
59
|
+
greater_than: 1990,
|
60
|
+
less_than_or_equal_to: Date.today.year
|
61
|
+
}
|
62
62
|
|
63
63
|
# @!attribute [rw] identifier
|
64
64
|
# The advisory identifier
|
@@ -84,7 +84,7 @@ module Ronin
|
|
84
84
|
# The ID does not appear to be a valid security ID.
|
85
85
|
#
|
86
86
|
def self.parse(string)
|
87
|
-
if
|
87
|
+
if (match = string.match(/\A([A-Z]+)-(\d{4})[:-]([0-9][0-9-]+)\z/))
|
88
88
|
{
|
89
89
|
id: match[0],
|
90
90
|
prefix: match[1],
|
data/lib/ronin/db/asn.rb
CHANGED
@@ -142,7 +142,7 @@ module Ronin
|
|
142
142
|
#
|
143
143
|
# Searches for all ASNs with the matching name.
|
144
144
|
#
|
145
|
-
# @param [String] name
|
145
|
+
# @param [String] name
|
146
146
|
# The name to search for.
|
147
147
|
#
|
148
148
|
# @return [Array<ASN>]
|
@@ -159,11 +159,11 @@ module Ronin
|
|
159
159
|
# @return [ASN, nil]
|
160
160
|
#
|
161
161
|
def self.containing_ip(ip)
|
162
|
-
ip
|
162
|
+
ip = IPAddr.new(ip) unless ip.kind_of?(IPAddr)
|
163
163
|
ip_hton = ip.hton
|
164
164
|
|
165
165
|
range_start_hton = self.arel_table[:range_start_hton]
|
166
|
-
range_end_hton
|
166
|
+
range_end_hton = self.arel_table[:range_end_hton]
|
167
167
|
|
168
168
|
where(range_start_hton.lteq(ip_hton).and(range_end_hton.gteq(ip_hton))).first
|
169
169
|
end
|
data/lib/ronin/db/ip_address.rb
CHANGED
@@ -262,6 +262,7 @@ module Ronin
|
|
262
262
|
begin
|
263
263
|
IPAddr.new(self.address)
|
264
264
|
rescue IPAddr::InvalidAddressError
|
265
|
+
nil
|
265
266
|
end
|
266
267
|
end
|
267
268
|
end
|
@@ -345,7 +346,6 @@ require 'ronin/db/host_name_ip_address'
|
|
345
346
|
require 'ronin/db/host_name'
|
346
347
|
require 'ronin/db/open_port'
|
347
348
|
require 'ronin/db/port'
|
348
|
-
require 'ronin/db/host_name'
|
349
349
|
require 'ronin/db/os_guess'
|
350
350
|
require 'ronin/db/os'
|
351
351
|
require 'ronin/db/asn'
|
data/lib/ronin/db/mac_address.rb
CHANGED
data/lib/ronin/db/migrations.rb
CHANGED
@@ -25,6 +25,9 @@ require 'active_record/migration'
|
|
25
25
|
|
26
26
|
module Ronin
|
27
27
|
module DB
|
28
|
+
#
|
29
|
+
# Handles migrating the database.
|
30
|
+
#
|
28
31
|
module Migrations
|
29
32
|
#
|
30
33
|
# The current migration version of the database.
|
@@ -56,7 +59,7 @@ module Ronin
|
|
56
59
|
context.migrate(target_version)
|
57
60
|
end
|
58
61
|
|
59
|
-
#
|
62
|
+
#
|
60
63
|
# Explicitly migrates up the database to the target version.
|
61
64
|
#
|
62
65
|
# @param [Integer, nil] target_version
|
@@ -68,9 +71,9 @@ module Ronin
|
|
68
71
|
context.up(target_version,&block)
|
69
72
|
end
|
70
73
|
|
71
|
-
#
|
74
|
+
#
|
72
75
|
# Explicitly migrates down the database to the target version.
|
73
|
-
#
|
76
|
+
#
|
74
77
|
# @param [Integer, nil] target_version
|
75
78
|
# The desired target version.
|
76
79
|
#
|
@@ -80,7 +83,7 @@ module Ronin
|
|
80
83
|
context.down(target_version,&block)
|
81
84
|
end
|
82
85
|
|
83
|
-
#
|
86
|
+
#
|
84
87
|
# Rollbacks the last number of migrations.
|
85
88
|
#
|
86
89
|
# @param [Integer] steps
|
@@ -92,7 +95,7 @@ module Ronin
|
|
92
95
|
context.rollback(steps)
|
93
96
|
end
|
94
97
|
|
95
|
-
#
|
98
|
+
#
|
96
99
|
# Applies the next number of migrations.
|
97
100
|
#
|
98
101
|
# @param [Integer] steps
|
@@ -104,8 +107,6 @@ module Ronin
|
|
104
107
|
context.foreward(steps)
|
105
108
|
end
|
106
109
|
|
107
|
-
private
|
108
|
-
|
109
110
|
# Path to the `db/migrate/` directory in `ronin-db-activerecord`.
|
110
111
|
DIR = File.expand_path('../../../db/migrate',__dir__)
|
111
112
|
|
@@ -129,8 +130,10 @@ module Ronin
|
|
129
130
|
#
|
130
131
|
# @return [MigrationContext]
|
131
132
|
#
|
133
|
+
# @api private
|
134
|
+
#
|
132
135
|
def self.context
|
133
|
-
@
|
136
|
+
@context ||= MigrationContext.new
|
134
137
|
end
|
135
138
|
end
|
136
139
|
end
|
@@ -44,11 +44,9 @@ module Ronin
|
|
44
44
|
# @api semipublic
|
45
45
|
#
|
46
46
|
def self.included(base)
|
47
|
-
base.send :include, Model,
|
48
|
-
HasName::InstanceMethods
|
47
|
+
base.send :include, Model, HasName::InstanceMethods
|
49
48
|
|
50
|
-
base.send :extend,
|
51
|
-
HasUniqueName::ClassMethods
|
49
|
+
base.send :extend, HasName::ClassMethods, HasUniqueName::ClassMethods
|
52
50
|
|
53
51
|
base.module_eval do
|
54
52
|
# The name of the model
|
data/lib/ronin/db/model.rb
CHANGED
data/lib/ronin/db/models.rb
CHANGED
data/lib/ronin/db/password.rb
CHANGED
@@ -109,13 +109,13 @@ module Ronin
|
|
109
109
|
#
|
110
110
|
# @example
|
111
111
|
# pass = Password.new(plain_text: 'secret')
|
112
|
-
#
|
112
|
+
#
|
113
113
|
# pass.digest(:sha1)
|
114
114
|
# # => "e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4"
|
115
|
-
#
|
115
|
+
#
|
116
116
|
# pass.digest(:sha1, prepend_salt: "A\x90\x00")
|
117
117
|
# # => "e2817656a48c49f24839ccf9295b389d8f985904"
|
118
|
-
#
|
118
|
+
#
|
119
119
|
# pass.digest(:sha1, append_salt: "BBBB")
|
120
120
|
# # => "aa6ca21e446d425fc044bbb26e950a788444a5b8"
|
121
121
|
#
|
data/lib/ronin/db/url.rb
CHANGED
@@ -87,7 +87,7 @@ module Ronin
|
|
87
87
|
|
88
88
|
# @!attribute [rw] fragment
|
89
89
|
# The fragment of the URL.
|
90
|
-
#
|
90
|
+
#
|
91
91
|
# @return [String, nil]
|
92
92
|
attribute :fragment, :string
|
93
93
|
|
@@ -362,33 +362,30 @@ module Ronin
|
|
362
362
|
number: uri.port
|
363
363
|
)
|
364
364
|
end
|
365
|
+
path = normalized_path(uri)
|
366
|
+
query = uri.query
|
367
|
+
fragment = uri.fragment
|
365
368
|
|
366
|
-
|
367
|
-
query
|
368
|
-
fragment = uri.fragment
|
369
|
-
|
370
|
-
query_params = []
|
371
|
-
|
372
|
-
if uri.respond_to?(:query_params)
|
373
|
-
# find or create the URL query params
|
374
|
-
uri.query_params.each do |name,value|
|
375
|
-
query_params << URLQueryParam.new(
|
376
|
-
name: URLQueryParamName.find_or_create_by(name: name),
|
377
|
-
value: value
|
378
|
-
)
|
379
|
-
end
|
380
|
-
end
|
381
|
-
|
382
|
-
# find or create the URL
|
369
|
+
# try to query a pre-existing URI then fallback to creating the URL
|
370
|
+
# with query params.
|
383
371
|
return find_or_create_by(
|
384
372
|
scheme: scheme,
|
385
373
|
host_name: host_name,
|
386
374
|
port: port,
|
387
375
|
path: path,
|
388
376
|
query: query,
|
389
|
-
fragment: fragment
|
390
|
-
|
391
|
-
|
377
|
+
fragment: fragment
|
378
|
+
) do |new_url|
|
379
|
+
if uri.respond_to?(:query_params)
|
380
|
+
# find or create the URL query params
|
381
|
+
uri.query_params.each do |name,value|
|
382
|
+
new_url.query_params << URLQueryParam.new(
|
383
|
+
name: URLQueryParamName.find_or_create_by(name: name),
|
384
|
+
value: value
|
385
|
+
)
|
386
|
+
end
|
387
|
+
end
|
388
|
+
end
|
392
389
|
end
|
393
390
|
|
394
391
|
#
|
@@ -430,9 +427,11 @@ module Ronin
|
|
430
427
|
scheme = if self.scheme
|
431
428
|
self.scheme.name
|
432
429
|
end
|
430
|
+
|
433
431
|
host = if self.host_name
|
434
432
|
self.host_name.name
|
435
433
|
end
|
434
|
+
|
436
435
|
port = if self.port
|
437
436
|
self.port.number
|
438
437
|
end
|
@@ -460,8 +459,6 @@ module Ronin
|
|
460
459
|
self.to_uri.to_s
|
461
460
|
end
|
462
461
|
|
463
|
-
protected
|
464
|
-
|
465
462
|
#
|
466
463
|
# Normalizes the path of a URI.
|
467
464
|
#
|
data/lib/ronin/db/url_scheme.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'yaml'
|
4
4
|
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
|
|
22
22
|
gem.homepage = gemspec['homepage']
|
23
23
|
gem.metadata = gemspec['metadata'] if gemspec['metadata']
|
24
24
|
|
25
|
-
glob =
|
25
|
+
glob = ->(patterns) { gem.files & Dir[*patterns] }
|
26
26
|
|
27
27
|
gem.files = `git ls-files`.split($/)
|
28
28
|
gem.files = glob[gemspec['files']] if gemspec['files']
|
@@ -46,7 +46,7 @@ Gem::Specification.new do |gem|
|
|
46
46
|
gem.required_rubygems_version = gemspec['required_rubygems_version']
|
47
47
|
gem.post_install_message = gemspec['post_install_message']
|
48
48
|
|
49
|
-
split =
|
49
|
+
split = ->(string) { string.split(/,\s*/) }
|
50
50
|
|
51
51
|
if gemspec['dependencies']
|
52
52
|
gemspec['dependencies'].each do |name,versions|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ronin-db-activerecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uri-query_params
|
@@ -66,6 +66,7 @@ files:
|
|
66
66
|
- ".github/workflows/ruby.yml"
|
67
67
|
- ".gitignore"
|
68
68
|
- ".rspec"
|
69
|
+
- ".rubocop.yml"
|
69
70
|
- ".ruby-version"
|
70
71
|
- ".yardopts"
|
71
72
|
- COPYING.txt
|
@@ -73,39 +74,39 @@ files:
|
|
73
74
|
- Gemfile
|
74
75
|
- README.md
|
75
76
|
- Rakefile
|
76
|
-
- db/migrate/
|
77
|
-
- db/migrate/
|
78
|
-
- db/migrate/
|
79
|
-
- db/migrate/
|
80
|
-
- db/migrate/
|
81
|
-
- db/migrate/
|
82
|
-
- db/migrate/
|
83
|
-
- db/migrate/
|
84
|
-
- db/migrate/
|
85
|
-
- db/migrate/
|
86
|
-
- db/migrate/
|
87
|
-
- db/migrate/
|
88
|
-
- db/migrate/
|
89
|
-
- db/migrate/
|
90
|
-
- db/migrate/
|
91
|
-
- db/migrate/
|
92
|
-
- db/migrate/
|
93
|
-
- db/migrate/
|
94
|
-
- db/migrate/
|
95
|
-
- db/migrate/
|
96
|
-
- db/migrate/
|
97
|
-
- db/migrate/
|
98
|
-
- db/migrate/
|
99
|
-
- db/migrate/
|
100
|
-
- db/migrate/
|
77
|
+
- db/migrate/0001_create_ronin_ip_addresses_table.rb
|
78
|
+
- db/migrate/0002_create_ronin_mac_addresses_table.rb
|
79
|
+
- db/migrate/0003_create_ronin_ip_address_mac_addresses_table.rb
|
80
|
+
- db/migrate/0004_create_ronin_host_names_table.rb
|
81
|
+
- db/migrate/0005_create_ronin_ports_table.rb
|
82
|
+
- db/migrate/0006_create_ronin_services_table.rb
|
83
|
+
- db/migrate/0007_create_ronin_open_ports_table.rb
|
84
|
+
- db/migrate/0008_create_ronin_url_schemes_table.rb
|
85
|
+
- db/migrate/0009_create_ronin_urls_table.rb
|
86
|
+
- db/migrate/0010_create_ronin_advisories_table.rb
|
87
|
+
- db/migrate/0011_create_ronin_vulnerabilities_table.rb
|
88
|
+
- db/migrate/0012_create_ronin_url_query_param_names_table.rb
|
89
|
+
- db/migrate/0013_create_ronin_user_names_table.rb
|
90
|
+
- db/migrate/0014_create_ronin_software_vendors_table.rb
|
91
|
+
- db/migrate/0015_create_ronin_host_name_ip_addresses_table.rb
|
92
|
+
- db/migrate/0016_create_ronin_arches_table.rb
|
93
|
+
- db/migrate/0017_create_ronin_email_addresses_table.rb
|
94
|
+
- db/migrate/0018_create_ronin_oses_table.rb
|
95
|
+
- db/migrate/0019_create_ronin_organizations_table.rb
|
96
|
+
- db/migrate/0020_create_ronin_os_guesses_table.rb
|
97
|
+
- db/migrate/0021_create_ronin_url_query_params_table.rb
|
98
|
+
- db/migrate/0022_create_ronin_passwords_table.rb
|
99
|
+
- db/migrate/0023_create_ronin_softwares_table.rb
|
100
|
+
- db/migrate/0024_create_ronin_countries_table.rb
|
101
|
+
- db/migrate/0025_create_ronin_credentials_table.rb
|
101
102
|
- db/migrate/0026_create_ronin_asns_table.rb
|
102
103
|
- db/migrate/0027_create_ronin_http_query_param_names_table.rb
|
103
|
-
- db/migrate/
|
104
|
-
- db/migrate/
|
105
|
-
- db/migrate/
|
106
|
-
- db/migrate/
|
107
|
-
- db/migrate/
|
108
|
-
- db/migrate/
|
104
|
+
- db/migrate/0028_create_ronin_http_responses_table.rb
|
105
|
+
- db/migrate/0029_create_ronin_http_requests_table.rb
|
106
|
+
- db/migrate/0030_create_ronin_http_query_params_table.rb
|
107
|
+
- db/migrate/0031_create_ronin_http_header_names_table.rb
|
108
|
+
- db/migrate/0032_create_ronin_http_request_headers_table.rb
|
109
|
+
- db/migrate/0033_create_ronin_http_response_headers_table.rb
|
109
110
|
- db/migrate/0034_create_ronin_service_credentials_table.rb
|
110
111
|
- db/migrate/0035_create_ronin_web_credentials_table.rb
|
111
112
|
- gemspec.yml
|
@@ -1,42 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# ronin-exploits - A Ruby library for ronin-rb that provides exploitation and
|
3
|
-
# payload crafting functionality.
|
4
|
-
#
|
5
|
-
# Copyright (c) 2007-2022-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
6
|
-
#
|
7
|
-
# This file is part of ronin-exploits.
|
8
|
-
#
|
9
|
-
# ronin-exploits is free software: you can redistribute it and/or modify
|
10
|
-
# it under the terms of the GNU General Public License as published by
|
11
|
-
# the Free Software Foundation, either version 3 of the License, or
|
12
|
-
# (at your option) any later version.
|
13
|
-
#
|
14
|
-
# ronin-exploits is distributed in the hope that it will be useful,
|
15
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
-
# GNU General Public License for more details.
|
18
|
-
#
|
19
|
-
# You should have received a copy of the GNU General Public License
|
20
|
-
# along with ronin-exploits. If not, see <https://www.gnu.org/licenses/>
|
21
|
-
#
|
22
|
-
|
23
|
-
#
|
24
|
-
# @api private
|
25
|
-
#
|
26
|
-
class CreateRoninAdvisoriesTable < ActiveRecord::Migration[7.0]
|
27
|
-
|
28
|
-
def change
|
29
|
-
create_table :ronin_advisories, id: false, if_not_exists: true do |t|
|
30
|
-
t.string :id, primary_key: true, null: false
|
31
|
-
|
32
|
-
t.string :prefix, null: false
|
33
|
-
t.integer :year, null: true
|
34
|
-
t.string :identifier, null: false
|
35
|
-
|
36
|
-
t.index :id, unique: true
|
37
|
-
t.index :publisher
|
38
|
-
t.index :year
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
end
|