ronin-db-activerecord 0.1.4 → 0.1.6
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 +1 -0
- data/ChangeLog.md +17 -0
- data/Gemfile +2 -1
- data/db/migrate/0036_add_software_id_column_to_open_ports_table.rb +33 -0
- data/gemspec.yml +1 -1
- data/lib/ronin/db/arch.rb +1 -1
- data/lib/ronin/db/email_address.rb +2 -2
- data/lib/ronin/db/host_name.rb +3 -2
- data/lib/ronin/db/http_request.rb +18 -18
- data/lib/ronin/db/os.rb +1 -1
- data/lib/ronin/db/port.rb +1 -1
- data/lib/ronin/db/software_vendor.rb +10 -3
- data/lib/ronin/db/vulnerability.rb +2 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 641f203f12ca2e88ac5de9f8a8c5fe6fbf5da527b7108102d55f0e65934ea641
|
4
|
+
data.tar.gz: a55081d93e685f8232ae74e54bd99a5f242b40834d5ea55792ec08f3dc184782
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f090ebd86546fed4ba74bada319aaaf6c524360b4f48745042aa8d5b5118c50c3e5d3224143c6fa3901546b456dd853dd1fe97853e9c259b76f8ad284e8fec0b
|
7
|
+
data.tar.gz: 833ab9ec1142ba4363a42453c874bde62c2b049fb3662dfe3870c9d4eeed38948d0faff22dcdc85b9db71c8610dde8d0393e2ef51779f3df76ee4102c1957f39
|
data/.github/workflows/ruby.yml
CHANGED
data/ChangeLog.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
### 0.1.6 / 2024-06-19
|
2
|
+
|
3
|
+
* Improve the validation of email addresses passed to
|
4
|
+
{Ronin::DB::EmailAddress.import}.
|
5
|
+
* Add missing `software_id` column to the `ronin_open_ports` table.
|
6
|
+
* Add missing `foreign_key` to {Ronin::DB::SoftwareVendor#software}.
|
7
|
+
* Add missing `class_name` to {Ronin::DB::Vulnerability#url}.
|
8
|
+
* Add missing `dependent: :destroy` to {Ronin::DB::HostName#urls}.
|
9
|
+
* Add missing `dependent: :destroy` to {Ronin::DB::HostName#email_addresses}.
|
10
|
+
|
11
|
+
### 0.1.5 / 2023-12-13
|
12
|
+
|
13
|
+
* Corrected {Ronin::DB::HTTPRequest#request_method} to accept and store
|
14
|
+
uppercase HTTP verbs (ex: `GET`).
|
15
|
+
* Corrected {Ronin::DB::HTTPRequest#request_method} helper methods to use the
|
16
|
+
singular suffix of `_request?` (ex: `get_request?`).
|
17
|
+
|
1
18
|
### 0.1.4 / 2023-10-16
|
2
19
|
|
3
20
|
* Require [activerecord] `~> 7.0`.
|
data/Gemfile
CHANGED
@@ -8,7 +8,8 @@ gem 'sqlite3', '~> 1.0', platforms: [:mri, :truffleruby]
|
|
8
8
|
|
9
9
|
platform :jruby do
|
10
10
|
gem 'jruby-openssl', '~> 0.7'
|
11
|
-
gem 'activerecord-jdbcsqlite3-adapter', '~> 70.0
|
11
|
+
gem 'activerecord-jdbcsqlite3-adapter', '~> 70.0'
|
12
|
+
gem 'activerecord', '< 7.1.0'
|
12
13
|
end
|
13
14
|
|
14
15
|
group :development do
|
@@ -0,0 +1,33 @@
|
|
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
|
+
# Adds the `software_id` column to the `ronin_open_ports` table.
|
25
|
+
#
|
26
|
+
class AddSoftwareIdColumnToOpenPortsTable < ActiveRecord::Migration[7.0]
|
27
|
+
def change
|
28
|
+
add_reference :ronin_open_ports, :software, null: true,
|
29
|
+
foreign_key: {
|
30
|
+
to_table: :ronin_softwares
|
31
|
+
}
|
32
|
+
end
|
33
|
+
end
|
data/gemspec.yml
CHANGED
data/lib/ronin/db/arch.rb
CHANGED
@@ -159,8 +159,8 @@ module Ronin
|
|
159
159
|
# @api public
|
160
160
|
#
|
161
161
|
def self.import(email)
|
162
|
-
|
163
|
-
raise(ArgumentError,"email address #{email.inspect}
|
162
|
+
unless email =~ URI::MailTo::EMAIL_REGEXP
|
163
|
+
raise(ArgumentError,"invalid email address: #{email.inspect}")
|
164
164
|
end
|
165
165
|
|
166
166
|
normalized_email = email.downcase
|
data/lib/ronin/db/host_name.rb
CHANGED
@@ -92,13 +92,14 @@ module Ronin
|
|
92
92
|
# The email addresses that are associated with the host-name.
|
93
93
|
#
|
94
94
|
# @return [Array<EmailAddress>]
|
95
|
-
has_many :email_addresses
|
95
|
+
has_many :email_addresses, dependent: :destroy
|
96
96
|
|
97
97
|
# @!attribute [rw] urls
|
98
98
|
# The URLs that point to this host name.
|
99
99
|
#
|
100
100
|
# @return [Array<URL>]
|
101
|
-
has_many :urls,
|
101
|
+
has_many :urls, dependent: :destroy,
|
102
|
+
class_name: 'URL'
|
102
103
|
|
103
104
|
#
|
104
105
|
# Looks up the host name.
|
@@ -48,24 +48,24 @@ module Ronin
|
|
48
48
|
# @!attribute [rw] request_method
|
49
49
|
# The request method.
|
50
50
|
#
|
51
|
-
# @return [
|
52
|
-
enum request_method:
|
53
|
-
:
|
54
|
-
:
|
55
|
-
:
|
56
|
-
:
|
57
|
-
:
|
58
|
-
:
|
59
|
-
:
|
60
|
-
:
|
61
|
-
:
|
62
|
-
:
|
63
|
-
:
|
64
|
-
:
|
65
|
-
:
|
66
|
-
:
|
67
|
-
:
|
68
|
-
|
51
|
+
# @return ["copy", "delete", "get", "head", "lock", "mkcol", "move", "options", "patch", "post", "propfind", "proppatch", "put", "trace", "unlock"]
|
52
|
+
enum request_method: {
|
53
|
+
copy: 'COPY',
|
54
|
+
delete: 'DELETE',
|
55
|
+
get: 'GET',
|
56
|
+
head: 'HEAD',
|
57
|
+
lock: 'LOCK',
|
58
|
+
mkcol: 'MKCOL',
|
59
|
+
move: 'MOVE',
|
60
|
+
options: 'OPTIONS',
|
61
|
+
patch: 'PATCH',
|
62
|
+
post: 'POST',
|
63
|
+
propfind: 'PROPFIND',
|
64
|
+
proppatch: 'PROPPATCH',
|
65
|
+
put: 'PUT',
|
66
|
+
trace: 'TRACE',
|
67
|
+
unlock: 'UNLOCK'
|
68
|
+
}, _suffix: :request
|
69
69
|
validates :request_method, presence: true
|
70
70
|
|
71
71
|
# @!attribute [rw] path
|
data/lib/ronin/db/os.rb
CHANGED
data/lib/ronin/db/port.rb
CHANGED
@@ -40,7 +40,7 @@ module Ronin
|
|
40
40
|
# @!attribute [rw] protocol
|
41
41
|
# The protocol of the port (either `'tcp'` / `'udp'`).
|
42
42
|
#
|
43
|
-
# @return [
|
43
|
+
# @return ["tcp", "udp"]
|
44
44
|
enum :protocol, {tcp: 'tcp', udp: 'udp'}, default: :tcp
|
45
45
|
validates :protocol, presence: true
|
46
46
|
|
@@ -31,11 +31,18 @@ module Ronin
|
|
31
31
|
include Model
|
32
32
|
include Model::HasUniqueName
|
33
33
|
|
34
|
-
#
|
34
|
+
# @!attribute [rw] id
|
35
|
+
# The primary-key of the vendor
|
36
|
+
#
|
37
|
+
# @return [Integer]
|
35
38
|
attribute :id, :integer
|
36
39
|
|
37
|
-
#
|
38
|
-
|
40
|
+
# @!attribute [rw] software
|
41
|
+
# Products published by the vendor
|
42
|
+
#
|
43
|
+
# @return [Array<Software>]
|
44
|
+
has_many :software, class_name: 'Software',
|
45
|
+
foreign_key: :vendor_id
|
39
46
|
|
40
47
|
end
|
41
48
|
end
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uri-query_params
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- db/migrate/0033_create_ronin_http_response_headers_table.rb
|
110
110
|
- db/migrate/0034_create_ronin_service_credentials_table.rb
|
111
111
|
- db/migrate/0035_create_ronin_web_credentials_table.rb
|
112
|
+
- db/migrate/0036_add_software_id_column_to_open_ports_table.rb
|
112
113
|
- gemspec.yml
|
113
114
|
- lib/ronin/db/address.rb
|
114
115
|
- lib/ronin/db/advisory.rb
|
@@ -177,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
178
|
- !ruby/object:Gem::Version
|
178
179
|
version: '0'
|
179
180
|
requirements: []
|
180
|
-
rubygems_version: 3.3.
|
181
|
+
rubygems_version: 3.3.27
|
181
182
|
signing_key:
|
182
183
|
specification_version: 4
|
183
184
|
summary: ActiveRecord backend for the Ronin Database
|