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,46 @@
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/oses">OSes</a></li>
7
+ </ul>
8
+ </nav>
9
+ <% end %>
10
+
11
+ <div class="is-flex is-justify-content-space-between">
12
+ <h1>OS: <%=h @os %></h1>
13
+ <%= partial(:delete, record: @os, path: "oses") %>
14
+ </div>
15
+
16
+ <table class="table">
17
+ <tbody>
18
+ <tr>
19
+ <td><strong>Flavor:</strong></td>
20
+ <td><%=h @os.flavor_before_type_cast %></td>
21
+ </tr>
22
+
23
+ <tr>
24
+ <td><strong>Name:</strong></td>
25
+ <td><%=h @os.name %></td>
26
+ </tr>
27
+
28
+ <tr>
29
+ <td><strong>Version:</strong></td>
30
+ <td><%=h @os.version %></td>
31
+ </tr>
32
+
33
+ <tr>
34
+ <td><strong>IP Addresses:</strong></td>
35
+ <td>
36
+ <% @os.ip_addresses.each do |ip_address| %>
37
+ <p>
38
+ <a href="/db/ip_addresses/<%=h ip_address.id %>">
39
+ <%=h ip_address %>
40
+ </a>
41
+ </p>
42
+ <% end %>
43
+ </td>
44
+ </tr>
45
+ </tbody>
46
+ </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>Passwords</h1>
12
+ <%= partial(:delete_all, path: "passwords") %>
13
+ </div>
14
+
15
+ <form action="/db/passwords/import" method="post" class="mb-5">
16
+ <div class="field has-addons">
17
+ <div class="mr-1">
18
+ <input class="input" name="password" placeholder="password"></input>
19
+ </div>
20
+ <div>
21
+ <button type="submit" class="button is-primary">Import</button>
22
+ </div>
23
+ </div>
24
+ </form>
25
+
26
+ <% @passwords.each do |password| %>
27
+ <p><a href="/db/passwords/<%=h password.id %>"><%=h password %></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/passwords">Passwords</a></li>
7
+ </ul>
8
+ </nav>
9
+ <% end %>
10
+
11
+ <div class="is-flex is-justify-content-space-between">
12
+ <h1>Password: <%=h @password %></h1>
13
+ <%= partial(:delete, record: @password, path: "passwords") %>
14
+ </div>
15
+
16
+ <table class="table">
17
+ <tbody>
18
+ <tr>
19
+ <td><strong>Plain Text:</strong></td>
20
+ <td><%=h @password.plain_text %></td>
21
+ </tr>
22
+
23
+ <tr>
24
+ <td><strong>User Names:</strong></td>
25
+ <td>
26
+ <% @password.user_names.each do |user_name| %>
27
+ <p>
28
+ <a href="/db/user_names/<%=h user_name.id %>">
29
+ <%=h user_name %>
30
+ </a>
31
+ </p>
32
+ <% end %>
33
+ </td>
34
+ </tr>
35
+
36
+ <tr>
37
+ <td><strong>Credentials:</strong></td>
38
+ <td>
39
+ <% @password.credentials.each do |credential| %>
40
+ <p>
41
+ <a href="/db/credentials/<%=h credential.id %>">
42
+ <%=h credential %>
43
+ </a>
44
+ </p>
45
+ <% end %>
46
+ </td>
47
+ </tr>
48
+ </tbody>
49
+ </table>
50
+
51
+
52
+ <%= partial(:notes, notes: @password.notes) %>
@@ -0,0 +1,31 @@
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>People</h1>
12
+ <%= partial(:delete_all, path: "people") %>
13
+ </div>
14
+
15
+ <form action="/db/people/import" method="post" class="mb-5">
16
+ <div class="field has-addons">
17
+ <div class="mr-1">
18
+ <input class="input" name="person" placeholder="Foo Bar"></input>
19
+ </div>
20
+ <div>
21
+ <button type="submit" class="button is-primary">Import</button>
22
+ </div>
23
+ </div>
24
+ </form>
25
+
26
+ <% @people.each do |person| %>
27
+ <p><a href="/db/people/<%=h person.id %>"><%=h person %></a></p>
28
+ <% end %>
29
+
30
+ <%= partial(:pagination, pagy: @pagy) %>
31
+
@@ -0,0 +1,120 @@
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/people">People</a></li>
7
+ </ul>
8
+ </nav>
9
+ <% end %>
10
+
11
+ <div class="is-flex is-justify-content-space-between">
12
+ <h1>Person: <%=h @person %></h1>
13
+ <%= partial(:delete, record: @person, path: "people") %>
14
+ </div>
15
+
16
+ <table class="table">
17
+ <tbody>
18
+ <tr>
19
+ <td><strong>Prefix:</strong></td>
20
+ <td><%=h @person.prefix %></td>
21
+ </tr>
22
+
23
+ <tr>
24
+ <td><strong>First name:</strong></td>
25
+ <td><%=h @person.first_name %></td>
26
+ </tr>
27
+
28
+ <tr>
29
+ <td><strong>Middle name:</strong></td>
30
+ <td><%=h @person.middle_name %></td>
31
+ </tr>
32
+
33
+ <tr>
34
+ <td><strong>Middle initial:</strong></td>
35
+ <td><%=h @person.middle_initial %></td>
36
+ </tr>
37
+
38
+ <tr>
39
+ <td><strong>Last name:</strong></td>
40
+ <td><%=h @person.last_name %></td>
41
+ </tr>
42
+
43
+ <tr>
44
+ <td><strong>Suffix:</strong></td>
45
+ <td><%=h @person.suffix %></td>
46
+ </tr>
47
+
48
+ <tr>
49
+ <td><strong>Street Addresses:</strong></td>
50
+ <td>
51
+ <% @person.street_addresses.each do |street_address| %>
52
+ <p>
53
+ <a href="/db/street_addresses/<%=h street_address.id %>">
54
+ <%=h street_address %>
55
+ </a>
56
+ </p>
57
+ <% end %>
58
+ </td>
59
+ </tr>
60
+
61
+ <tr>
62
+ <td><strong>Phone Numbers:</strong></td>
63
+ <td>
64
+ <% @person.phone_numbers.each do |phone_number| %>
65
+ <p>
66
+ <a href="/db/phone_numbers/<%=h phone_number.id %>">
67
+ <%=h phone_number %>
68
+ </a>
69
+ </p>
70
+ <% end %>
71
+ </td>
72
+ </tr>
73
+
74
+ <tr>
75
+ <td><strong>Email Addresses:</strong></td>
76
+ <td>
77
+ <% @person.email_addresses.each do |email_address| %>
78
+ <p>
79
+ <a href="/db/email_addresses/<%=h email_address.id %>">
80
+ <%=h email_address %>
81
+ </a>
82
+ </p>
83
+ <% end %>
84
+ </td>
85
+ </tr>
86
+
87
+ <tr>
88
+ <td><strong>Connected People:</strong></td>
89
+ <td>
90
+ <% @person.connected_people.each do |connected_person| %>
91
+ <p>
92
+ <a href="/db/people/<%=h connected_person.id %>">
93
+ <%=h connected_person %>
94
+ </a>
95
+ </p>
96
+ <% end %>
97
+ </td>
98
+ </tr>
99
+
100
+ <tr>
101
+ <td><strong>Vendors:</strong></td>
102
+ <td>
103
+ <% @person.vendors.each do |vendor| %>
104
+ <p>
105
+ <a href="/db/departments/<%=h vendor.id %>">
106
+ <%=h vendor %>
107
+ </a>
108
+ </p>
109
+ <% end %>
110
+ </td>
111
+ </tr>
112
+
113
+ <tr>
114
+ <td><strong>Created at:</strong></td>
115
+ <td><%=h @person.created_at %></td>
116
+ </tr>
117
+ </tbody>
118
+ </table>
119
+
120
+ <%= partial(:notes, notes: @person.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>Phone Numbers</h1>
12
+ <%= partial(:delete_all, path: "phone_numbers") %>
13
+ </div>
14
+
15
+ <form action="/db/phone_numbers/import" method="post" class="mb-5">
16
+ <div class="field has-addons">
17
+ <div class="mr-1">
18
+ <input class="input" name="phone_number" placeholder="+1 123 456-7890"></input>
19
+ </div>
20
+ <div>
21
+ <button type="submit" class="button is-primary">Import</button>
22
+ </div>
23
+ </div>
24
+ </form>
25
+
26
+ <% @phone_numbers.each do |phone_number| %>
27
+ <p><a href="/db/phone_numbers/<%=h phone_number.id %>"><%=h phone_number %></a></p>
28
+ <% end %>
29
+
30
+ <%= partial(:pagination, pagy: @pagy) %>
@@ -0,0 +1,63 @@
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/phone_numbers">Phone Numbers</a></li>
7
+ </ul>
8
+ </nav>
9
+ <% end %>
10
+
11
+ <div class="is-flex is-justify-content-space-between">
12
+ <h1>Phone Number: <%=h @phone_number %></h1>
13
+ <%= partial(:delete, record: @phone_number, path: "phone_numbers") %>
14
+ </div>
15
+
16
+ <table class="table">
17
+ <tbody>
18
+ <tr>
19
+ <td><strong>Number:</strong></td>
20
+ <td><%=h @phone_number.number %></td>
21
+ </tr>
22
+
23
+ <tr>
24
+ <td><strong>Country Code:</strong></td>
25
+ <td><%=h @phone_number.country_code %></td>
26
+ </tr>
27
+
28
+ <tr>
29
+ <td><strong>Area Code:</strong></td>
30
+ <td><%=h @phone_number.area_code %></td>
31
+ </tr>
32
+
33
+ <tr>
34
+ <td><strong>Prefix:</strong></td>
35
+ <td><%=h @phone_number.prefix %></td>
36
+ </tr>
37
+
38
+ <tr>
39
+ <td><strong>Line Number:</strong></td>
40
+ <td><%=h @phone_number.line_number %></td>
41
+ </tr>
42
+
43
+ <tr>
44
+ <td><strong>Created:</strong></td>
45
+ <td><%=h @phone_number.created_at %></td>
46
+ </tr>
47
+
48
+ <tr>
49
+ <td><strong>People:</strong></td>
50
+ <td>
51
+ <% @phone_number.people.each do |person| %>
52
+ <p>
53
+ <a href="/db/people/<%=h person.id %>">
54
+ <%=h person %>
55
+ </a>
56
+ </p>
57
+ <% end %>
58
+ </td>
59
+ </tr>
60
+ </tbody>
61
+ </table>
62
+
63
+ <%= partial(:notes, notes: @phone_number.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>Ports</h1>
12
+ <%= partial(:delete_all, path: "ports") %>
13
+ </div>
14
+
15
+ <form action="/db/ports/import" method="post" class="mb-5">
16
+ <div class="field has-addons">
17
+ <div class="mr-1">
18
+ <input class="input" name="port" placeholder="22"></input>
19
+ </div>
20
+ <div>
21
+ <button type="submit" class="button is-primary">Import</button>
22
+ </div>
23
+ </div>
24
+ </form>
25
+
26
+ <% @ports.each do |port| %>
27
+ <p><a href="/db/ports/<%=h port.id %>"><%=h port %></a></p>
28
+ <% end %>
29
+
30
+ <%= partial(:pagination, pagy: @pagy) %>
@@ -0,0 +1,70 @@
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/ports">Ports</a></li>
7
+ </ul>
8
+ </nav>
9
+ <% end %>
10
+
11
+ <div class="is-flex is-justify-content-space-between">
12
+ <h1>Port: <%=h @port %></h1>
13
+ <%= partial(:delete, record: @port, path: "ports") %>
14
+ </div>
15
+
16
+ <table class="table">
17
+ <tbody>
18
+ <tr>
19
+ <td><strong>Protocol:</strong></td>
20
+ <td><%=h @port.protocol.upcase %></td>
21
+ </tr>
22
+
23
+ <tr>
24
+ <td><strong>Number:</strong></td>
25
+ <td><%=h @port.number %></td>
26
+ </tr>
27
+
28
+ <tr>
29
+ <td><strong>IP Addresses:</strong></td>
30
+ <td>
31
+ <% @port.ip_addresses.each do |ip_address| %>
32
+ <p>
33
+ <a href="/db/ip_addresses/<%=h ip_address.id %>">
34
+ <%=h ip_address %>
35
+ </a>
36
+ </p>
37
+ <% end %>
38
+ </td>
39
+ </tr>
40
+
41
+ <tr>
42
+ <td><strong>Open Ports:</strong></td>
43
+ <td>
44
+ <% @port.open_ports.each do |open_port| %>
45
+ <p>
46
+ <a href="/db/open_ports/<%=h open_port.id %>">
47
+ <%=h open_port.ip_address %> <%=h open_port %>
48
+ </a>
49
+ </p>
50
+ <% end %>
51
+ </td>
52
+ </tr>
53
+
54
+ <tr>
55
+ <td><strong>Services:</strong></td>
56
+ <td>
57
+ <% @port.services.each do |service| %>
58
+ <p>
59
+ <a href="/db/services/<%=h service.id %>">
60
+ <%=h service %>
61
+ </a>
62
+ </p>
63
+ <% end %>
64
+ </td>
65
+ </tr>
66
+ </tbody>
67
+ </table>
68
+
69
+ <%= partial(:notes, notes: @port.notes) %>
70
+
@@ -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>Services</h1>
12
+ <%= partial(:delete_all, path: "services") %>
13
+ </div>
14
+
15
+ <form action="/db/services/import" method="post" class="mb-5">
16
+ <div class="field has-addons">
17
+ <div class="mr-1">
18
+ <input class="input" name="service" placeholder="service"></input>
19
+ </div>
20
+ <div>
21
+ <button type="submit" class="button is-primary">Import</button>
22
+ </div>
23
+ </div>
24
+ </form>
25
+
26
+ <% @services.each do |service| %>
27
+ <p><a href="/db/services/<%=h service.id %>"><%=h service %></a></p>
28
+ <% end %>
29
+
30
+ <%= partial(:pagination, pagy: @pagy) %>
@@ -0,0 +1,65 @@
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/services">Services</a></li>
7
+ </ul>
8
+ </nav>
9
+ <% end %>
10
+
11
+ <div class="is-flex is-justify-content-space-between">
12
+ <h1>Service: <%=h @service %></h1>
13
+ <%= partial(:delete, record: @service, path: "services") %>
14
+ </div>
15
+
16
+ <table class="table">
17
+ <tbody>
18
+ <tr>
19
+ <td><strong>Name:</strong></td>
20
+ <td><%=h @service.name %>/</td>
21
+ </tr>
22
+
23
+ <tr>
24
+ <td><strong>IP Addresses:</strong></td>
25
+ <td>
26
+ <% @service.ip_addresses.each do |ip_address| %>
27
+ <p>
28
+ <a href="/db/ip_addresses/<%=h ip_address.id %>">
29
+ <%=h ip_address %>
30
+ </a>
31
+ </p>
32
+ <% end %>
33
+ </td>
34
+ </tr>
35
+
36
+ <tr>
37
+ <td><strong>Open Ports:</strong></td>
38
+ <td>
39
+ <% @service.open_ports.each do |open_port| %>
40
+ <p>
41
+ <a href="/db/open_ports/<%=h open_port.id %>">
42
+ <%=h open_port.ip_address %> <%=h open_port %>
43
+ </a>
44
+ </p>
45
+ <% end %>
46
+ </td>
47
+ </tr>
48
+
49
+ <tr>
50
+ <td><strong>Ports:</strong></td>
51
+ <td>
52
+ <% @service.ports.each do |port| %>
53
+ <p>
54
+ <a href="/db/ports/<%=h port.id %>">
55
+ <%=h port %>
56
+ </a>
57
+ </p>
58
+ <% end %>
59
+ </td>
60
+ </tr>
61
+ </tbody>
62
+ </table>
63
+
64
+ <%= partial(:notes, notes: @service.notes) %>
65
+
@@ -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>Software</h1>
12
+ <%= partial(:delete_all, path: "software") %>
13
+ </div>
14
+
15
+ <% @software.each do |software| %>
16
+ <p><a href="/db/software/<%=h software.id %>"><%=h software %></a></p>
17
+ <% end %>
18
+
19
+ <%= 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/software">Software</a></li>
7
+ </ul>
8
+ </nav>
9
+ <% end %>
10
+
11
+ <div class="is-flex is-justify-content-space-between">
12
+ <h1>Software: <%=h @software %></h1>
13
+ <%= partial(:delete, record: @software, path: "software") %>
14
+ </div>
15
+
16
+ <table class="table">
17
+ <tbody>
18
+ <tr>
19
+ <td><strong>Name:</strong></td>
20
+ <td><%=h @software.name %></td>
21
+ </tr>
22
+
23
+ <tr>
24
+ <td><strong>Version:</strong></td>
25
+ <td><%=h @software.version %></td>
26
+ </tr>
27
+
28
+ <tr>
29
+ <td><strong>Vendor:</strong></td>
30
+ <td>
31
+ <% if @software.vendor %>
32
+ <a href="/db/software_vendors/<%=h @software.vendor.id %>">
33
+ <%=h @software.vendor %>
34
+ </a>
35
+ <% end %>
36
+ </td>
37
+ </tr>
38
+
39
+ <tr>
40
+ <td><strong>Open Ports:</strong></td>
41
+ <td>
42
+ <% @software.open_ports.each do |open_port| %>
43
+ <p>
44
+ <a href="/db/open_ports/<%=h open_port.id %>">
45
+ <%=h open_port %>
46
+ </a>
47
+ </p>
48
+ <% end %>
49
+ </td>
50
+ </tr>
51
+ </tbody>
52
+ </table>
@@ -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>Software Vendors</h1>
12
+ <%= partial(:delete_all, path: "software_vendors") %>
13
+ </div>
14
+
15
+ <% @software_vendors.each do |software_vendor| %>
16
+ <p><a href="/db/software_vendors/<%=h software_vendor.id %>"><%=h software_vendor %></a></p>
17
+ <% end %>
18
+
19
+ <%= partial(:pagination, pagy: @pagy) %>