ronin-app 0.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.dockerignore +3 -0
- data/.document +6 -0
- data/.env.dev +1 -0
- data/.github/workflows/ruby.yml +44 -0
- data/.gitignore +16 -0
- data/.rspec +1 -0
- data/.rubocop.yml +26 -0
- data/.ruby-version +1 -0
- data/.yardopts +1 -0
- data/CONTRIBUTING.md +34 -0
- data/COPYING.txt +661 -0
- data/ChangeLog.md +38 -0
- data/Dockerfile +27 -0
- data/Gemfile +61 -0
- data/Procfile +2 -0
- data/Procfile.dev +2 -0
- data/README.md +215 -0
- data/Rakefile +44 -0
- data/app/db.rb +680 -0
- data/app/scanning.rb +173 -0
- data/app.rb +372 -0
- data/bin/ronin-app +34 -0
- data/config/database.rb +17 -0
- data/config/puma.rb +24 -0
- data/config/redis.rb +4 -0
- data/config/sidekiq.rb +23 -0
- data/config/sidekiq.yml +12 -0
- data/config.ru +33 -0
- data/docker-compose.yml +45 -0
- data/etc/systemd/user/ronin-app-sidekiq.1.service +17 -0
- data/etc/systemd/user/ronin-app-web.1.service +18 -0
- data/etc/systemd/user/ronin-app.target +5 -0
- data/gemspec.yml +55 -0
- data/lib/middleware/sidekiq/active_record_connection_pool.rb +47 -0
- data/lib/ronin/app/cli.rb +197 -0
- data/lib/ronin/app/helpers/html.rb +71 -0
- data/lib/ronin/app/root.rb +28 -0
- data/lib/ronin/app/schemas/params_schema.rb +66 -0
- data/lib/ronin/app/schemas/payloads/build_schema.rb +56 -0
- data/lib/ronin/app/schemas/payloads/encoders/encode_schema.rb +60 -0
- data/lib/ronin/app/types/import.rb +35 -0
- data/lib/ronin/app/types/nmap.rb +81 -0
- data/lib/ronin/app/types/spider.rb +49 -0
- data/lib/ronin/app/types/vulns.rb +69 -0
- data/lib/ronin/app/types.rb +66 -0
- data/lib/ronin/app/validations/import_params.rb +71 -0
- data/lib/ronin/app/validations/install_repo_params.rb +78 -0
- data/lib/ronin/app/validations/masscan_params.rb +122 -0
- data/lib/ronin/app/validations/nmap_params.rb +183 -0
- data/lib/ronin/app/validations/recon_params.rb +86 -0
- data/lib/ronin/app/validations/spider_params.rb +103 -0
- data/lib/ronin/app/validations/vulns_params.rb +83 -0
- data/lib/ronin/app/version.rb +26 -0
- data/log/.gitkeep +0 -0
- data/man/ronin-app.1 +63 -0
- data/man/ronin-app.1.md +61 -0
- data/public/images/favicon.png +0 -0
- data/public/images/favicon.svg +78 -0
- data/public/images/logo.svg +78 -0
- data/public/images/sidekiq.svg +24 -0
- data/public/javascript/app.js +60 -0
- data/public/javascript/notes.js +28 -0
- data/public/javascript/tabs.js +40 -0
- data/public/stylesheets/app.css +216 -0
- data/public/stylesheets/bulma.min.css +1 -0
- data/ronin-app.gemspec +63 -0
- data/scripts/console +7 -0
- data/scripts/server +134 -0
- data/scripts/setup +447 -0
- data/scripts/update +55 -0
- data/tmp/.gitkeep +0 -0
- data/views/_authors.erb +62 -0
- data/views/_delete.erb +4 -0
- data/views/_delete_all.erb +4 -0
- data/views/_encoding_tabs.erb +25 -0
- data/views/_notes.erb +33 -0
- data/views/_pagination.erb +1 -0
- data/views/_param_fields.erb +66 -0
- data/views/_params.erb +35 -0
- data/views/about.erb +30 -0
- data/views/db/advisories/index.erb +30 -0
- data/views/db/advisories/show.erb +105 -0
- data/views/db/asns/index.erb +19 -0
- data/views/db/asns/show.erb +61 -0
- data/views/db/credentials/index.erb +30 -0
- data/views/db/credentials/show.erb +51 -0
- data/views/db/email_addresses/index.erb +30 -0
- data/views/db/email_addresses/show.erb +44 -0
- data/views/db/host_names/index.erb +30 -0
- data/views/db/host_names/show.erb +52 -0
- data/views/db/ip_addresses/index.erb +19 -0
- data/views/db/ip_addresses/show.erb +98 -0
- data/views/db/mac_addresses/index.erb +19 -0
- data/views/db/mac_addresses/show.erb +62 -0
- data/views/db/open_ports/index.erb +19 -0
- data/views/db/open_ports/show.erb +87 -0
- data/views/db/organizations/departments/show.erb +82 -0
- data/views/db/organizations/index.erb +28 -0
- data/views/db/organizations/members/show.erb +87 -0
- data/views/db/organizations/show.erb +111 -0
- data/views/db/oses/index.erb +19 -0
- data/views/db/oses/show.erb +46 -0
- data/views/db/passwords/index.erb +30 -0
- data/views/db/passwords/show.erb +52 -0
- data/views/db/people/index.erb +31 -0
- data/views/db/people/show.erb +120 -0
- data/views/db/phone_numbers/index.erb +30 -0
- data/views/db/phone_numbers/show.erb +63 -0
- data/views/db/ports/index.erb +30 -0
- data/views/db/ports/show.erb +70 -0
- data/views/db/services/index.erb +30 -0
- data/views/db/services/show.erb +65 -0
- data/views/db/software/index.erb +19 -0
- data/views/db/software/show.erb +52 -0
- data/views/db/software_vendors/index.erb +19 -0
- data/views/db/software_vendors/show.erb +36 -0
- data/views/db/street_addresses/index.erb +19 -0
- data/views/db/street_addresses/show.erb +63 -0
- data/views/db/url_query_param_names/index.erb +19 -0
- data/views/db/url_query_param_names/show.erb +50 -0
- data/views/db/url_schemes/index.erb +19 -0
- data/views/db/url_schemes/show.erb +36 -0
- data/views/db/urls/index.erb +30 -0
- data/views/db/urls/show.erb +103 -0
- data/views/db/user_names/index.erb +30 -0
- data/views/db/user_names/show.erb +48 -0
- data/views/db/vulns/index.erb +19 -0
- data/views/db/vulns/show.erb +104 -0
- data/views/db.erb +152 -0
- data/views/exploits/index.erb +9 -0
- data/views/exploits/show.erb +100 -0
- data/views/import.erb +30 -0
- data/views/index.erb +7 -0
- data/views/layout.erb +98 -0
- data/views/masscan.erb +459 -0
- data/views/nmap.erb +1009 -0
- data/views/payloads/build.erb +19 -0
- data/views/payloads/encoders/encode.erb +35 -0
- data/views/payloads/encoders/index.erb +9 -0
- data/views/payloads/encoders/show.erb +47 -0
- data/views/payloads/index.erb +9 -0
- data/views/payloads/show.erb +47 -0
- data/views/queue.erb +28 -0
- data/views/recon.erb +55 -0
- data/views/repos/index.erb +30 -0
- data/views/repos/install.erb +45 -0
- data/views/repos/show.erb +39 -0
- data/views/spider.erb +372 -0
- data/views/vulns.erb +214 -0
- data/workers/import.rb +96 -0
- data/workers/install_repo.rb +40 -0
- data/workers/masscan.rb +135 -0
- data/workers/nmap.rb +216 -0
- data/workers/purge_repos.rb +40 -0
- data/workers/recon.rb +95 -0
- data/workers/remove_repo.rb +40 -0
- data/workers/spider.rb +148 -0
- data/workers/update_repo.rb +42 -0
- data/workers/update_repos.rb +40 -0
- data/workers/vulns.rb +111 -0
- data/workers.rb +37 -0
- metadata +538 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e807463567097ddf828ab12bc5c0d75fc1ea05d7c7c755d67e6550d6cd368776
|
4
|
+
data.tar.gz: 54f0e5ae8cbb25d1749e6896060d1345ffdc3086085ea7317d4f7fe8e56543a1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3e7ec51601d1f88f7993157c6b9c0bf315e8cfda3b6daf8eb43da9239f4e0177fb94ce156601de05c41d2a4595a48697dc4aec96de9647dc804dd068e8e559f7
|
7
|
+
data.tar.gz: 6efcab13cc6137d69581a0cc4f8e9b79eb97082e5add7b1f8f68a7861646daee311ad1d3246d1478e2d683a864554167dd76f73db4a8a9ee16e91d25a4be1f9f
|
data/.dockerignore
ADDED
data/.document
ADDED
data/.env.dev
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
DATABASE_URL=sqlite3:db/dev.sqlite3
|
@@ -0,0 +1,44 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [ push, pull_request ]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
tests:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
fail-fast: false
|
10
|
+
matrix:
|
11
|
+
ruby:
|
12
|
+
- '3.1'
|
13
|
+
- '3.2'
|
14
|
+
- '3.3'
|
15
|
+
name: Ruby ${{ matrix.ruby }}
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v4
|
18
|
+
- name: Set up Ruby
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby }}
|
22
|
+
bundler-cache: true
|
23
|
+
- name: Install dependencies
|
24
|
+
run: |
|
25
|
+
sudo apt update -y && \
|
26
|
+
sudo apt install -y --no-install-recommends --no-install-suggests libsqlite3-dev
|
27
|
+
- name: Install dependencies
|
28
|
+
run: bundle install --jobs 4 --retry 3
|
29
|
+
- name: Run tests
|
30
|
+
run: bundle exec rake test
|
31
|
+
|
32
|
+
# rubocop linting
|
33
|
+
rubocop:
|
34
|
+
runs-on: ubuntu-latest
|
35
|
+
steps:
|
36
|
+
- uses: actions/checkout@v4
|
37
|
+
- name: Set up Ruby
|
38
|
+
uses: ruby/setup-ruby@v1
|
39
|
+
with:
|
40
|
+
ruby-version: 3.0
|
41
|
+
- name: Install dependencies
|
42
|
+
run: bundle install --jobs 4 --retry 3
|
43
|
+
- name: Run rubocop
|
44
|
+
run: bundle exec rubocop --parallel
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour --format documentation
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,26 @@
|
|
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-app specific exceptions
|
11
|
+
#
|
12
|
+
|
13
|
+
# dry-types constructor requires an explicit block with one block argument
|
14
|
+
Style/SymbolProc:
|
15
|
+
Exclude:
|
16
|
+
- 'lib/ronin/app/types.rb'
|
17
|
+
|
18
|
+
# $redis global variable is fine.
|
19
|
+
Style/GlobalVars:
|
20
|
+
Exclude:
|
21
|
+
- 'config/redis.rb'
|
22
|
+
|
23
|
+
# in lib/schema we use Dry::Schema::Params() style class-methods
|
24
|
+
Naming/MethodName:
|
25
|
+
Exclude:
|
26
|
+
- 'lib/ronin/app/schemas/**/*'
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-3.1
|
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--markup markdown --title 'Ronin::App Documentation' --protected
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
* Typo, spelling mistake, and CSS fixes are welcomed and appreciated.
|
4
|
+
* Please develop against [Ruby] 3.1.x.
|
5
|
+
* Please make sure new code passes `bundle exec rubocop` style checking.
|
6
|
+
* Please write tests for all new code and make sure they pass.
|
7
|
+
|
8
|
+
## What is NOT allowed
|
9
|
+
|
10
|
+
* HAML, Slim, and other HTML templating engines are NOT allowed.
|
11
|
+
Please use regular [ERB] that renders [HTML5].
|
12
|
+
* SASS/SCSS are NOT allowed. Only use vanilla [CSS4].
|
13
|
+
* JavaScript frameworks are NOT allowed. This means NO React, Angular, Svelte,
|
14
|
+
etc. Only use [vanilla ES6 JavaScript][vanilla.js].
|
15
|
+
* JavaScript packers/compilers are NOT allowed. This means no Babel or Webpack.
|
16
|
+
All JavaScript must be loaded directly or via [import maps].
|
17
|
+
* No external assets. All images, CSS, and JavaScript must be vendored in
|
18
|
+
`public/stylesheets/` or `public/javascript/` so that the app can be used
|
19
|
+
offline.
|
20
|
+
* No Rails dependencies. While we do use [ActiveRecord] for [ronin-db],
|
21
|
+
I prefer to avoid using [activesupport] or any other Rails dependencies to
|
22
|
+
keep the codebase as lightweight and simple as possible. Instead look for
|
23
|
+
[dry-rb] or [sinatra-] alternatives.
|
24
|
+
|
25
|
+
[Ruby]: https://www.ruby-lang.org/
|
26
|
+
[ERB]: https://docs.ruby-lang.org/en/3.1/ERB.html
|
27
|
+
[HTML5]: https://dev.w3.org/html5/spec-LC/
|
28
|
+
[CSS4]: https://developer.mozilla.org/en-US/docs/Web/CSS
|
29
|
+
[vanilla.js]: http://vanilla-js.com/
|
30
|
+
[import maps]: https://github.com/WICG/import-maps#readme
|
31
|
+
[ActiveRecord]: https://guides.rubyonrails.org/active_record_basics.html
|
32
|
+
[activesupport]: https://www.rubydoc.info/gems/activesupport
|
33
|
+
[dry-rb]: https://www.dry-rb.org/
|
34
|
+
[sinatra-]: https://rubygems.org/search?query=sinatra-
|