ronin-db-activerecord 0.1.0 → 0.1.1
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.
- 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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7721bd84ea50f21af938f496faf1699c3107782131ca9db874eb101b19abf759
|
|
4
|
+
data.tar.gz: f4394aed731c6f2d83124d870ba29da9258c034828bc4ca96643f5a9b9267d46
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e4d44293f4877cfa1e2aa1c806b6f1b3ada40c58fe0b1d38702bc41dce1c898c7d89f6684bf24bf28888db87f7560c141fda2ea504c3ac5134c8603f0ce8e63
|
|
7
|
+
data.tar.gz: 2f003abce7ad7327b7c843ccb12d272af041f2b2f058afb3e2e7bb573e2ef9986aa8dd9c2fa35179837e21e3aef929524b389459de3ee12e06bce1c05ed77b50
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -30,3 +30,17 @@ jobs:
|
|
|
30
30
|
run: bundle install --jobs 4 --retry 3
|
|
31
31
|
- name: Run tests
|
|
32
32
|
run: bundle exec rake test
|
|
33
|
+
|
|
34
|
+
# rubocop linting
|
|
35
|
+
rubocop:
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v2
|
|
39
|
+
- name: Set up Ruby
|
|
40
|
+
uses: ruby/setup-ruby@v1
|
|
41
|
+
with:
|
|
42
|
+
ruby-version: 3.0
|
|
43
|
+
- name: Install dependencies
|
|
44
|
+
run: bundle install --jobs 4 --retry 3
|
|
45
|
+
- name: Run rubocop
|
|
46
|
+
run: bundle exec rubocop --parallel
|
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
NewCops: enable
|
|
3
|
+
SuggestExtensions: false
|
|
4
|
+
TargetRubyVersion: 3.1
|
|
5
|
+
|
|
6
|
+
inherit_gem:
|
|
7
|
+
rubocop-ronin: rubocop.yml
|
|
8
|
+
|
|
9
|
+
#
|
|
10
|
+
# ronin-db-activerecord specific exceptions
|
|
11
|
+
#
|
|
12
|
+
|
|
13
|
+
# robucop mistakes :x86_64 for a "symbol number"
|
|
14
|
+
Naming/VariableNumber:
|
|
15
|
+
AllowedIdentifiers:
|
|
16
|
+
- x86_64
|
data/ChangeLog.md
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
### 0.1.
|
|
1
|
+
### 0.1.1 / 2023-04-04
|
|
2
|
+
|
|
3
|
+
* Reordered database migrations so they can be ran in correct order on
|
|
4
|
+
PostgreSQL databases.
|
|
5
|
+
* Fixed {Ronin::DB::URL.import} to correctly de-duplicate pre-existing URLs.
|
|
6
|
+
* Fixed `ronin_advisories.publisher` index on non-existent column.
|
|
7
|
+
* Added an index on the `ronin_advisories.identifier` column.
|
|
8
|
+
* Added missing unique index to `ronin_urls` table.
|
|
9
|
+
* Documentation improvements.
|
|
10
|
+
|
|
11
|
+
### 0.1.0 / 2023-02-01
|
|
2
12
|
|
|
3
13
|
* Initial release:
|
|
4
14
|
* Can be used both as a standalone library or in a web app.
|
data/Gemfile
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
source 'https://rubygems.org'
|
|
2
4
|
|
|
3
5
|
gemspec
|
|
@@ -24,4 +26,6 @@ group :development do
|
|
|
24
26
|
gem 'dead_end', require: false
|
|
25
27
|
gem 'sord', require: false, platform: :mri
|
|
26
28
|
gem 'stackprof', require: false, platform: :mri
|
|
29
|
+
gem 'rubocop', require: false, platform: :mri
|
|
30
|
+
gem 'rubocop-ronin', require: false, platform: :mri
|
|
27
31
|
end
|
data/README.md
CHANGED
|
@@ -54,7 +54,7 @@ ronin-db-activerecord contains [ActiveRecord] models and migrations for the
|
|
|
54
54
|
* [Ronin::DB::UserName]
|
|
55
55
|
* [Ronin::DB::Vulnerability]
|
|
56
56
|
* [Ronin::DB::WebCredential]
|
|
57
|
-
* Has
|
|
57
|
+
* Has 98% documentation coverage.
|
|
58
58
|
* Has 99% test coverage.
|
|
59
59
|
|
|
60
60
|
[Ronin::DB::Advisory]: https://ronin-rb.dev/docs/ronin-db-activerecord/Ronin/DB/Advisory.html
|
data/Rakefile
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
begin
|
|
4
4
|
require 'bundler'
|
|
5
5
|
rescue LoadError => e
|
|
6
6
|
warn e.message
|
|
7
7
|
warn "Run `gem install bundler` to install Bundler"
|
|
8
|
-
exit
|
|
8
|
+
exit(-1)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
begin
|
|
@@ -67,6 +67,6 @@ namespace :db do
|
|
|
67
67
|
require 'irb'
|
|
68
68
|
include Ronin::DB
|
|
69
69
|
ARGV.clear
|
|
70
|
-
IRB.start
|
|
70
|
+
IRB.start
|
|
71
71
|
end
|
|
72
72
|
end
|
data/db/migrate/{0014_create_ronin_ip_addresses_table.rb → 0001_create_ronin_ip_addresses_table.rb}
RENAMED
|
@@ -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_ip_addresses` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninIpAddressesTable < 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_mac_addresses` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninMacAddressesTable < 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_ip_address_mac_addresses` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninIpAddressMacAddressesTable < ActiveRecord::Migration[7.0]
|
|
23
27
|
|
|
24
28
|
def change
|
data/db/migrate/{0009_create_ronin_host_names_table.rb → 0004_create_ronin_host_names_table.rb}
RENAMED
|
@@ -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_host_names` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninHostNamesTable < 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_ports` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninPortsTable < 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_services` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninServicesTable < ActiveRecord::Migration[7.0]
|
|
23
27
|
|
|
24
28
|
def change
|
data/db/migrate/{0018_create_ronin_open_ports_table.rb → 0007_create_ronin_open_ports_table.rb}
RENAMED
|
@@ -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_open_ports` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninOpenPortsTable < ActiveRecord::Migration[7.0]
|
|
23
27
|
|
|
24
28
|
def change
|
data/db/migrate/{0003_create_ronin_url_schemes_table.rb → 0008_create_ronin_url_schemes_table.rb}
RENAMED
|
@@ -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_url_schemes` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninUrlSchemesTable < 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_urls` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninUrlsTable < ActiveRecord::Migration[7.0]
|
|
23
27
|
|
|
24
28
|
def change
|
|
@@ -44,6 +48,7 @@ class CreateRoninUrlsTable < ActiveRecord::Migration[7.0]
|
|
|
44
48
|
t.index :scheme_id
|
|
45
49
|
t.index :host_name_id
|
|
46
50
|
t.index :port_id
|
|
51
|
+
t.index [:scheme_id, :host_name_id, :port_id, :path, :query, :fragment], unique: true, name: 'url_index'
|
|
47
52
|
end
|
|
48
53
|
end
|
|
49
54
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
#
|
|
3
|
+
# ronin-db-activerecord - ActiveRecord backend for the Ronin Database.
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2022-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
6
|
+
#
|
|
7
|
+
# This file is part of ronin-db-activerecord.
|
|
8
|
+
#
|
|
9
|
+
# ronin-db-activerecord is free software: you can redistribute it and/or modify
|
|
10
|
+
# it under the terms of the GNU Lesser General Public License as published
|
|
11
|
+
# by the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
# (at your option) any later version.
|
|
13
|
+
#
|
|
14
|
+
# ronin-db-activerecord 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 Lesser General Public License for more details.
|
|
18
|
+
#
|
|
19
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
20
|
+
# along with ronin-db-activerecord. If not, see <https://www.gnu.org/licenses/>.
|
|
21
|
+
#
|
|
22
|
+
|
|
23
|
+
#
|
|
24
|
+
# Creates the `ronin_advisories` table.
|
|
25
|
+
#
|
|
26
|
+
# @api private
|
|
27
|
+
#
|
|
28
|
+
class CreateRoninAdvisoriesTable < ActiveRecord::Migration[7.0]
|
|
29
|
+
|
|
30
|
+
def change
|
|
31
|
+
create_table :ronin_advisories, id: false, if_not_exists: true do |t|
|
|
32
|
+
t.string :id, primary_key: true, null: false
|
|
33
|
+
|
|
34
|
+
t.string :prefix, null: false
|
|
35
|
+
t.integer :year, null: true
|
|
36
|
+
t.string :identifier, null: false
|
|
37
|
+
|
|
38
|
+
t.index :id, unique: true
|
|
39
|
+
t.index :prefix
|
|
40
|
+
t.index :year
|
|
41
|
+
t.index :identifier
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
end
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
1
2
|
#
|
|
2
|
-
# ronin-
|
|
3
|
-
# payload crafting functionality.
|
|
3
|
+
# ronin-db-activerecord - ActiveRecord backend for the Ronin Database.
|
|
4
4
|
#
|
|
5
|
-
# Copyright (c)
|
|
5
|
+
# Copyright (c) 2022-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
|
6
6
|
#
|
|
7
|
-
# This file is part of ronin-
|
|
7
|
+
# This file is part of ronin-db-activerecord.
|
|
8
8
|
#
|
|
9
|
-
# ronin-
|
|
10
|
-
# it under the terms of the GNU General Public License as published
|
|
11
|
-
# the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
# ronin-db-activerecord is free software: you can redistribute it and/or modify
|
|
10
|
+
# it under the terms of the GNU Lesser General Public License as published
|
|
11
|
+
# by the Free Software Foundation, either version 3 of the License, or
|
|
12
12
|
# (at your option) any later version.
|
|
13
13
|
#
|
|
14
|
-
# ronin-
|
|
14
|
+
# ronin-db-activerecord is distributed in the hope that it will be useful,
|
|
15
15
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
16
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
-
# GNU General Public License for more details.
|
|
17
|
+
# GNU Lesser General Public License for more details.
|
|
18
18
|
#
|
|
19
|
-
# You should have received a copy of the GNU General Public License
|
|
20
|
-
# along with ronin-
|
|
19
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
20
|
+
# along with ronin-db-activerecord. If not, see <https://www.gnu.org/licenses/>.
|
|
21
21
|
#
|
|
22
22
|
|
|
23
|
+
#
|
|
24
|
+
# Creates the `ronin_vulnerabilities` table.
|
|
25
|
+
#
|
|
23
26
|
class CreateRoninVulnerabilitiesTable < ActiveRecord::Migration[7.0]
|
|
24
27
|
|
|
25
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_url_query_param_names` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninUrlQueryParamNamesTable < ActiveRecord::Migration[7.0]
|
|
23
27
|
|
|
24
28
|
def change
|
data/db/migrate/{0005_create_ronin_user_names_table.rb → 0013_create_ronin_user_names_table.rb}
RENAMED
|
@@ -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_user_names` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninUserNamesTable < 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_software_vendors` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninSoftwareVendorsTable < 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_host_name_ip_addresses` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninHostNameIpAddressesTable < 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,8 @@
|
|
|
19
20
|
# along with ronin-db-activerecord. If not, see <https://www.gnu.org/licenses/>.
|
|
20
21
|
#
|
|
21
22
|
|
|
23
|
+
#
|
|
24
|
+
# Creates the `ronin_arches` table.
|
|
22
25
|
#
|
|
23
26
|
# @api private
|
|
24
27
|
#
|
|
@@ -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_email_addresses` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninEmailAddressesTable < 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_oses` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninOsesTable < 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_organizations` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninOrganizationsTable < ActiveRecord::Migration[7.0]
|
|
23
27
|
|
|
24
28
|
def change
|
data/db/migrate/{0015_create_ronin_os_guesses_table.rb → 0020_create_ronin_os_guesses_table.rb}
RENAMED
|
@@ -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_os_guesses` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninOsGuessesTable < 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_url_query_params` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninUrlQueryParamsTable < ActiveRecord::Migration[7.0]
|
|
23
27
|
|
|
24
28
|
def change
|
data/db/migrate/{0017_create_ronin_passwords_table.rb → 0022_create_ronin_passwords_table.rb}
RENAMED
|
@@ -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_passwords` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninPasswordsTable < ActiveRecord::Migration[7.0]
|
|
23
27
|
|
|
24
28
|
def change
|
data/db/migrate/{0020_create_ronin_softwares_table.rb → 0023_create_ronin_softwares_table.rb}
RENAMED
|
@@ -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,15 +20,16 @@
|
|
|
19
20
|
# along with ronin-db-activerecord. If not, see <https://www.gnu.org/licenses/>.
|
|
20
21
|
#
|
|
21
22
|
|
|
23
|
+
#
|
|
24
|
+
# Creates the `ronin_softwares` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninSoftwaresTable < ActiveRecord::Migration[7.0]
|
|
23
27
|
|
|
24
28
|
def change
|
|
25
29
|
create_table :ronin_softwares, if_not_exists: true do |t|
|
|
26
30
|
t.string :name, null: false
|
|
27
31
|
t.string :version, null: false
|
|
28
|
-
t.references :vendor, foreign_key: {
|
|
29
|
-
to_table: :ronin_software_vendors
|
|
30
|
-
}
|
|
32
|
+
t.references :vendor, foreign_key: {to_table: :ronin_software_vendors}
|
|
31
33
|
|
|
32
34
|
t.index [:name, :version], unique: true
|
|
33
35
|
t.index :name
|
data/db/migrate/{0022_create_ronin_countries_table.rb → 0024_create_ronin_countries_table.rb}
RENAMED
|
@@ -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_countries` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninCountriesTable < ActiveRecord::Migration[7.0]
|
|
23
27
|
|
|
24
28
|
def change
|
data/db/migrate/{0024_create_ronin_credentials_table.rb → 0025_create_ronin_credentials_table.rb}
RENAMED
|
@@ -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_credentials` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninCredentialsTable < 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_asns` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninAsnsTable < 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_query_param_names` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninHttpQueryParamNamesTable < 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_responses` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninHttpResponsesTable < ActiveRecord::Migration[7.0]
|
|
23
27
|
|
|
24
28
|
def change
|
|
@@ -26,9 +30,7 @@ class CreateRoninHttpResponsesTable < ActiveRecord::Migration[7.0]
|
|
|
26
30
|
t.integer :status, null: false
|
|
27
31
|
t.text :body
|
|
28
32
|
|
|
29
|
-
t.references :response, foreign_key: {
|
|
30
|
-
to_table: :ronin_http_responses
|
|
31
|
-
}
|
|
33
|
+
t.references :response, foreign_key: {to_table: :ronin_http_responses}
|
|
32
34
|
|
|
33
35
|
t.datetime :created_at, null: false
|
|
34
36
|
end
|
|
@@ -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_requests` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninHttpRequestsTable < ActiveRecord::Migration[7.0]
|
|
23
27
|
|
|
24
28
|
def change
|
|
@@ -28,9 +32,7 @@ class CreateRoninHttpRequestsTable < ActiveRecord::Migration[7.0]
|
|
|
28
32
|
t.string :path, null: false
|
|
29
33
|
t.text :body
|
|
30
34
|
|
|
31
|
-
t.references :response, foreign_key: {
|
|
32
|
-
to_table: :ronin_http_responses
|
|
33
|
-
}
|
|
35
|
+
t.references :response, foreign_key: {to_table: :ronin_http_responses}
|
|
34
36
|
|
|
35
37
|
t.datetime :created_at, null: false
|
|
36
38
|
|
|
@@ -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_query_params` table.
|
|
25
|
+
#
|
|
22
26
|
class CreateRoninHttpQueryParamsTable < ActiveRecord::Migration[7.0]
|
|
23
27
|
|
|
24
28
|
def change
|