Code Monkey home page Code Monkey logo

ronin-db-activerecord's People

Contributors

ai-mozi avatar postmodern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ronin-db-activerecord's Issues

Make `WebCredential` into a join model

Change WebCredential to be a join model between Credential and URL. This will allow associating the same credential pair (ex: user:password or email:password) with multiple URLs.

Add a `Note` model

Add a Note model for associating arbitrary text nodes with IPAddresses, HostNames, URLs, etc.

`URL.import` is not de-duplicating URLs

URL.import is not de-duplicating URLs that are already in the database. This appears to be due to find_or_create_by() not performing the find() query if one of the attributes is an empty Array. The other reason is that SQL UNIQUE INDEXs are not enforced on columns which allow NULL values.

Add custom inflections for acronyms used in model names

Since certain model names contain acronyms, we must configure ActiveSupport::Inflector to preserve them as acronyms instead of converting them to CamelCase when converting the model name into a human readable name:

  • Wrong: IPAddress.model_name.human # => "Ip address"
  • Correct: IPAddress.model_name.human # => "IP address"

Make `ServiceCredential` into a join model

Change ServiceCredential to be a join model between Credential and OpenPort. This will allow associating the same credential pair (ex: user:password or email:password) with multiple services.

Add rubocop

Add rubocop to the repository.

  • Add the rubocop gem to the Gemfile.
  • Start with the template rubocop.yml file which closely matches Ronin's general code style.
  • Add the rubocop task and add it to the CI.

Add an ERD diagram based on the models/schema

Generate an ERD diagram based on the models/schema to show the structure of the models/associations. The catch is that this is only a library of ActiveRecord models, so it might be tricky to use existing Rails ERD plugins. YMMV

Add missing specs for `URL` query methods

  • URL.http
  • URI.https
  • URL.with_host_name
  • URL.with_port_number
  • URL.with_directory
  • URL.with_ext
  • URL.with_query_param
  • URL.with_query_param_name
  • URL.with_query_param_value
  • URL.find_url

Re-order the `db/migrate/` migrations

Re-order the db/migrate/ files such that any time a reference is created the referenced table should be created before the migration. This will allow the migrations to run on a PostgreSQL database which requires the referenced table to exist before the reference is created.

Add a `Cert` model

Add a Cert model for storing SSL/TLS certificate information. The model should store the serial number, common_name, and other subject fields. In order to store the data in a normalized fashion, we will also need CertSubject, CertIssuer, and CertSubjectAltName models as well. The Cert module should also have an .import class method which accepts an OpenSSL::X509::Certificate object.

Add models for storing ASN ranges

It must be possible to store and query ASN ranges. Must store the following columns:

  • first_ip / first_ip_uint
  • last_ip / last_ip_uint
  • prefix
  • country_code
  • name

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.