ronin-app 0.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +7 -0
  2. data/.dockerignore +3 -0
  3. data/.document +6 -0
  4. data/.env.dev +1 -0
  5. data/.github/workflows/ruby.yml +44 -0
  6. data/.gitignore +16 -0
  7. data/.rspec +1 -0
  8. data/.rubocop.yml +26 -0
  9. data/.ruby-version +1 -0
  10. data/.yardopts +1 -0
  11. data/CONTRIBUTING.md +34 -0
  12. data/COPYING.txt +661 -0
  13. data/ChangeLog.md +38 -0
  14. data/Dockerfile +27 -0
  15. data/Gemfile +61 -0
  16. data/Procfile +2 -0
  17. data/Procfile.dev +2 -0
  18. data/README.md +215 -0
  19. data/Rakefile +44 -0
  20. data/app/db.rb +680 -0
  21. data/app/scanning.rb +173 -0
  22. data/app.rb +372 -0
  23. data/bin/ronin-app +34 -0
  24. data/config/database.rb +17 -0
  25. data/config/puma.rb +24 -0
  26. data/config/redis.rb +4 -0
  27. data/config/sidekiq.rb +23 -0
  28. data/config/sidekiq.yml +12 -0
  29. data/config.ru +33 -0
  30. data/docker-compose.yml +45 -0
  31. data/etc/systemd/user/ronin-app-sidekiq.1.service +17 -0
  32. data/etc/systemd/user/ronin-app-web.1.service +18 -0
  33. data/etc/systemd/user/ronin-app.target +5 -0
  34. data/gemspec.yml +55 -0
  35. data/lib/middleware/sidekiq/active_record_connection_pool.rb +47 -0
  36. data/lib/ronin/app/cli.rb +197 -0
  37. data/lib/ronin/app/helpers/html.rb +71 -0
  38. data/lib/ronin/app/root.rb +28 -0
  39. data/lib/ronin/app/schemas/params_schema.rb +66 -0
  40. data/lib/ronin/app/schemas/payloads/build_schema.rb +56 -0
  41. data/lib/ronin/app/schemas/payloads/encoders/encode_schema.rb +60 -0
  42. data/lib/ronin/app/types/import.rb +35 -0
  43. data/lib/ronin/app/types/nmap.rb +81 -0
  44. data/lib/ronin/app/types/spider.rb +49 -0
  45. data/lib/ronin/app/types/vulns.rb +69 -0
  46. data/lib/ronin/app/types.rb +66 -0
  47. data/lib/ronin/app/validations/import_params.rb +71 -0
  48. data/lib/ronin/app/validations/install_repo_params.rb +78 -0
  49. data/lib/ronin/app/validations/masscan_params.rb +122 -0
  50. data/lib/ronin/app/validations/nmap_params.rb +183 -0
  51. data/lib/ronin/app/validations/recon_params.rb +86 -0
  52. data/lib/ronin/app/validations/spider_params.rb +103 -0
  53. data/lib/ronin/app/validations/vulns_params.rb +83 -0
  54. data/lib/ronin/app/version.rb +26 -0
  55. data/log/.gitkeep +0 -0
  56. data/man/ronin-app.1 +63 -0
  57. data/man/ronin-app.1.md +61 -0
  58. data/public/images/favicon.png +0 -0
  59. data/public/images/favicon.svg +78 -0
  60. data/public/images/logo.svg +78 -0
  61. data/public/images/sidekiq.svg +24 -0
  62. data/public/javascript/app.js +60 -0
  63. data/public/javascript/notes.js +28 -0
  64. data/public/javascript/tabs.js +40 -0
  65. data/public/stylesheets/app.css +216 -0
  66. data/public/stylesheets/bulma.min.css +1 -0
  67. data/ronin-app.gemspec +63 -0
  68. data/scripts/console +7 -0
  69. data/scripts/server +134 -0
  70. data/scripts/setup +447 -0
  71. data/scripts/update +55 -0
  72. data/tmp/.gitkeep +0 -0
  73. data/views/_authors.erb +62 -0
  74. data/views/_delete.erb +4 -0
  75. data/views/_delete_all.erb +4 -0
  76. data/views/_encoding_tabs.erb +25 -0
  77. data/views/_notes.erb +33 -0
  78. data/views/_pagination.erb +1 -0
  79. data/views/_param_fields.erb +66 -0
  80. data/views/_params.erb +35 -0
  81. data/views/about.erb +30 -0
  82. data/views/db/advisories/index.erb +30 -0
  83. data/views/db/advisories/show.erb +105 -0
  84. data/views/db/asns/index.erb +19 -0
  85. data/views/db/asns/show.erb +61 -0
  86. data/views/db/credentials/index.erb +30 -0
  87. data/views/db/credentials/show.erb +51 -0
  88. data/views/db/email_addresses/index.erb +30 -0
  89. data/views/db/email_addresses/show.erb +44 -0
  90. data/views/db/host_names/index.erb +30 -0
  91. data/views/db/host_names/show.erb +52 -0
  92. data/views/db/ip_addresses/index.erb +19 -0
  93. data/views/db/ip_addresses/show.erb +98 -0
  94. data/views/db/mac_addresses/index.erb +19 -0
  95. data/views/db/mac_addresses/show.erb +62 -0
  96. data/views/db/open_ports/index.erb +19 -0
  97. data/views/db/open_ports/show.erb +87 -0
  98. data/views/db/organizations/departments/show.erb +82 -0
  99. data/views/db/organizations/index.erb +28 -0
  100. data/views/db/organizations/members/show.erb +87 -0
  101. data/views/db/organizations/show.erb +111 -0
  102. data/views/db/oses/index.erb +19 -0
  103. data/views/db/oses/show.erb +46 -0
  104. data/views/db/passwords/index.erb +30 -0
  105. data/views/db/passwords/show.erb +52 -0
  106. data/views/db/people/index.erb +31 -0
  107. data/views/db/people/show.erb +120 -0
  108. data/views/db/phone_numbers/index.erb +30 -0
  109. data/views/db/phone_numbers/show.erb +63 -0
  110. data/views/db/ports/index.erb +30 -0
  111. data/views/db/ports/show.erb +70 -0
  112. data/views/db/services/index.erb +30 -0
  113. data/views/db/services/show.erb +65 -0
  114. data/views/db/software/index.erb +19 -0
  115. data/views/db/software/show.erb +52 -0
  116. data/views/db/software_vendors/index.erb +19 -0
  117. data/views/db/software_vendors/show.erb +36 -0
  118. data/views/db/street_addresses/index.erb +19 -0
  119. data/views/db/street_addresses/show.erb +63 -0
  120. data/views/db/url_query_param_names/index.erb +19 -0
  121. data/views/db/url_query_param_names/show.erb +50 -0
  122. data/views/db/url_schemes/index.erb +19 -0
  123. data/views/db/url_schemes/show.erb +36 -0
  124. data/views/db/urls/index.erb +30 -0
  125. data/views/db/urls/show.erb +103 -0
  126. data/views/db/user_names/index.erb +30 -0
  127. data/views/db/user_names/show.erb +48 -0
  128. data/views/db/vulns/index.erb +19 -0
  129. data/views/db/vulns/show.erb +104 -0
  130. data/views/db.erb +152 -0
  131. data/views/exploits/index.erb +9 -0
  132. data/views/exploits/show.erb +100 -0
  133. data/views/import.erb +30 -0
  134. data/views/index.erb +7 -0
  135. data/views/layout.erb +98 -0
  136. data/views/masscan.erb +459 -0
  137. data/views/nmap.erb +1009 -0
  138. data/views/payloads/build.erb +19 -0
  139. data/views/payloads/encoders/encode.erb +35 -0
  140. data/views/payloads/encoders/index.erb +9 -0
  141. data/views/payloads/encoders/show.erb +47 -0
  142. data/views/payloads/index.erb +9 -0
  143. data/views/payloads/show.erb +47 -0
  144. data/views/queue.erb +28 -0
  145. data/views/recon.erb +55 -0
  146. data/views/repos/index.erb +30 -0
  147. data/views/repos/install.erb +45 -0
  148. data/views/repos/show.erb +39 -0
  149. data/views/spider.erb +372 -0
  150. data/views/vulns.erb +214 -0
  151. data/workers/import.rb +96 -0
  152. data/workers/install_repo.rb +40 -0
  153. data/workers/masscan.rb +135 -0
  154. data/workers/nmap.rb +216 -0
  155. data/workers/purge_repos.rb +40 -0
  156. data/workers/recon.rb +95 -0
  157. data/workers/remove_repo.rb +40 -0
  158. data/workers/spider.rb +148 -0
  159. data/workers/update_repo.rb +42 -0
  160. data/workers/update_repos.rb +40 -0
  161. data/workers/vulns.rb +111 -0
  162. data/workers.rb +37 -0
  163. metadata +538 -0
