ronin-db-activerecord contains ActiveRecord models and migrations for the Ronin Database. Provides database models storing and querying network data, advisory data, credentials, and OSINT data.
- Can be used both as a standalone library or in a web app.
- Provides common ActiveRecord models:
- Ronin::DB::Advisory
- Ronin::DB::Arch
- Ronin::DB::ASN
- Ronin::DB::Cert
- Ronin::DB::CertIssuer
- Ronin::DB::CertName
- Ronin::DB::CertSubject
- Ronin::DB::CertSubjectAltName
- Ronin::DB::DNSQuery
- Ronin::DB::DNSRecord
- Ronin::DB::EmailAddress
- Ronin::DB::HostName
- Ronin::DB::HostNameIPAddress
- Ronin::DB::HTTPHeaderName
- Ronin::DB::HTTPQueryParam
- Ronin::DB::HTTPQueryParamName
- Ronin::DB::HTTPRequest
- Ronin::DB::HTTPRequestHeader
- Ronin::DB::HTTPResponse
- Ronin::DB::HTTPResponseHeader
- Ronin::DB::IPAddress
- Ronin::DB::IPAddressMACAddress
- Ronin::DB::MACAddress
- Ronin::DB::Note
- Ronin::DB::OpenPort
- Ronin::DB::Organization
- Ronin::DB::OrganizationCustomer
- Ronin::DB::OrganizationDepartment
- Ronin::DB::OrganizationEmailAddress
- Ronin::DB::OrganizationHostName
- Ronin::DB::OrganizationIPAddress
- Ronin::DB::OrganizationMember
- Ronin::DB::OrganizationPhoneNumber
- Ronin::DB::OrganizationStreetAddress
- Ronin::DB::OS
- Ronin::DB::OSGuess
- Ronin::DB::Password
- Ronin::DB::Person
- Ronin::DB::PersonalConnection
- Ronin::DB::PersonalEmailAddress
- Ronin::DB::PersonalPhoneNumber
- Ronin::DB::PersonalStreetAddress
- Ronin::DB::PhoneNumber
- Ronin::DB::Port
- Ronin::DB::Service
- Ronin::DB::ServiceCredential
- Ronin::DB::Software
- Ronin::DB::SoftwareVendor
- Ronin::DB::StreetAddress
- Ronin::DB::URL
- Ronin::DB::URLQueryParam
- Ronin::DB::URLQueryParamName
- Ronin::DB::URLScheme
- Ronin::DB::UserName
- Ronin::DB::Vulnerability
- Ronin::DB::WebVuln
- Ronin::DB::WebCredential
- Has 98% documentation coverage.
- Has 99% test coverage.
Create a database:
require 'ronin/db/migrations'
ActiveRecord::Base.establish_connection(
adapter: 'sqlite3',
database: 'path/to/db.sqlite3'
)
Ronin::DB::Migrations.up
Connect to the database:
ActiveRecord::Base.establish_connection(
adapter: 'sqlite3',
database: 'path/to/db.sqlite3'
)
require 'ronin/db/models'
Ronin::DB::Models.connect
- Ruby >= 3.0.0
- activerecord ~> 7.0
$ gem install ronin-db-activerecord
gem 'ronin-db-activerecord', '~> 0.1'
gem.add_dependency 'ronin-db-activerecord', '~> 0.1'
- Fork It!
- Clone It!
cd ronin-db-activerecord/
bundle install
git checkout -b my_feature
- Code It!
bundle exec rake spec
git push origin my_feature
If you want to test your changes locally, run rake db:console
to start a
local database console.
Copyright (c) 2022-2024 Hal Brodigan ([email protected])
ronin-db-activerecord is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ronin-db-activerecord is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with ronin-db-activerecord. If not, see https://www.gnu.org/licenses/.