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
data/views/spider.erb ADDED
@@ -0,0 +1,372 @@
1
+ <script type="text/javascript" src="/javascript/tabs.js"></script>
2
+ <h1>Spider</h1>
3
+
4
+ <form action="/spider" method="post">
5
+ <div class="field has-addons">
6
+ <div class="control">
7
+ <div class="select">
8
+ <select name="type">
9
+ <option value="host" <%= "selected" if params[:type] == 'host' %>>Host</option>
10
+ <option value="domain" <%= "selected" if params[:type] == 'domain' %>>Domain</option>
11
+ <option value="site" <%= "selected" if params[:type] == 'site' %>>Site</option>
12
+ </select>
13
+ </div>
14
+ </div>
15
+
16
+ <div class="control is-required">
17
+ <% if @errors && @errors[:target] %>
18
+ <input class="input is-danger" type="text" name="target" placeholder="example.com OR www.example.com OR https://example.com/" value="<%=hattr params[:target] %>">
19
+
20
+ <% @errors[:target].each do |error| %>
21
+ <p class="help is-danger"><%=h error %></p>
22
+ <% end %>
23
+ <% else %>
24
+ <input class="input" type="text" name="target" placeholder="example.com OR www.example.com OR https://example.com/" value="<%=hattr params[:target] %>">
25
+ <% end %>
26
+ </div>
27
+ </div>
28
+
29
+ <div class="field">
30
+ <button type="submit" class="button is-primary">Spider</button>
31
+ </div>
32
+
33
+ <div class="tabs is-centered">
34
+ <ul>
35
+ <li class="is-active"><a data-tab-id="general">General</a></li>
36
+ <li><a data-tab-id="header">Header</a></li>
37
+ <li><a data-tab-id="timeout">Timeout</a></li>
38
+ <li><a data-tab-id="limit">Limit</a></li>
39
+ <li><a data-tab-id="uri-normalization">URI Normalization</a></li>
40
+ <li><a data-tab-id="allow-ignore">Allow/Ignore</a></li>
41
+ </ul>
42
+ </div>
43
+
44
+ <div class="tabs-content">
45
+ <div id="general" class="content-tab is-active">
46
+ <div class="field">
47
+ <label class="label">Proxy:</label>
48
+ <div class="control">
49
+ <% if @errors && @errors[:proxy] %>
50
+ <input class="input is-danger" type="text" name="proxy" placeholder="http://www.example.com:8080" value="<%=hattr params[:proxy] %>">
51
+
52
+ <% @errors[:proxy].each do |error| %>
53
+ <p class="help is-danger"><%=h error %></p>
54
+ <% end %>
55
+ <% else %>
56
+ <input class="input" type="text" name="proxy" placeholder="http://www.example.com:8080" value="<%=hattr params[:proxy] %>">
57
+ <% end %>
58
+ </div>
59
+ </div>
60
+
61
+ <div class="field">
62
+ <label class="label">Delay:</label>
63
+ <div class="control">
64
+ <% if @errors && @errors[:delay] %>
65
+ <input class="input is-danger" type="text" name="delay" placeholder="SECS" value="<%=hattr params[:delay] %>">
66
+
67
+ <% @errors[:delay].each do |error| %>
68
+ <p class="help is-danger"><%=h error %></p>
69
+ <% end %>
70
+ <% else %>
71
+ <input class="input" type="text" name="delay" placeholder="SECS" value="<%=hattr params[:delay] %>">
72
+ <% end %>
73
+ </div>
74
+ </div>
75
+ </div>
76
+
77
+ <div id="header" class="content-tab">
78
+ <div class="field">
79
+ <label class="label">Host Header:</label>
80
+ <div class="control">
81
+ <% if @errors && @errors[:host_header] %>
82
+ <input class="input is-danger" type="text" name="host_header" placeholder="www.example.com" value="<%=hattr params[:host_header] %>">
83
+
84
+ <% @errors[:host_header].each do |error| %>
85
+ <p class="help is-danger"><%=h error %></p>
86
+ <% end %>
87
+ <% else %>
88
+ <input class="input" type="text" name="host_header" placeholder="www.example.com" value="<%=hattr params[:host_header] %>">
89
+ <% end %>
90
+ </div>
91
+ </div>
92
+
93
+ <div class="field">
94
+ <label class="label">User-Agent Header:</label>
95
+ <div class="control">
96
+ <% if @errors && @errors[:user_agent] %>
97
+ <input class="input is-danger" type="text" name="user_agent" placeholder="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" value="<%=hattr params[:user_agent] %>">
98
+
99
+ <% @errors[:user_agent].each do |error| %>
100
+ <p class="help is-danger"><%=h error %></p>
101
+ <% end %>
102
+ <% else %>
103
+ <input class="input" type="text" name="user_agent" placeholder="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" value="<%=hattr params[:user_agent] %>">
104
+ <% end %>
105
+ </div>
106
+ </div>
107
+
108
+ <div class="field">
109
+ <label class="label">Referer Header:</label>
110
+ <div class="control">
111
+ <% if @errors && @errors[:referer] %>
112
+ <input class="input is-danger" type="text" name="referer" placeholder="https://www.example.com/..." value="<%=hattr params[:referer] %>">
113
+
114
+ <% @errors[:referer].each do |error| %>
115
+ <p class="help is-danger"><%=h error %></p>
116
+ <% end %>
117
+ <% else %>
118
+ <input class="input" type="text" name="referer" placeholder="https://www.example.com/..." value="<%=hattr params[:referer] %>">
119
+ <% end %>
120
+ </div>
121
+ </div>
122
+ </div>
123
+
124
+ <div id="timeout" class="content-tab">
125
+ <div class="field">
126
+ <label class="label">Open Timeout:</label>
127
+ <div class="control">
128
+ <% if @errors && @errors[:open_timeout] %>
129
+ <input class="input is-danger" type="text" name="open_timeout" placeholder="SECS" value="<%=hattr params[:open_timeout] %>">
130
+
131
+ <% @errors[:open_timeout].each do |error| %>
132
+ <p class="help is-danger"><%=h error %></p>
133
+ <% end %>
134
+ <% else %>
135
+ <input class="input" type="text" name="open_timeout" placeholder="SECS" value="<%=hattr params[:open_timeout] %>">
136
+ <% end %>
137
+ </div>
138
+ </div>
139
+
140
+ <div class="field">
141
+ <label class="label">Read Timeout:</label>
142
+ <div class="control">
143
+ <% if @errors && @errors[:read_timeout] %>
144
+ <input class="input is-danger" type="text" name="read_timeout" placeholder="SECS" value="<%=hattr params[:read_timeout] %>">
145
+
146
+ <% @errors[:read_timeout].each do |error| %>
147
+ <p class="help is-danger"><%=h error %></p>
148
+ <% end %>
149
+ <% else %>
150
+ <input class="input" type="text" name="read_timeout" placeholder="SECS" value="<%=hattr params[:read_timeout] %>">
151
+ <% end %>
152
+ </div>
153
+ </div>
154
+
155
+ <div class="field">
156
+ <label class="label">SSL Timeout:</label>
157
+ <div class="control">
158
+ <% if @errors && @errors[:ssl_timeout] %>
159
+ <input class="input is-danger" type="text" name="ssl_timeout" placeholder="SECS" value="<%=hattr params[:ssl_timeout] %>">
160
+
161
+ <% @errors[:ssl_timeout].each do |error| %>
162
+ <p class="help is-danger"><%=h error %></p>
163
+ <% end %>
164
+ <% else %>
165
+ <input class="input" type="text" name="ssl_timeout" placeholder="SECS" value="<%=hattr params[:ssl_timeout] %>">
166
+ <% end %>
167
+ </div>
168
+ </div>
169
+
170
+ <div class="field">
171
+ <label class="label">Continue Timeout:</label>
172
+ <div class="control">
173
+ <% if @errors && @errors[:continue_timeout] %>
174
+ <input class="input is-danger" type="text" name="continue_timeout" placeholder="SECS" value="<%=hattr params[:continue_timeout] %>">
175
+
176
+ <% @errors[:continue_timeout].each do |error| %>
177
+ <p class="help is-danger"><%=h error %></p>
178
+ <% end %>
179
+ <% else %>
180
+ <input class="input" type="text" name="continue_timeout" placeholder="SECS" value="<%=hattr params[:continue_timeout] %>">
181
+ <% end %>
182
+ </div>
183
+ </div>
184
+
185
+ <div class="field">
186
+ <label class="label">Keep-Alive Timeout:</label>
187
+ <div class="control">
188
+ <% if @errors && @errors[:keep_alive_timeout] %>
189
+ <input class="input is-danger" type="text" name="keep_alive_timeout" placeholder="SECS" value="<%=hattr params[:keep_alive_timeout] %>">
190
+
191
+ <% @errors[:keep_alive_timeout].each do |error| %>
192
+ <p class="help is-danger"><%=h error %></p>
193
+ <% end %>
194
+ <% else %>
195
+ <input class="input" type="text" name="keep_alive_timeout" placeholder="SECS" value="<%=hattr params[:keep_alive_timeout] %>">
196
+ <% end %>
197
+ </div>
198
+ </div>
199
+ </div>
200
+
201
+ <div id="limit" class="content-tab">
202
+ <div class="field">
203
+ <label class="label">Limit:</label>
204
+ <div class="control">
205
+ <% if @errors && @errors[:limit] %>
206
+ <input class="input is-danger" type="text" name="limit" placeholder="NUM" value="<%=hattr params[:limit] %>">
207
+
208
+ <% @errors[:limit].each do |error| %>
209
+ <p class="help is-danger"><%=h error %></p>
210
+ <% end %>
211
+ <% else %>
212
+ <input class="input" type="text" name="limit" placeholder="NUM" value="<%=hattr params[:limit] %>">
213
+ <% end %>
214
+ </div>
215
+ </div>
216
+
217
+ <div class="field">
218
+ <label class="label">Max Depth:</label>
219
+ <div class="control">
220
+ <% if @errors && @errors[:max_depth] %>
221
+ <input class="input is-danger" type="text" name="max_depth" placeholder="NUM" value="<%=hattr params[:max_depth] %>">
222
+
223
+ <% @errors[:max_depth].each do |error| %>
224
+ <p class="help is-danger"><%=h error %></p>
225
+ <% end %>
226
+ <% else %>
227
+ <input class="input" type="text" name="max_depth" placeholder="NUM" value="<%=hattr params[:max_depth] %>">
228
+ <% end %>
229
+ </div>
230
+ </div>
231
+ </div>
232
+
233
+ <div id="uri-normalization" class="content-tab">
234
+ <div class="field">
235
+ <label class="has-text-weight-semibold">Strip Fragment:</label>
236
+ <input class="checkbox" type="checkbox" name="strip_fragment"<%= " checked" if params[:strip_fragment] %>>
237
+ </div>
238
+
239
+ <div class="field">
240
+ <label class="has-text-weight-semibold">Strip Query:</label>
241
+ <input class="checkbox" type="checkbox" name="strip_query"<%= " checked" if params[:strip_query] %>>
242
+ </div>
243
+ </div>
244
+
245
+ <div id="allow-ignore" class="content-tab">
246
+ <div class="field">
247
+ <label class="label">Allow Hosts:</label>
248
+ <div class="control">
249
+ <% if @errors && @errors[:hosts] %>
250
+ <input class="input is-danger" type="text" name="hosts" placeholder="www.example.com, ..." value="<%=hattr params[:hosts] %>">
251
+
252
+ <% @errors[:hosts].each do |error| %>
253
+ <p class="help is-danger"><%=h error %></p>
254
+ <% end %>
255
+ <% else %>
256
+ <input class="input" type="text" name="hosts" placeholder="www.example.com, ..." value="<%=hattr params[:hosts] %>">
257
+ <% end %>
258
+ </div>
259
+ </div>
260
+
261
+ <div class="field">
262
+ <label class="label">Ignore Hosts:</label>
263
+ <div class="control">
264
+ <% if @errors && @errors[:ignore_hosts] %>
265
+ <input class="input is-danger" type="text" name="ignore_hosts" placeholder="www.example.com, ..." value="<%=hattr params[:ignore_hosts] %>">
266
+
267
+ <% @errors[:ignore_hosts].each do |error| %>
268
+ <p class="help is-danger"><%=h error %></p>
269
+ <% end %>
270
+ <% else %>
271
+ <input class="input" type="text" name="ignore_hosts" placeholder="www.example.com, ..." value="<%=hattr params[:ignore_hosts] %>">
272
+ <% end %>
273
+ </div>
274
+ </div>
275
+
276
+ <div class="field">
277
+ <label class="label">Allow Ports:</label>
278
+ <div class="control">
279
+ <% if @errors && @errors[:ports] %>
280
+ <input class="input is-danger" type="text" name="ports" placeholder="PORT, ..." value="<%=hattr params[:ports] %>">
281
+
282
+ <% @errors[:ports].each do |error| %>
283
+ <p class="help is-danger"><%=h error %></p>
284
+ <% end %>
285
+ <% else %>
286
+ <input class="input" type="text" name="ports" placeholder="PORT, ..." value="<%=hattr params[:ports] %>">
287
+ <% end %>
288
+ </div>
289
+ </div>
290
+
291
+ <div class="field">
292
+ <label class="label">Ignore Ports:</label>
293
+ <div class="control">
294
+ <% if @errors && @errors[:ignore_ports] %>
295
+ <input class="input is-danger" type="text" name="ignore_ports" placeholder="PORT, ..." value="<%=hattr params[:ignore_ports] %>">
296
+
297
+ <% @errors[:ignore_ports].each do |error| %>
298
+ <p class="help is-danger"><%=h error %></p>
299
+ <% end %>
300
+ <% else %>
301
+ <input class="input" type="text" name="ignore_ports" placeholder="PORT, ..." value="<%=hattr params[:ignore_ports] %>">
302
+ <% end %>
303
+ </div>
304
+ </div>
305
+
306
+ <div class="field">
307
+ <label class="label">Allow URLs:</label>
308
+ <div class="control">
309
+ <% if @errors && @errors[:urls] %>
310
+ <input class="input is-danger" type="text" name="urls" placeholder="https://www.example.com/..., ..." value="<%=hattr params[:urls] %>">
311
+
312
+ <% @errors[:urls].each do |error| %>
313
+ <p class="help is-danger"><%=h error %></p>
314
+ <% end %>
315
+ <% else %>
316
+ <input class="input" type="text" name="urls" placeholder="https://www.example.com/..., ..." value="<%=hattr params[:urls] %>">
317
+ <% end %>
318
+ </div>
319
+ </div>
320
+
321
+ <div class="field">
322
+ <label class="label">Ignore URLs:</label>
323
+ <div class="control">
324
+ <% if @errors && @errors[:ignore_urls] %>
325
+ <input class="input is-danger" type="text" name="ignore_urls" placeholder="https://www.example.com/..., ..." value="<%=hattr params[:ignore_urls] %>">
326
+
327
+ <% @errors[:ignore_urls].each do |error| %>
328
+ <p class="help is-danger"><%=h error %></p>
329
+ <% end %>
330
+ <% else %>
331
+ <input class="input" type="text" name="ignore_urls" placeholder="https://www.example.com/..., ..." value="<%=hattr params[:ignore_urls] %>">
332
+ <% end %>
333
+ </div>
334
+ </div>
335
+
336
+ <div class="field">
337
+ <label class="label">Allow EXTs:</label>
338
+ <div class="control">
339
+ <% if @errors && @errors[:exts] %>
340
+ <input class="input is-danger" type="text" name="exts" placeholder=".xml, ..." value="<%=hattr params[:exts] %>">
341
+
342
+ <% @errors[:exts].each do |error| %>
343
+ <p class="help is-danger"><%=h error %></p>
344
+ <% end %>
345
+ <% else %>
346
+ <input class="input" type="text" name="exts" placeholder=".xml, ..." value="<%=hattr params[:exts] %>">
347
+ <% end %>
348
+ </div>
349
+ </div>
350
+
351
+ <div class="field">
352
+ <label class="label">Ignore EXTs:</label>
353
+ <div class="control">
354
+ <% if @errors && @errors[:ignore_exts] %>
355
+ <input class="input is-danger" type="text" name="ignore_exts" placeholder=".zip, ..." value="<%=hattr params[:ignore_exts] %>">
356
+
357
+ <% @errors[:ignore_exts].each do |error| %>
358
+ <p class="help is-danger"><%=h error %></p>
359
+ <% end %>
360
+ <% else %>
361
+ <input class="input" type="text" name="ignore_exts" placeholder=".zip, ..." value="<%=hattr params[:ignore_exts] %>">
362
+ <% end %>
363
+ </div>
364
+ </div>
365
+
366
+ <div class="field">
367
+ <label class="label">Robots:</label>
368
+ <input class="checkbox" type="checkbox" name="robots"<%= " checked" if params[:robots] %>>
369
+ </div>
370
+ </div>
371
+ </div>
372
+ </form>
data/views/vulns.erb ADDED
@@ -0,0 +1,214 @@
1
+ <script type="text/javascript" src="/javascript/tabs.js"></script>
2
+ <h1>Vulnerabilities</h1>
3
+
4
+ <form id="recon" action="/vulns" method="post">
5
+ <div class="field">
6
+ <label class="label is-required">URL</label>
7
+
8
+ <div class="control">
9
+ <% if @errors && @errors[:url] %>
10
+ <input class="input is-danger" name="url" required><%=h params[:url] %></input>
11
+
12
+ <% @errors[:url].each do |error| %>
13
+ <p class="help is-danger"><%=h error %></p>
14
+ <% end %>
15
+ <% else %>
16
+ <input class="input" name="url" placeholder="https://example.com" required><%=h params[:url] %></input>
17
+ <% end %>
18
+ </div>
19
+ </div>
20
+
21
+ <div class="field">
22
+ <button type="submit" class="button is-primary">Scan</button>
23
+ </div>
24
+
25
+ <div class="tabs is-centered">
26
+ <ul>
27
+ <li class="is-active"><a data-tab-id="lfi">LFI</a></li>
28
+ <li><a data-tab-id="rfi">RFI</a></li>
29
+ <li><a data-tab-id="sqli">SQLI</a></li>
30
+ <li><a data-tab-id="ssti">SSTI</a></li>
31
+ <li><a data-tab-id="command-injection">Command Injection</a></li>
32
+ <li><a data-tab-id="open-redirect">Open Redirect</a></li>
33
+ </ul>
34
+ </div>
35
+
36
+ <div class="tabs-content">
37
+ <div id="lfi" class="content-tab is-active">
38
+ <div class="field">
39
+ <label class="label">Os</label>
40
+
41
+ <div class="control">
42
+ <select class="select" name="lfi[os]">
43
+ <option value="unix" <%= " checked" if params.dig(:lfi, :os) == 'unix' %>>unix</option>
44
+ <option value="windows" <%= " checked" if params.dig(:lfi, :os) == 'windows' %>>windows</option>
45
+ </select>
46
+ </div>
47
+ </div>
48
+
49
+ <div class="field">
50
+ <label class="label">Depth</label>
51
+
52
+ <div class="control">
53
+ <% if @errors && @errors[:lfi]&.dig(:depth) %>
54
+ <input class="input is-danger" type="text" name="lfi[depth]" value="<%=hattr params.dig(:lfi, :depth) %>">
55
+
56
+ <% @errors[:lfi][:depth].each do |error| %>
57
+ <p class="help is-danger"><%=h error %></p>
58
+ <% end %>
59
+ <% else %>
60
+ <input class="input" type="text" name="lfi[depth]" placeholder="6" value="<%=hattr params.dig(:lfi, :depth) %>">
61
+ <% end %>
62
+ </div>
63
+ </div>
64
+
65
+ <div class="field">
66
+ <label class="label">Filter Bypass</label>
67
+
68
+ <div class="control">
69
+ <select class="select" name="lfi[filter_bypass]">
70
+ <option value="" />
71
+ <option value="nullbyte"<%= " checked" if params.dig(:lfi, :filter_bypass) == 'nullbyte' %>>nullbyte</option>
72
+ <option value="double_escape"<%= " checked" if params.dig(:lfi, :filter_bypass) == 'double_escape' %>>double_escape</option>
73
+ <option value="base64"<%= " checked" if params.dig(:lfi, :filter_bypass) == 'base64' %>>base64</option>
74
+ <option value="rot13"<%= " checked" if params.dig(:lfi, :filter_bypass) == 'rot13' %>>rot13</option>
75
+ <option value="zlib"<%= " checked" if params.dig(:lfi, :filter_bypass) == 'zlib' %>>zlib</option>
76
+ </select>
77
+ </div>
78
+ </div>
79
+ </div>
80
+
81
+ <div id="rfi" class="content-tab">
82
+ <div class="field">
83
+ <label class="label">Filter Bypass</label>
84
+
85
+ <div class="control">
86
+ <select class="select" name="rfi[filter_bypass]">
87
+ <option value="" />
88
+ <option value="double_encode"<%= " checked" if params.dig(:rfi, :filter_bypass) == 'double_encode' %>>double_encode</option>
89
+ <option value="suffix_escape"<%= " checked" if params.dig(:rfi, :filter_bypass) == 'suffix_escape' %>>suffix_escape</option>
90
+ <option value="null_byte"<%= " checked" if params.dig(:rfi, :filter_bypass) == 'null_byte' %>>null_byte</option>
91
+ </select>
92
+ </div>
93
+ </div>
94
+
95
+ <div class="field">
96
+ <label class="label">Test Script URL</label>
97
+
98
+ <div class="control">
99
+ <% if @errors && @errors[:rfi]&.dig(:test_script_url) %>
100
+ <input class="input is-danger" type="text" name="rfi[test_script_url]" value="<%=hattr params.dig(:rfi, :test_script_url)%>">
101
+
102
+ <% @errors[:rfi][:test_script_url].each do |error| %>
103
+ <p class="help is-danger"><%=h error %></p>
104
+ <% end %>
105
+ <% else %>
106
+ <input class="input" type="text" name="rfi[test_script_url]" value="<%=hattr params.dig(:rfi, :test_script_url) %>">
107
+ <% end %>
108
+ </div>
109
+ </div>
110
+ </div>
111
+
112
+ <div id="sqli" class="content-tab">
113
+ <div class="field">
114
+ <label class="has-text-weight-semibold">Escape Quote: </label>
115
+ <input class="checkbox" type="checkbox" name="sqli[escape_quote]"<%= " checked" if params.dig(:sqli, :terminate) %>>
116
+ </div>
117
+
118
+ <div class="field">
119
+ <label class="has-text-weight-semibold">Escape Parens: </label>
120
+ <input class="checkbox" type="checkbox" name="sqli[escape_parens]"<%= " checked" if params.dig(:sqli, :terminate) %>>
121
+ </div>
122
+
123
+ <div class="field">
124
+ <label class="has-text-weight-semibold">Terminate: </label>
125
+ <input class="checkbox" type="checkbox" name="sqli[terminate]"<%= " checked" if params.dig(:sqli, :terminate) %>>
126
+ </div>
127
+ </div>
128
+
129
+ <div id="ssti" class="content-tab">
130
+ <div class="field">
131
+ <label class="label">Escape</label>
132
+
133
+ <div class="control">
134
+ <select class="select" name="ssti[escape]">
135
+ <option value="" />
136
+ <option value="double_curly_braces"<%= " checked" if params.dig(:ssti, :escape) == 'double_curly_braces' %>>double_curly_braces</option>
137
+ <option value="dollar_curly_braces"<%= " checked" if params.dig(:ssti, :escape) == 'dollar_curly_braces' %>>dollar_curly_braces</option>
138
+ <option value="dollar_double_curly_braces"<%= " checked" if params.dig(:ssti, :escape) == 'dollar_double_curly_braces' %>>dollar_double_curly_braces</option>
139
+ <option value="pound_curly_braces"<%= " checked" if params.dig(:ssti, :escape) == 'pound_curly_braces' %>>pound_curly_braces</option>
140
+ <option value="angle_brackets_percent"<%= " checked" if params.dig(:ssti, :escape) == 'angle_brackets_percent' %>>angle_brackets_percent</option>
141
+ </select>
142
+ </div>
143
+ </div>
144
+ </div>
145
+
146
+ <div id="command-injection" class="content-tab">
147
+ <div class="field">
148
+ <label class="label">Escape Quote Character</label>
149
+
150
+ <div class="control">
151
+ <% if @errors && @errors[:command_injection]&.dig(:escape_quote) %>
152
+ <input class="input is-danger" type="text" name="command_injection[escape_quote]" size="1" value="<%=hattr params.dig(:command_injection, :escape_quote)%>">
153
+
154
+ <% @errors[:command_injection][:escape_quote].each do |error| %>
155
+ <p class="help is-danger"><%=h error %></p>
156
+ <% end %>
157
+ <% else %>
158
+ <input class="input" type="text" name="command_injection[escape_quote]" size="1" value="<%=hattr params.dig(:command_injection, :escape_quote) %>">
159
+ <% end %>
160
+ </div>
161
+ </div>
162
+
163
+ <div class="field">
164
+ <label class="label">Escape Operator Character</label>
165
+
166
+ <div class="control">
167
+ <% if @errors && @errors[:command_injection]&.dig(:escape_operator) %>
168
+ <input class="input is-danger" type="text" name="command_injection[escape_operator]" size="1" value="<%=hattr params.dig(:command_injection, :escape_operator)%>">
169
+
170
+ <% @errors[:command_injection][:escape_operator].each do |error| %>
171
+ <p class="help is-danger"><%=h error %></p>
172
+ <% end %>
173
+ <% else %>
174
+ <input class="input" type="text" name="command_injection[escape_operator]" size="1" value="<%=hattr params.dig(:command_injection, :escape_operator) %>">
175
+ <% end %>
176
+ </div>
177
+ </div>
178
+
179
+ <div class="field">
180
+ <label class="label">Terminator Character</label>
181
+
182
+ <div class="control">
183
+ <% if @errors && @errors[:command_injection]&.dig(:terminator) %>
184
+ <input class="input is-danger" type="text" name="command_injection[terminator]" size="1" value="<%=hattr params.dig(:command_injection, :terminator)%>">
185
+
186
+ <% @errors[:command_injection][:terminator].each do |error| %>
187
+ <p class="help is-danger"><%=h error %></p>
188
+ <% end %>
189
+ <% else %>
190
+ <input class="input" type="text" name="command_injection[terminator]" size="1" value="<%=hattr params.dig(:command_injection, :terminator) %>">
191
+ <% end %>
192
+ </div>
193
+ </div>
194
+ </div>
195
+
196
+ <div id="open-redirect" class="content-tab">
197
+ <div class="field">
198
+ <label class="label">Test URL</label>
199
+
200
+ <div class="control">
201
+ <% if @errors && @errors[:open_redirect]&.dig(:test_url) %>
202
+ <input class="input is-danger" type="text" name="open_redirect[test_url]" value="<%=hattr params.dig(:open_redirect, :test_url)%>">
203
+
204
+ <% @errors[:open_redirect][:test_url].each do |error| %>
205
+ <p class="help is-danger"><%=h error %></p>
206
+ <% end %>
207
+ <% else %>
208
+ <input class="input" type="text" name="open_redirect[test_url]" value="<%=hattr params.dig(:open_redirect, :test_url)%>">
209
+ <% end %>
210
+ </div>
211
+ </div>
212
+ </div>
213
+ </div>
214
+ </form>