@@ -0,0 +1,25 @@
1
+ <div class="tabs is-boxed">
2
+ <ul>
3
+ <li class="is-active"><a data-tab-id="built-payload-raw">Raw</a></li>
4
+ <li><a data-tab-id="built-payload-hex">Hex</a></li>
5
+ <li><a data-tab-id="built-payload-c">C</a></li>
6
+ <li><a data-tab-id="built-payload-shell">Shell</a></li>
7
+ <li><a data-tab-id="built-payload-powershell">PowerShell</a></li>
8
+ <li><a data-tab-id="built-payload-xml">XML</a></li>
9
+ <li><a data-tab-id="built-payload-html">HTML</a></li>
10
+ <li><a data-tab-id="built-payload-js">JavaScript</a></li>
11
+ <li><a data-tab-id="built-payload-ruby">Ruby</a></li>
12
+ </ul>
13
+ </div>
14
+
15
+ <div class="tabs-content">
16
+ <pre id="built-payload-raw"><%=h string %></pre>
17
+ <pre id="built-payload-hex"><%=h Ronin::Support::Encoding::Hex.quote(string) %></pre>
18
+ <pre id="built-payload-c"><%=h Ronin::Support::Encoding::C.quote(string) %></pre>
19
+ <pre id="built-payload-shell"><%=h Ronin::Support::Encoding::Shell.quote(string) %></pre>
20
+ <pre id="built-payload-powershell"><%=h Ronin::Support::Encoding::PowerShell.quote(string) %></pre>
21
+ <pre id="built-payload-xml"><%=h Ronin::Support::Encoding::XML.encode(string) %></pre>
22
+ <pre id="built-payload-html"><%=h Ronin::Support::Encoding::HTML.encode(string) %></pre>
23
+ <pre id="built-payload-js"><%=h Ronin::Support::Encoding::JS.quote(string) %></pre>
24
+ <pre id="built-payload-ruby"><%=h Ronin::Support::Encoding::Ruby.quote(string) %></pre>
25
+ </div>
data/views/_notes.erb ADDED
@@ -0,0 +1,33 @@
1
+ <script type="text/javascript" src="/javascript/notes.js"></script>
2
+
3
+ <% unless notes.empty? %>
4
+ <h3>Notes</h3>
5
+ <% notes.each do |note| %>
6
+ <div class="box">
7
+ <div class="columns is-full">
8
+ <div class="column">
9
+ <h4 class="mb-0"><%= note.body %></h4>
10
+ <small>Created at: <%= note.created_at %></small>
11
+ </div>
12
+ <div class="column is-one-fifth has-text-right">
13
+ <button class="button is-danger is-small delete-note " data-note-id=<%= note.id %>>X</button>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ <% end %>
18
+ <% end %>
19
+
20
+ <div class="control mt-4">
21
+ <form action=<%="#{request.path_info}/notes"%> method="POST">
22
+ <div class="media-content">
23
+ <div class="field">
24
+ <textarea class="textarea" name="body" placeholder="Add a note..."></textarea>
25
+ </div>
26
+ <div class="field">
27
+ <p class="control">
28
+ <button type="submit" class="button is-primary">Add note</button>
29
+ </p>
30
+ </div>
31
+ </div>
32
+ </form>
33
+ </div>
@@ -0,0 +1 @@
1
+ <%= pagy_bulma_nav(pagy) if pagy.pages > 1 %>
@@ -0,0 +1,66 @@
1
+ <% title ||= 'Params' %>
2
+ <% params_values ||= params[:params] %>
3
+ <% prefix ||= 'params' %>
4
+
5
+ <h2><%=h title %></h2>
6
+
7
+ <% object.class.params.each do |name,param| %>
8
+ <div class="field">
9
+ <label class="label"><%=h name %></label>
10
+
11
+ <% default_value = object.params[name] %>
12
+
13
+ <div class="control">
14
+ <% case param.type
15
+ when Ronin::Core::Params::Types::Boolean %>
16
+ <% if @errors && @errors[name] %>
17
+ <input class="checkbox is-danger" type="checkbox" name="<%=h prefix %>[<%=h name %>]" value="<%=h params_values && params_values[name] %><%= " checked" if default_value %>">
18
+
19
+ <% @errors[name].each do |error| %>
20
+ <p class="help is-danger"><%=h error %></p>
21
+ <% end %>
22
+ <% else %>
23
+ <input class="checkbox" type="checkbox" name="<%=h prefix %>[<%=h name %>]" value="<%=h params_values && params_values[name] %><%= " checked" if default_value %>">
24
+ <% end %>
25
+ <% when Ronin::Core::Params::Types::Enum %>
26
+ <% if @errors && @errors[name] %>
27
+ <select class="select is-danger" name="<%=h prefix %>[<%=h name %>]">
28
+ <% unless param.required? %>
29
+ <option value="" />
30
+ <% end %>
31
+
32
+ <% param.type.values.each do |value| %>
33
+ <option value="<%=h value %>"<%= " selected" if (params_values && params_values[name] == value.to_s) || (value == default_value)%><%=h value %></option>
34
+ <% end %>
35
+ </select>
36
+
37
+ <% @errors[name].each do |error| %>
38
+ <p class="help is-danger"><%=h error %></p>
39
+ <% end %>
40
+ <% else %>
41
+ <select class="select" name="<%=h prefix %>[<%=h name %>]">
42
+ <% unless param.required? %>
43
+ <option value="" />
44
+ <% end %>
45
+
46
+ <% param.type.values.each do |value| %>
47
+ <option value="<%=h value %>"<%= " selected" if (params_values && params_values[name] == value.to_s) || (value == default_value)%><%=h value %></option>
48
+ <% end %>
49
+ </select>
50
+ <% end %>
51
+ <% else %>
52
+ <% if @errors && @errors[name] %>
53
+ <input class="input is-danger" type="text" name="<%=h prefix %>[<%=h name %>]" placeholder="<%=h default_value %>" value="<%=h params_values && params_values[name] %>">
54
+
55
+ <% @errors[name].each do |error| %>
56
+ <p class="help is-danger"><%=h error %></p>
57
+ <% end %>
58
+ <% else %>
59
+ <input class="input" type="text" name="<%=h prefix %>[<%=h name %>]" placeholder="<%=h default_value %>" value="<%=h params_values && params_values[name] %>">
60
+ <% end %>
61
+ <% end %>
62
+ </div>
63
+
64
+ <p class="help"><%=h param.desc %></p>
65
+ </div>
66
+ <% end %>
data/views/_params.erb ADDED
@@ -0,0 +1,35 @@
1
+ <table class="table">
2
+ <thead>
3
+ <tr>
4
+ <td>Name</td>
5
+ <td>Type</td>
6
+ <td>Required</td>
7
+ <td>Default</td>
8
+ <td>Description</td>
9
+ </tr>
10
+ </thead>
11
+
12
+ <tbody>
13
+ <% params.each do |name,param| %>
14
+ <tr>
15
+ <td>
16
+ <kbd><%=h name %></kbd>
17
+ </td>
18
+ <td>
19
+ <kbd><%=h param.type.class.name.split('::').last %></kbd>
20
+ </td>
21
+ <td>
22
+ <% if param.required? %>
23
+ <strong>Required</strong>
24
+ <% end %>
25
+ </td>
26
+ <td>
27
+ <kbd><%=h param.default_value %></kbd>
28
+ </td>
29
+ <td>
30
+ <%=h param.desc %>
31
+ </td>
32
+ </tr>
33
+ <% end %>
34
+ </tbody>
35
+ </table>
data/views/about.erb ADDED
@@ -0,0 +1,30 @@
1
+ <h1>ronin-app <%=h Ronin::App::VERSION %></h1>
2
+
3
+ <h2>OS</h2>
4
+
5
+ <pre><code><%=h `uname -a` %></code></pre>
6
+
7
+ <h2>Ruby</h2>
8
+
9
+ <pre><code><%=h RUBY_DESCRIPTION %></code></pre>
10
+
11
+ <h2>Nmap</h2>
12
+
13
+ <pre><code><%=h `nmap --version` %></code></pre>
14
+
15
+ <h2>Masscan</h2>
16
+
17
+ <pre><code><%=h `masscan --version` %></code></pre>
18
+
19
+ <h2>Gems</h2>
20
+
21
+ <table class="table">
22
+ <tbody>
23
+ <% @lockfile.specs.each do |spec| %>
24
+ <tr>
25
+ <td><%=h spec.name %></td>
26
+ <td><%=h spec.version %></td>
27
+ </tr>
28
+ <% end %>
29
+ </tbody>
30
+ </table>
@@ -0,0 +1,30 @@
1
+ <% content_for :breadcrumbs do %>
2
+ <nav class="breadcrumb" aria-label="breadcrumbs">
3
+ <ul>
4
+ <li><a href="/">Home</a></li>
5
+ <li><a href="/db">Database</a></li>
6
+ </ul>
7
+ </nav>
8
+ <% end %>
9
+
10
+ <div class="is-flex is-justify-content-space-between">
11
+ <h1>Advisories</h1>
12
+ <%= partial(:delete_all, path: "advisories") %>
13
+ </div>
14
+
15
+ <form action="/db/advisories/import" method="post" class="mb-5">
16
+ <div class="field has-addons">
17
+ <div class="mr-1">
18
+ <input class="input" name="id" placeholder="ID"></input>
19
+ </div>
20
+ <div>
21
+ <button type="submit" class="button is-primary">Import</button>
22
+ </div>
23
+ </div>
24
+ </form>
25
+
26
+ <% @advisories.each do |advisory| %>
27
+ <p><a href="/db/advisories/<%=h advisory.id %>"><%=h advisory %></a></p>
28
+ <% end %>
29
+
30
+ <%= partial(:pagination, pagy: @pagy) %>
@@ -0,0 +1,105 @@
1
+ <% content_for :breadcrumbs do %>
2
+ <nav class="breadcrumb" aria-label="breadcrumbs">
3
+ <ul>
4
+ <li><a href="/">Home</a></li>
5
+ <li><a href="/db">Database</a></li>
6
+ <li><a href="/db/advisories">Advisories</a></li>
7
+ </ul>
8
+ </nav>
9
+ <% end %>
10
+
11
+ <div class="is-flex is-justify-content-space-between">
12
+ <h1>Advisory: <%=h @advisory %></h1>
13
+ <%= partial(:delete, record: @advisory, path: "advisories") %>
14
+ </div>
15
+
16
+ <table class="table">
17
+ <tbody>
18
+ <tr>
19
+ <td><strong>ID:</strong></td>
20
+ <td><%=h @advisory.id %></td>
21
+ </tr>
22
+
23
+ <tr>
24
+ <td><strong>Prefix:</strong></td>
25
+ <td><%=h @advisory.prefix %></td>
26
+ </tr>
27
+
28
+ <tr>
29
+ <td><strong>Year:</strong></td>
30
+ <td><%=h @advisory.year %></td>
31
+ </tr>
32
+
33
+ <tr>
34
+ <td><strong>Identifier:</strong></td>
35
+ <td><%=h @advisory.identifier %></td>
36
+ </tr>
37
+
38
+ <tr>
39
+ <td><strong>IP Addresses:</strong></td>
40
+ <td>
41
+ <% @advisory.ip_addresses.each do |ip_address| %>
42
+ <p>
43
+ <a href="/db/ip_addresses/<%=h ip_address.id %>">
44
+ <%=h ip_address %>
45
+ </a>
46
+ </p>
47
+ <% end %>
48
+ </td>
49
+ </tr>
50
+
51
+ <tr>
52
+ <td><strong>Open Ports:</strong></td>
53
+ <td>
54
+ <% @advisory.open_ports.each do |open_port| %>
55
+ <p>
56
+ <a href="/db/open_ports/<%=h open_port.id %>">
57
+ <%=h open_port %>
58
+ </a>
59
+ </p>
60
+ <% end %>
61
+ </td>
62
+ </tr>
63
+
64
+ <tr>
65
+ <td><strong>Host Names:</strong></td>
66
+ <td>
67
+ <% @advisory.host_names.each do |host_name| %>
68
+ <p>
69
+ <a href="/db/host_names/<%=h host_name.id %>">
70
+ <%=h host_name %>
71
+ </a>
72
+ </p>
73
+ <% end %>
74
+ </td>
75
+ </tr>
76
+
77
+ <tr>
78
+ <td><strong>URLs:</strong></td>
79
+ <td>
80
+ <% @advisory.urls.each do |url| %>
81
+ <p>
82
+ <a href="/db/urls/<%=h url.id %>">
83
+ <%=h url %>
84
+ </a>
85
+ </p>
86
+ <% end %>
87
+ </td>
88
+ </tr>
89
+
90
+ <tr>
91
+ <td><strong>MAC Addresses:</strong></td>
92
+ <td>
93
+ <% @advisory.mac_addresses.each do |mac_address| %>
94
+ <p>
95
+ <a href="/db/mac_addresses/<%=h mac_address.id %>">
96
+ <%=h mac_address %>
97
+ </a>
98
+ </p>
99
+ <% end %>
100
+ </td>
101
+ </tr>
102
+ </tbody>
103
+ </table>
104
+
105
+ <%= partial(:notes, notes: @advisory.notes) %>
@@ -0,0 +1,19 @@
1
+ <% content_for :breadcrumbs do %>
2
+ <nav class="breadcrumb" aria-label="breadcrumbs">
3
+ <ul>
4
+ <li><a href="/">Home</a></li>
5
+ <li><a href="/db">Database</a></li>
6
+ </ul>
7
+ </nav>
8
+ <% end %>
9
+
10
+ <div class="is-flex is-justify-content-space-between">
11
+ <h1>ASNs</h1>
12
+ <%= partial(:delete_all, path: "asns") %>
13
+ </div>
14
+
15
+ <% @asns.each do |asn| %>
16
+ <p><a href="/db/asns/<%=h asn.id %>"><%=h asn %></a></p>
17
+ <% end %>
18
+
19
+ <%= partial(:pagination, pagy: @pagy) %>
@@ -0,0 +1,61 @@
1
+ <% content_for :breadcrumbs do %>
2
+ <nav class="breadcrumb" aria-label="breadcrumbs">
3
+ <ul>
4
+ <li><a href="/">Home</a></li>
5
+ <li><a href="/db">Database</a></li>
6
+ <li><a href="/db/asns">ASNs</a></li>
7
+ </ul>
8
+ </nav>
9
+ <% end %>
10
+
11
+ <div class="is-flex is-justify-content-space-between">
12
+ <h1>ASN: <%=h @asn %></h1>
13
+ <%= partial(:delete, record: @asn, path: "asns") %>
14
+ </div>
15
+
16
+ <table class="table">
17
+ <tbody>
18
+ <tr>
19
+ <td><strong>IP Version:</strong></td>
20
+ <td><%=h @asn.version %></td>
21
+ </tr>
22
+
23
+ <tr>
24
+ <td><strong>Range Start:</strong></td>
25
+ <td><%=h @asn.range_start %></td>
26
+ </tr>
27
+
28
+ <tr>
29
+ <td><strong>Range End:</strong></td>
30
+ <td><%=h @asn.range_end %></td>
31
+ </tr>
32
+
33
+ <tr>
34
+ <td><strong>Number:</strong></td>
35
+ <td><%=h @asn.number %></td>
36
+ </tr>
37
+
38
+ <tr>
39
+ <td><strong>Country Code:</strong></td>
40
+ <td><%=h @asn.country_code %></td>
41
+ </tr>
42
+
43
+ <tr>
44
+ <td><strong>Name:</strong></td>
45
+ <td><%=h @asn.name %></td>
46
+ </tr>
47
+
48
+ <tr>
49
+ <td><strong>IP Addresses:</strong></td>
50
+ <td>
51
+ <% @asn.ip_addresses.each do |ip_address| %>
52
+ <p>
53
+ <a href="/db/ip_addresses/<%=h ip_address.id %>">
54
+ <%=h ip_address %>
55
+ </a>
56
+ </p>
57
+ <% end %>
58
+ </td>
59
+ </tr>
60
+ </tbody>
61
+ </table>
@@ -0,0 +1,30 @@
1
+ <% content_for :breadcrumbs do %>
2
+ <nav class="breadcrumb" aria-label="breadcrumbs">
3
+ <ul>
4
+ <li><a href="/">Home</a></li>
5
+ <li><a href="/db">Database</a></li>
6
+ </ul>
7
+ </nav>
8
+ <% end %>
9
+
10
+ <div class="is-flex is-justify-content-space-between">
11
+ <h1>Credentials</h1>
12
+ <%= partial(:delete_all, path: "credentials") %>
13
+ </div>
14
+
15
+ <form action="/db/credentials/import" method="post" class="mb-5">
16
+ <div class="field has-addons">
17
+ <div class="mr-1">
18
+ <input class="input" name="cred" placeholder="user@example.com:password"></input>
19
+ </div>
20
+ <div>
21
+ <button type="submit" class="button is-primary">Import</button>
22
+ </div>
23
+ </div>
24
+ </form>
25
+
26
+ <% @credentials.each do |credential| %>
27
+ <p><a href="/db/credentials/<%=h credential.id %>"><%=h credential %></a></p>
28
+ <% end %>
29
+
30
+ <%= partial(:pagination, pagy: @pagy) %>
@@ -0,0 +1,51 @@
1
+ <% content_for :breadcrumbs do %>
2
+ <nav class="breadcrumb" aria-label="breadcrumbs">
3
+ <ul>
4
+ <li><a href="/">Home</a></li>
5
+ <li><a href="/db">Database</a></li>
6
+ <li><a href="/db/credentials">Credentials</a></li>
7
+ </ul>
8
+ </nav>
9
+ <% end %>
10
+
11
+ <div class="is-flex is-justify-content-space-between">
12
+ <h1>Credential: <%=h @credential %></h1>
13
+ <%= partial(:delete, record: @credential, path: "credentials") %>
14
+ </div>
15
+
16
+ <table class="table">
17
+ <tbody>
18
+ <tr>
19
+ <td><strong>User Name:</strong></td>
20
+ <td>
21
+ <% if @credential.user_name %>
22
+ <a href="/db/user_names/<%=h @credential.user_name.id %>">
23
+ <%=h @credential.user_name %>
24
+ </a>
25
+ <% end %>
26
+ </td>
27
+ </tr>
28
+
29
+ <tr>
30
+ <td><strong>Email Address:</strong></td>
31
+ <td>
32
+ <% if @credential.email_address %>
33
+ <a href="/db/email_address/<%=h @credential.email_address.id %>">
34
+ <%=h @credential.user_name %>
35
+ </a>
36
+ <% end %>
37
+ </td>
38
+ </tr>
39
+
40
+ <tr>
41
+ <td><strong>Password:</strong></td>
42
+ <td>
43
+ <a href="/db/passwords/<%=h @credential.password.id %>">
44
+ <%=h @credential.password %>
45
+ </a>
46
+ </td>
47
+ </tr>
48
+ </tbody>
49
+ </table>
50
+
51
+ <%= partial(:notes, notes: @credential.notes) %>
@@ -0,0 +1,30 @@
1
+ <% content_for :breadcrumbs do %>
2
+ <nav class="breadcrumb" aria-label="breadcrumbs">
3
+ <ul>
4
+ <li><a href="/">Home</a></li>
5
+ <li><a href="/db">Database</a></li>
6
+ </ul>
7
+ </nav>
8
+ <% end %>
9
+
10
+ <div class="is-flex is-justify-content-space-between">
11
+ <h1>Email Addresses</h1>
12
+ <%= partial(:delete_all, path: "email_addresses") %>
13
+ </div>
14
+
15
+ <form action="/db/email_addresses/import" method="post" class="mb-5">
16
+ <div class="field has-addons">
17
+ <div class="mr-1">
18
+ <input class="input" name="email_address" placeholder="example@domain.com"></input>
19
+ </div>
20
+ <div>
21
+ <button type="submit" class="button is-primary">Import</button>
22
+ </div>
23
+ </div>
24
+ </form>
25
+
26
+ <% @email_addresses.each do |email_address| %>
27
+ <p><a href="/db/email_addresses/<%=h email_address.id %>"><%=h email_address %></a></p>
28
+ <% end %>
29
+
30
+ <%= partial(:pagination, pagy: @pagy) %>
@@ -0,0 +1,44 @@
1
+ <% content_for :breadcrumbs do %>
2
+ <nav class="breadcrumb" aria-label="breadcrumbs">
3
+ <ul>
4
+ <li><a href="/">Home</a></li>
5
+ <li><a href="/db">Database</a></li>
6
+ <li><a href="/db/ip_addresses">IP Addresses</a></li>
7
+ </ul>
8
+ </nav>
9
+ <% end %>
10
+
11
+ <div class="is-flex is-justify-content-space-between">
12
+ <h1>Email Address: <%=h @email_address %></h1>
13
+ <%= partial(:delete, record: @email_address, path: "email_addresses") %>
14
+ </div>
15
+
16
+ <table class="table">
17
+ <tbody>
18
+ <tr>
19
+ <td><strong>Address:</strong></td>
20
+ <td><%=h @email_address.address %></td>
21
+ </tr>
22
+
23
+ <tr>
24
+ <td><strong>User Name:</strong></td>
25
+ <td>
26
+ <a href="/db/user_names/<%=h @email_address.user_name.id %>">
27
+ <%=h @email_address.user_name %>
28
+ </a>
29
+ </td>
30
+ </tr>
31
+
32
+ <tr>
33
+ <td><strong>Host Name:</strong></td>
34
+ <td>
35
+ <a href="/db/host_names/<%=h @email_address.host_name.id %>">
36
+ <%=h @email_address.host_name %>
37
+ </a>
38
+ </td>
39
+ </tr>
40
+ </tbody>
41
+ </table>
42
+
43
+
44
+ <%= partial(:notes, notes: @email_address.notes) %>
@@ -0,0 +1,30 @@
1
+ <% content_for :breadcrumbs do %>
2
+ <nav class="breadcrumb" aria-label="breadcrumbs">
3
+ <ul>
4
+ <li><a href="/">Home</a></li>
5
+ <li><a href="/db">Database</a></li>
6
+ </ul>
7
+ </nav>
8
+ <% end %>
9
+
10
+ <div class="is-flex is-justify-content-space-between">
11
+ <h1>Host names</h1>
12
+ <%= partial(:delete_all, path: "host_names") %>
13
+ </div>
14
+
15
+ <form action="/db/host_names/import" method="post" class="mb-5">
16
+ <div class="field has-addons">
17
+ <div class="mr-1">
18
+ <input class="input" name="host_name" placeholder="example.com"></input>
19
+ </div>
20
+ <div>
21
+ <button type="submit" class="button is-primary">Import</button>
22
+ </div>
23
+ </div>
24
+ </form>
25
+
26
+ <% @host_names.each do |host_name| %>
27
+ <p><a href="/db/host_names/<%=h host_name.id %>"><%=h host_name %></a></p>
28
+ <% end %>
29
+
30
+ <%= partial(:pagination, pagy: @pagy) %>
@@ -0,0 +1,52 @@
1
+ <% content_for :breadcrumbs do %>
2
+ <nav class="breadcrumb" aria-label="breadcrumbs">
3
+ <ul>
4
+ <li><a href="/">Home</a></li>
5
+ <li><a href="/db">Database</a></li>
6
+ <li><a href="/db/host_names">Host Names</a></li>
7
+ </ul>
8
+ </nav>
9
+ <% end %>
10
+
11
+ <div class="is-flex is-justify-content-space-between">
12
+ <h1>Host Name: <%=h @host_name %></h1>
13
+ <%= partial(:delete, record: @host_name, path: "host_names") %>
14
+ </div>
15
+
16
+ <table class="table">
17
+ <tbody>
18
+ <tr>
19
+ <td><strong>IP Addresses:</strong></td>
20
+ <td>
21
+ <% @host_name.ip_addresses.each do |ip_address| %>
22
+ <p><a href="/db/ip_addresses/<%=h ip_address.id %>"><%=h ip_address %></a></p>
23
+ <% end %>
24
+ </td>
25
+ </tr>
26
+
27
+ <tr>
28
+ <td><strong>Advisories:</strong></td>
29
+ <td>
30
+ <% @host_name.advisories.each do |advisory| %>
31
+ <p>
32
+ <a href="/db/advisories/<%=h advisory.id %>">
33
+ <%=h advisory %>
34
+ </a>
35
+ </p>
36
+ <% end %>
37
+ </td>
38
+ </tr>
39
+
40
+ <tr>
41
+ <td><strong>Created:</strong></td>
42
+ <td><%=h @host_name.created_at %></td>
43
+ </tr>
44
+
45
+ <tr>
46
+ <td><strong>Scanned:</strong></td>
47
+ <td><%=h @host_name.last_scanned_at %></td>
48
+ </tr>
49
+ </tbody>
50
+ </table>
51
+
52
+ <%= partial(:notes, notes: @host_name.notes) %>