watobo 0.9.21 → 0.9.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (283) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +46 -1
  3. data/bin/nfq_server.rb +0 -9
  4. data/bin/watobo_gui.rb +3 -13
  5. data/custom-views/prettify-json.rb +9 -18
  6. data/icons/watobo.ico +0 -0
  7. data/icons/watobo.ico.old +0 -0
  8. data/lib/watobo.rb +10 -19
  9. data/lib/watobo/adapters.rb +5 -14
  10. data/lib/watobo/adapters/data_store.rb +50 -59
  11. data/lib/watobo/adapters/file/file_store.rb +287 -296
  12. data/lib/watobo/adapters/file/marshal_store.rb +293 -296
  13. data/lib/watobo/adapters/session_store.rb +5 -14
  14. data/lib/watobo/ca.rb +1 -10
  15. data/lib/watobo/config.rb +197 -206
  16. data/lib/watobo/constants.rb +0 -9
  17. data/lib/watobo/core.rb +3 -12
  18. data/lib/watobo/core/active_check.rb +72 -135
  19. data/lib/watobo/core/active_checks.rb +49 -58
  20. data/lib/watobo/core/ca.rb +369 -389
  21. data/lib/watobo/core/cert_store.rb +34 -43
  22. data/lib/watobo/core/chat.rb +92 -101
  23. data/lib/watobo/core/chats.rb +271 -280
  24. data/lib/watobo/core/client_cert_store.rb +106 -35
  25. data/lib/watobo/core/conversation.rb +48 -57
  26. data/lib/watobo/core/cookie.rb +23 -32
  27. data/lib/watobo/core/egress_handlers.rb +98 -0
  28. data/lib/watobo/core/finding.rb +66 -75
  29. data/lib/watobo/core/findings.rb +107 -114
  30. data/lib/watobo/core/forwarding_proxy.rb +13 -22
  31. data/lib/watobo/core/fuzz_gen.rb +0 -9
  32. data/lib/watobo/core/intercept_carver.rb +166 -177
  33. data/lib/watobo/core/intercept_filter.rb +235 -244
  34. data/lib/watobo/core/interceptor.rb +98 -107
  35. data/lib/watobo/core/min_class.rb +4 -13
  36. data/lib/watobo/core/netfilter_queue.rb +170 -179
  37. data/lib/watobo/core/ott_cache.rb +132 -141
  38. data/lib/watobo/core/parameter.rb +43 -52
  39. data/lib/watobo/core/passive_check.rb +103 -102
  40. data/lib/watobo/core/passive_checks.rb +48 -57
  41. data/lib/watobo/core/passive_scanner.rb +54 -55
  42. data/lib/watobo/core/plugin.rb +11 -20
  43. data/lib/watobo/core/project.rb +3 -9
  44. data/lib/watobo/core/proxy.rb +43 -52
  45. data/lib/watobo/core/request.rb +125 -123
  46. data/lib/watobo/core/response.rb +44 -53
  47. data/lib/watobo/core/scanner.rb +0 -9
  48. data/lib/watobo/core/scanner3.rb +405 -414
  49. data/lib/watobo/core/scope.rb +83 -92
  50. data/lib/watobo/core/session.rb +1043 -1026
  51. data/lib/watobo/core/sid_cache.rb +98 -107
  52. data/lib/watobo/core/subscriber.rb +25 -34
  53. data/lib/watobo/defaults.rb +21 -30
  54. data/lib/watobo/external/diff/lcs.rb +0 -9
  55. data/lib/watobo/external/diff/lcs/array.rb +0 -9
  56. data/lib/watobo/external/diff/lcs/block.rb +0 -9
  57. data/lib/watobo/external/diff/lcs/callbacks.rb +0 -9
  58. data/lib/watobo/external/diff/lcs/change.rb +0 -9
  59. data/lib/watobo/external/diff/lcs/hunk.rb +0 -9
  60. data/lib/watobo/external/diff/lcs/ldiff.rb +0 -9
  61. data/lib/watobo/external/diff/lcs/string.rb +0 -9
  62. data/lib/watobo/externals.rb +6 -15
  63. data/lib/watobo/framework.rb +4 -13
  64. data/lib/watobo/framework/create_project.rb +60 -69
  65. data/lib/watobo/framework/init.rb +0 -9
  66. data/lib/watobo/framework/init_modules.rb +0 -9
  67. data/lib/watobo/framework/license_text.rb +28 -37
  68. data/lib/watobo/framework/load_chat.rb +13 -22
  69. data/lib/watobo/gui.rb +132 -123
  70. data/lib/watobo/gui/about_watobo.rb +0 -9
  71. data/lib/watobo/gui/browser_preview.rb +0 -9
  72. data/lib/watobo/gui/certificate_dialog.rb +0 -9
  73. data/lib/watobo/gui/chat_diff.rb +0 -9
  74. data/lib/watobo/gui/chatviewer_frame.rb +73 -72
  75. data/lib/watobo/gui/checkboxtree.rb +0 -9
  76. data/lib/watobo/gui/checks_policy_frame.rb +0 -9
  77. data/lib/watobo/gui/client_cert_dialog.rb +96 -87
  78. data/lib/watobo/gui/confirm_scan_dialog.rb +0 -9
  79. data/lib/watobo/gui/conversation_table.rb +158 -164
  80. data/lib/watobo/gui/conversation_table_ctrl.rb +207 -216
  81. data/lib/watobo/gui/conversation_table_ctrl2.rb +373 -382
  82. data/lib/watobo/gui/csrf_token_dialog.rb +0 -9
  83. data/lib/watobo/gui/custom_viewer.rb +374 -383
  84. data/lib/watobo/gui/dashboard.rb +296 -303
  85. data/lib/watobo/gui/define_scope_frame.rb +0 -9
  86. data/lib/watobo/gui/differ_frame.rb +215 -224
  87. data/lib/watobo/gui/edit_comment.rb +0 -9
  88. data/lib/watobo/gui/edit_scope_dialog.rb +0 -9
  89. data/lib/watobo/gui/export_dialog.rb +104 -113
  90. data/lib/watobo/gui/finding_info.rb +0 -9
  91. data/lib/watobo/gui/findings_tree.rb +210 -217
  92. data/lib/watobo/gui/full_scan_dialog.rb +0 -9
  93. data/lib/watobo/gui/fuzzer_gui.rb +1295 -1313
  94. data/lib/watobo/gui/fxsave_thread.rb +14 -0
  95. data/lib/watobo/gui/goto_url_dialog.rb +70 -79
  96. data/lib/watobo/gui/hex_viewer.rb +0 -9
  97. data/lib/watobo/gui/html_viewer.rb +287 -296
  98. data/lib/watobo/gui/intercept_filter_dialog.rb +188 -197
  99. data/lib/watobo/gui/interceptor_gui.rb +1041 -1051
  100. data/lib/watobo/gui/interceptor_settings_dialog.rb +0 -9
  101. data/lib/watobo/gui/json_viewer.rb +287 -0
  102. data/lib/watobo/gui/list_box.rb +101 -110
  103. data/lib/watobo/gui/log_file_viewer.rb +32 -41
  104. data/lib/watobo/gui/log_viewer.rb +83 -88
  105. data/lib/watobo/gui/login_wizzard.rb +0 -9
  106. data/lib/watobo/gui/main_window.rb +587 -618
  107. data/lib/watobo/gui/manual_request_editor.rb +620 -565
  108. data/lib/watobo/gui/master_pw_dialog.rb +0 -9
  109. data/lib/watobo/gui/mixins/gui_settings.rb +29 -38
  110. data/lib/watobo/gui/page_tree.rb +217 -226
  111. data/lib/watobo/gui/password_policy_dialog.rb +0 -9
  112. data/lib/watobo/gui/plugin_board.rb +0 -9
  113. data/lib/watobo/gui/preferences_dialog.rb +0 -9
  114. data/lib/watobo/gui/progress_window.rb +17 -27
  115. data/lib/watobo/gui/project_wizzard.rb +0 -9
  116. data/lib/watobo/gui/proxy_dialog.rb +1 -10
  117. data/lib/watobo/gui/quick_scan_dialog.rb +0 -9
  118. data/lib/watobo/gui/request_builder_frame.rb +102 -111
  119. data/lib/watobo/gui/request_editor.rb +181 -137
  120. data/lib/watobo/gui/rewrite_filters_dialog.rb +394 -403
  121. data/lib/watobo/gui/rewrite_rules_dialog.rb +372 -381
  122. data/lib/watobo/gui/save_chat_dialog.rb +140 -149
  123. data/lib/watobo/gui/scanner_settings_dialog.rb +0 -9
  124. data/lib/watobo/gui/select_chat_dialog.rb +0 -9
  125. data/lib/watobo/gui/session_management_dialog.rb +0 -9
  126. data/lib/watobo/gui/sites_tree.rb +0 -9
  127. data/lib/watobo/gui/status_bar.rb +0 -9
  128. data/lib/watobo/gui/table_editor.rb +0 -9
  129. data/lib/watobo/gui/tagless_viewer.rb +0 -9
  130. data/lib/watobo/gui/templates/plugin.rb +0 -9
  131. data/lib/watobo/gui/templates/plugin2.rb +92 -100
  132. data/lib/watobo/gui/templates/plugin_base.rb +144 -153
  133. data/lib/watobo/gui/text_viewer.rb +0 -9
  134. data/lib/watobo/gui/transcoder_window.rb +0 -9
  135. data/lib/watobo/gui/utils/gui_utils.rb +0 -9
  136. data/lib/watobo/gui/utils/init_icons.rb +86 -95
  137. data/lib/watobo/gui/utils/load_icons.rb +33 -42
  138. data/lib/watobo/gui/utils/load_plugins.rb +116 -119
  139. data/lib/watobo/gui/utils/master_password.rb +68 -77
  140. data/lib/watobo/gui/utils/save_default_settings.rb +113 -122
  141. data/lib/watobo/gui/utils/save_project_settings.rb +0 -9
  142. data/lib/watobo/gui/utils/save_proxy_settings.rb +41 -50
  143. data/lib/watobo/gui/utils/save_scanner_settings.rb +18 -27
  144. data/lib/watobo/gui/utils/session_history.rb +112 -121
  145. data/lib/watobo/gui/workspace_dialog.rb +0 -9
  146. data/lib/watobo/gui/www_auth_dialog.rb +0 -9
  147. data/lib/watobo/gui/xml_viewer_frame.rb +0 -9
  148. data/lib/watobo/http.rb +4 -13
  149. data/lib/watobo/http/cookies/cookies.rb +26 -35
  150. data/lib/watobo/http/data/data.rb +45 -54
  151. data/lib/watobo/http/data/json.rb +47 -55
  152. data/lib/watobo/http/url/url.rb +38 -47
  153. data/lib/watobo/http/xml/xml.rb +124 -130
  154. data/lib/watobo/interceptor.rb +3 -12
  155. data/lib/watobo/interceptor/proxy.rb +742 -739
  156. data/lib/watobo/interceptor/transparent.rb +22 -24
  157. data/lib/watobo/mixins.rb +10 -19
  158. data/lib/watobo/mixins/check_info.rb +27 -36
  159. data/lib/watobo/mixins/httpparser.rb +613 -637
  160. data/lib/watobo/mixins/request_parser.rb +88 -97
  161. data/lib/watobo/mixins/shapers.rb +515 -529
  162. data/lib/watobo/mixins/transcoders.rb +3 -11
  163. data/lib/watobo/parser.rb +1 -10
  164. data/lib/watobo/parser/html.rb +83 -92
  165. data/lib/watobo/patch_fxruby_setfocus.rb +26 -0
  166. data/lib/watobo/sockets.rb +3 -12
  167. data/lib/watobo/sockets/agent.rb +828 -837
  168. data/lib/watobo/sockets/client_socket.rb +308 -312
  169. data/lib/watobo/sockets/connection.rb +401 -410
  170. data/lib/watobo/sockets/http_socket.rb +11 -13
  171. data/lib/watobo/sockets/ntlm_auth.rb +129 -138
  172. data/lib/watobo/utils.rb +10 -19
  173. data/lib/watobo/utils/check_regex.rb +0 -9
  174. data/lib/watobo/utils/copy_object.rb +0 -9
  175. data/lib/watobo/utils/crypto.rb +0 -9
  176. data/lib/watobo/utils/expand_range.rb +23 -32
  177. data/lib/watobo/utils/export_xml.rb +97 -106
  178. data/lib/watobo/utils/file_management.rb +9 -11
  179. data/lib/watobo/utils/hexprint.rb +9 -18
  180. data/lib/watobo/utils/load_chat.rb +0 -9
  181. data/lib/watobo/utils/load_icon.rb +0 -9
  182. data/lib/watobo/utils/ntlm.rb +866 -875
  183. data/lib/watobo/utils/print_debug.rb +12 -21
  184. data/lib/watobo/utils/response_builder.rb +90 -99
  185. data/lib/watobo/utils/response_hash.rb +0 -9
  186. data/lib/watobo/utils/secure_eval.rb +0 -9
  187. data/lib/watobo/utils/strings.rb +10 -19
  188. data/lib/watobo/utils/text2request.rb +0 -9
  189. data/lib/watobo/utils/url.rb +23 -32
  190. data/lib/watobo/utils/utf16.rb +11 -20
  191. data/modules/active/Apache/mod_status.rb +0 -9
  192. data/modules/active/Apache/multiview.rb +151 -160
  193. data/modules/active/Flash/crossdomain.rb +0 -9
  194. data/modules/active/JWT/jwt_oauth2_none.rb +111 -0
  195. data/modules/active/cq5/cq5_default_selectors.rb +106 -115
  196. data/modules/active/cq5/cqp_user_enumeration.rb +125 -134
  197. data/modules/active/directories/dirwalker.rb +0 -9
  198. data/modules/active/discovery/fileextensions.rb +0 -9
  199. data/modules/active/discovery/http_methods.rb +0 -9
  200. data/modules/active/discovery/jsmapfiles.rb +79 -0
  201. data/modules/active/domino/domino_db.rb +68 -76
  202. data/modules/active/dotNET/custom_errors.rb +102 -111
  203. data/modules/active/dotNET/dotnet_files.rb +90 -99
  204. data/modules/active/fileinclusion/lfi_simple.rb +0 -9
  205. data/modules/active/jboss/jboss_basic.rb +0 -9
  206. data/modules/active/sap/business_objects.rb +51 -60
  207. data/modules/active/sap/its_commands.rb +0 -9
  208. data/modules/active/sap/its_service_parameter.rb +0 -9
  209. data/modules/active/sap/its_services.rb +0 -9
  210. data/modules/active/sap/its_xss.rb +0 -9
  211. data/modules/active/shell_shock/shell_shock.rb +139 -148
  212. data/modules/active/siebel/siebel_apps.rb +160 -169
  213. data/modules/active/sqlinjection/sql_boolean.rb +0 -9
  214. data/modules/active/sqlinjection/sql_numerical.rb +198 -0
  215. data/modules/active/sqlinjection/sqli_error.rb +0 -9
  216. data/modules/active/sqlinjection/sqli_timing.rb +220 -229
  217. data/modules/active/struts2/default_handler_ognl.rb +106 -115
  218. data/modules/active/struts2/include_params_ognl.rb +105 -114
  219. data/modules/active/xml/xml_xxe.rb +112 -123
  220. data/modules/active/xss/xss_ng.rb +214 -223
  221. data/modules/active/xss/xss_simple.rb +0 -9
  222. data/modules/passive/ajax.rb +68 -77
  223. data/modules/passive/autocomplete.rb +56 -65
  224. data/modules/passive/cookie_options.rb +0 -9
  225. data/modules/passive/cookie_xss.rb +0 -9
  226. data/modules/passive/detect_code.rb +0 -9
  227. data/modules/passive/detect_fileupload.rb +0 -9
  228. data/modules/passive/detect_infrastructure.rb +0 -9
  229. data/modules/passive/detect_one_time_tokens.rb +0 -9
  230. data/modules/passive/dirindexing.rb +0 -9
  231. data/modules/passive/disclosure_domino.rb +55 -64
  232. data/modules/passive/disclosure_emails.rb +0 -9
  233. data/modules/passive/disclosure_ipaddr.rb +55 -53
  234. data/modules/passive/filename_as_parameter.rb +0 -9
  235. data/modules/passive/form_spotter.rb +0 -9
  236. data/modules/passive/hidden_fields.rb +50 -59
  237. data/modules/passive/hotspots.rb +0 -9
  238. data/modules/passive/in_script_parameter.rb +0 -9
  239. data/modules/passive/json_web_token.rb +93 -0
  240. data/modules/passive/multiple_server_headers.rb +0 -9
  241. data/modules/passive/possible_login.rb +0 -9
  242. data/modules/passive/redirect_url.rb +0 -9
  243. data/modules/passive/redirectionz.rb +0 -9
  244. data/modules/passive/sap-headers.rb +56 -65
  245. data/modules/passive/xss_dom.rb +0 -9
  246. data/plugins/aem/aem.rb +11 -20
  247. data/plugins/aem/gui/main.rb +118 -127
  248. data/plugins/aem/gui/tree_view.rb +171 -180
  249. data/plugins/aem/lib/agent.rb +130 -138
  250. data/plugins/aem/lib/dispatcher.rb +45 -51
  251. data/plugins/aem/lib/engine.rb +177 -186
  252. data/plugins/catalog/catalog.rb +345 -355
  253. data/plugins/crawler/crawler.rb +4 -13
  254. data/plugins/crawler/gui.rb +5 -14
  255. data/plugins/crawler/gui/auth_frame.rb +270 -279
  256. data/plugins/crawler/gui/crawler_gui.rb +271 -276
  257. data/plugins/crawler/gui/general_settings_frame.rb +96 -105
  258. data/plugins/crawler/gui/hooks_frame.rb +80 -89
  259. data/plugins/crawler/gui/scope_frame.rb +50 -59
  260. data/plugins/crawler/gui/settings_tabbook.rb +38 -47
  261. data/plugins/crawler/gui/status_frame.rb +59 -68
  262. data/plugins/crawler/lib/bags.rb +18 -27
  263. data/plugins/crawler/lib/constants.rb +11 -20
  264. data/plugins/crawler/lib/engine.rb +488 -497
  265. data/plugins/crawler/lib/grabber.rb +68 -77
  266. data/plugins/crawler/lib/status.rb +71 -80
  267. data/plugins/crawler/lib/uri_mp.rb +12 -21
  268. data/plugins/filefinder/filefinder.rb +326 -333
  269. data/plugins/sqlmap/bin/test.rb +78 -87
  270. data/plugins/sqlmap/gui.rb +4 -13
  271. data/plugins/sqlmap/gui/main.rb +218 -227
  272. data/plugins/sqlmap/gui/options_frame.rb +97 -106
  273. data/plugins/sqlmap/lib/sqlmap_ctrl.rb +90 -100
  274. data/plugins/sqlmap/sqlmap.rb +2 -11
  275. data/plugins/sslchecker/cli/sslchecker_cli.rb +0 -9
  276. data/plugins/sslchecker/gui/cipher_table.rb +246 -254
  277. data/plugins/sslchecker/gui/gui.rb +258 -264
  278. data/plugins/sslchecker/gui/sslchecker.rb +4 -13
  279. data/plugins/sslchecker/lib/check.rb +127 -133
  280. data/plugins/wshell/gui/main.rb +119 -117
  281. data/plugins/wshell/lib/core.rb +38 -88
  282. data/plugins/wshell/wshell.rb +11 -20
  283. metadata +170 -164
@@ -1,43 +1,34 @@
1
- #.
2
- # log_file_viewer.rb
3
- #.
4
- # Copyright 2014 by siberas, http://www.siberas.de
5
- # This file is part of WATOBO (Web Application Tool Box) http://watobo.sourceforge.com
6
- # WATOBO is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License.
7
- # WATOBO is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
8
- # You should have received a copy of the GNU General Public License along with WATOBO; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
9
-
10
1
  # @private
11
- module Watobo#:nodoc: all
12
- module Gui
13
- class LogFileViewer < FXVerticalFrame
14
-
15
- include Watobo::Constants
16
- def show_logs
17
- begin
18
- @textbox.setText(Watobo.logs)
19
- rescue => bang
20
- puts "! Could not show logs"
21
- puts bang
22
- puts bang.backtrace if $DEBUG
23
- end
24
- end
25
-
26
-
27
- def initialize(parent, mode = nil, opts)
28
- opts[:padding]=0
29
-
30
- super(parent, opts)
31
-
32
- update_btn = FXButton.new(self, "Update",:opts => FRAME_THICK|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_TOP|LAYOUT_LEFT).connect(SEL_COMMAND){ show_logs }
33
- frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN)
34
- @textbox = FXText.new(frame, nil, 0, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|TEXT_AUTOSCROLL|TEXT_READONLY)
35
- @textbox.editable = false
36
- show_logs
37
-
38
- end
39
-
40
- end
41
-
42
- end
2
+ module Watobo#:nodoc: all
3
+ module Gui
4
+ class LogFileViewer < FXVerticalFrame
5
+
6
+ include Watobo::Constants
7
+ def show_logs
8
+ begin
9
+ @textbox.setText(Watobo.logs)
10
+ rescue => bang
11
+ puts "! Could not show logs"
12
+ puts bang
13
+ puts bang.backtrace if $DEBUG
14
+ end
15
+ end
16
+
17
+
18
+ def initialize(parent, mode = nil, opts)
19
+ opts[:padding]=0
20
+
21
+ super(parent, opts)
22
+
23
+ update_btn = FXButton.new(self, "Update",:opts => FRAME_THICK|FRAME_RAISED|LAYOUT_FILL_X|LAYOUT_TOP|LAYOUT_LEFT).connect(SEL_COMMAND){ show_logs }
24
+ frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN)
25
+ @textbox = FXText.new(frame, nil, 0, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|TEXT_AUTOSCROLL|TEXT_READONLY)
26
+ @textbox.editable = false
27
+ show_logs
28
+
29
+ end
30
+
31
+ end
32
+
33
+ end
43
34
  end
@@ -1,90 +1,85 @@
1
- #.
2
- # log_viewer.rb
3
- #.
4
- # Copyright 2014 by siberas, http://www.siberas.de
5
- # This file is part of WATOBO (Web Application Tool Box) http://watobo.sourceforge.com
6
- # WATOBO is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License.
7
- # WATOBO is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
8
- # You should have received a copy of the GNU General Public License along with WATOBO; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
9
-
10
1
  # @private
11
- module Watobo#:nodoc: all
12
- module Gui
13
- class LogViewer < FXVerticalFrame
14
-
15
- include Watobo::Constants
16
- def purge_logs
17
- begin
18
- @log_text_lock.synchronize do
19
- @textbox.setText('')
20
- # @textbox.makePositionVisible 0
21
- end
22
- rescue => bang
23
- puts "! Could not purge logs"
24
- puts bang
25
- puts bang.backtrace if $DEBUG
26
- end
27
- end
28
-
29
- # LOG_INFO
30
- def log(log_level, msg )
31
-
32
- t = Time.now
33
- now = t.strftime("%m/%d/%Y @ %H:%M:%S")
34
-
35
- begin
36
- log_text = case log_level
37
- when LOG_INFO
38
- "#{now}: #{msg}\n"
39
- else
40
- ""
41
- end
42
- @log_queue << log_text
43
- rescue => bang
44
- puts bang
45
- puts bang.backtrace if $DEBUG
46
- end
47
- end
48
-
49
- def initialize(parent, mode = nil, opts)
50
- opts[:padding]=0
51
-
52
- @mode = mode.nil? ? :inster : mode
53
-
54
- super(parent, opts)
55
-
56
- @log_queue = Queue.new
57
-
58
- @log_text_lock = Mutex.new
59
-
60
- @textbox = FXText.new(self, nil, 0, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
61
- @textbox.editable = false
62
- start_update_timer
63
- end
64
-
65
- private
66
-
67
- def start_update_timer
68
- @timer = FXApp.instance.addTimeout( 150, :repeat => true) {
69
- #print @log_queue.length
70
- if @log_queue.length > 0
71
- msg = @log_queue.deq
72
- if @mode == :insert
73
- @log_text_lock.synchronize do
74
- @textbox.insertText(0,msg)
75
- end
76
- else
77
- @log_text_lock.synchronize do
78
- @textbox.appendText(msg)
79
- end
80
- end
81
- @textbox.handle(self, FXSEL(SEL_UPDATE, 0), nil)
82
- end
83
- }
84
-
85
- end
86
-
87
- end
88
-
89
- end
2
+ module Watobo #:nodoc: all
3
+ module Gui
4
+ class LogViewer < FXVerticalFrame
5
+
6
+ include Watobo::Constants
7
+
8
+ def purge_logs
9
+ begin
10
+ @log_text_lock.synchronize do
11
+ @textbox.setText('')
12
+ # @textbox.makePositionVisible 0
13
+ end
14
+ rescue => bang
15
+ puts "! Could not purge logs"
16
+ puts bang
17
+ puts bang.backtrace if $DEBUG
18
+ end
19
+ end
20
+
21
+ # LOG_INFO
22
+ def log(log_level, msg)
23
+
24
+ t = Time.now
25
+ now = t.strftime("%m/%d/%Y @ %H:%M:%S")
26
+
27
+ begin
28
+ log_text = case log_level
29
+ when LOG_INFO
30
+ "INFO - #{now}: #{msg}\n"
31
+ else
32
+ "UNDEF - #{now}: #{msg}\n"
33
+ end
34
+ @log_queue << log_text
35
+
36
+ rescue => bang
37
+ puts bang
38
+ puts bang.backtrace if $DEBUG
39
+ end
40
+ end
41
+
42
+ def initialize(parent, mode = nil, opts)
43
+ opts[:padding]=0
44
+
45
+ @mode = mode.nil? ? :inster : mode
46
+
47
+ super(parent, opts)
48
+
49
+ @log_queue = Queue.new
50
+
51
+ @log_text_lock = Mutex.new
52
+
53
+ @textbox = FXText.new(self, nil, 0, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
54
+ @textbox.editable = false
55
+
56
+ start_update_timer
57
+ end
58
+
59
+ private
60
+
61
+ def start_update_timer
62
+ Watobo.save_thread {
63
+
64
+ #print @log_queue.length
65
+ if @log_queue.length > 0
66
+ msg = @log_queue.deq
67
+ if @mode == :insert
68
+ @log_text_lock.synchronize do
69
+ @textbox.insertText(0, msg)
70
+ end
71
+ else
72
+ @log_text_lock.synchronize do
73
+ @textbox.appendText(msg)
74
+ end
75
+ end
76
+ @textbox.handle(self, FXSEL(SEL_UPDATE, 0), nil)
77
+ end
78
+ }
79
+
80
+ end
81
+
82
+ end
83
+
84
+ end
90
85
  end
@@ -1,12 +1,3 @@
1
- #.
2
- # login_wizzard.rb
3
- #.
4
- # Copyright 2014 by siberas, http://www.siberas.de
5
- # This file is part of WATOBO (Web Application Tool Box) http://watobo.sourceforge.com
6
- # WATOBO is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License.
7
- # WATOBO is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
8
- # You should have received a copy of the GNU General Public License along with WATOBO; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
9
-
10
1
  require 'fox16'
11
2
 
12
3
  include Fox
@@ -1,20 +1,11 @@
1
- #.
2
- # main_window.rb
3
- #.
4
- # Copyright 2014 by siberas, http://www.siberas.de
5
- # This file is part of WATOBO (Web Application Tool Box) http://watobo.sourceforge.com
6
- # WATOBO is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License.
7
- # WATOBO is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
8
- # You should have received a copy of the GNU General Public License along with WATOBO; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
9
-
10
1
  # @private
11
- module Watobo#:nodoc: all
2
+ module Watobo #:nodoc: all
12
3
  module Gui
13
4
  ####################################################################################################################
14
5
  # M A I N A P P L I C A T I O N W I N D O W
15
6
  #
16
7
  class MainWindow < FXMainWindow
17
-
8
+
18
9
  include Watobo
19
10
  include Watobo::Gui
20
11
  include Watobo::Constants
@@ -25,7 +16,7 @@ module Watobo#:nodoc: all
25
16
  attr :watobo_base
26
17
  attr :active_project
27
18
  attr :iproxy
28
-
19
+
29
20
  def open_manual_request_editor(chat)
30
21
  begin
31
22
  mrtk = ManualRequestEditor.new(FXApp.instance, @project, chat)
@@ -41,72 +32,46 @@ module Watobo#:nodoc: all
41
32
  }
42
33
  mrtk.show(Fox::PLACEMENT_SCREEN)
43
34
  rescue => bang
44
- puts "!!! could not open manual request"
45
- puts bang
35
+ puts "!!! could not open manual request"
36
+ puts bang
46
37
  end
47
38
  end
48
39
 
49
40
  private
50
41
 
51
- def add_queue_timer(ms)
52
- @update_timer = FXApp.instance.addTimeout( ms, :repeat => true) {
53
- @finding_lock.synchronize do
54
- @finding_queue.each do |f|
55
- addFinding(f)
56
- end
57
- @finding_queue.clear
58
- end
59
-
60
- unless @scanner.nil?
61
- if @scanner.finished?
62
- @scan_running = false
63
- @status_lock.synchronize do
64
- @new_status = SCAN_FINISHED
65
- end
66
- @scanner = nil
67
- end
68
- end
69
-
70
- @chat_lock.synchronize do
71
- @chat_queue.each do |c|
72
- addChat(c)
73
- end
74
- @chat_queue.clear
75
- end
76
-
77
- @status_lock.synchronize do
78
- unless @new_status.nil?
79
- update_status(@new_status)
80
- end
81
-
82
- end
83
-
84
- @msg_lock.synchronize do
85
- while @msg_queue.length > 0
86
- msg = @msg_queue.shift
87
- case msg
88
- when :modal_finished
89
- puts "stopping modal ..."
90
- getApp.stopModal
91
- puts "modal stopped"
92
- end
93
- end
94
- end
95
-
96
- }
97
- end
42
+ def add_queue_timer(ms)
43
+ @update_timer = Watobo.save_thread(ms) {
44
+
45
+ unless @scanner.nil?
46
+ if @scanner.finished?
47
+ @scan_running = false
48
+ @status_lock.synchronize do
49
+ @new_status = SCAN_FINISHED
50
+ end
51
+ @scanner = nil
52
+ end
53
+ end
54
+
55
+ @status_lock.synchronize do
56
+ unless @new_status.nil?
57
+ update_status(@new_status)
58
+ end
59
+ end
60
+ }
61
+ end
98
62
 
99
63
  def update_status(new_status)
100
64
  case new_status
101
- when SCAN_STARTED
102
-
103
- when SCAN_FINISHED
104
- @scan_button.icon = ICON_START
105
- @dashboard.setScanStatus("Finished")
106
- @statusBar.statusInfoText = "Ready."
65
+ when SCAN_STARTED
66
+
67
+ when SCAN_FINISHED
68
+ @scan_button.icon = ICON_START
69
+ @dashboard.setScanStatus("Finished")
70
+ @statusBar.statusInfoText = "Ready."
107
71
  end
108
72
  new_status = nil
109
73
  end
74
+
110
75
  #def loadDefaultS
111
76
  def saveDefaultSettings_UNUSED(update_settings={})
112
77
 
@@ -176,15 +141,14 @@ module Watobo#:nodoc: all
176
141
  Watobo::Utils.save_settings(@default_settings_file, settings )
177
142
  =end
178
143
  end
179
-
180
-
144
+
181
145
 
182
146
  def saveSessionSettings_UNUSED(project=nil)
183
147
  begin
184
- #project.session_store.save_session_settings(project.session_settings)
185
- # Watobo::Conf::Scanner.save_session(project.session_store)
186
- Watobo::Gui.save_scanner_settings(project)
187
- return true
148
+ #project.session_store.save_session_settings(project.session_settings)
149
+ # Watobo::Conf::Scanner.save_session(project.session_store)
150
+ Watobo::Gui.save_scanner_settings(project)
151
+ return true
188
152
  rescue => bang
189
153
  puts bang
190
154
  puts bang.backtrace if $DEBUG
@@ -206,14 +170,14 @@ module Watobo#:nodoc: all
206
170
 
207
171
  def saveProjectSettings_UNUSED(project=nil)
208
172
  begin
209
- # project.session_store.save_project_settings(project.scan_settings)
210
- return true
173
+ # project.session_store.save_project_settings(project.scan_settings)
174
+ return true
211
175
  rescue => bang
212
176
  puts bang
213
177
  puts bang.backtrace if $DEBUG
214
178
  end
215
179
  return false
216
-
180
+
217
181
  # unless project.nil?
218
182
  # ps = YAML.load(YAML.dump(project.scan_settings))
219
183
  # settings = { :scanner => Hash.new }
@@ -225,16 +189,16 @@ module Watobo#:nodoc: all
225
189
  # settings[:scanner][:custom_error_patterns] = ps[:custom_error_patterns]
226
190
  # settings[:scanner][:csrf_patterns] = ps[:csrf_patterns] unless ps[:csrf_patterns].nil?#
227
191
 
228
- # remove proxy list because they are stored in the default settings
192
+ # remove proxy list because they are stored in the default settings
229
193
  # settings[:forwarding_proxy] = project.forward_proxy_settings
230
194
 
231
195
  # settings[:project_name] = project.project_name
232
- # puts "==== WWW AUTH ==="
233
- # puts YAML.dump( settings[:www_auth] )
196
+ # puts "==== WWW AUTH ==="
197
+ # puts YAML.dump( settings[:www_auth] )
234
198
 
235
- # puts "=== PASSWORD POLICY ==="
236
- # puts YAML.dump(@settings[:password_policy])
237
- #if master_password_required?
199
+ # puts "=== PASSWORD POLICY ==="
200
+ # puts YAML.dump(@settings[:password_policy])
201
+ #if master_password_required?
238
202
  # password_set = false
239
203
  # settings[:www_auth].each_key do |p|
240
204
  # if settings[:www_auth][p].has_key? :password
@@ -274,19 +238,19 @@ module Watobo#:nodoc: all
274
238
  # cleanCredentials(settings)
275
239
  # end
276
240
 
277
- # puts "* saving www_auth settings ..."
278
- # puts YAML.dump( settings[:www_auth])
241
+ # puts "* saving www_auth settings ..."
242
+ # puts YAML.dump( settings[:www_auth])
279
243
  # Watobo::Utils.save_settings(project.projectSettingsFile, settings)
280
244
  # end
281
245
  end
282
246
 
283
247
  def update_conversation_table()
284
- @chatTable.showConversation(Watobo::Chats.to_a)
285
- @chatTable.apply_filter(@conversation_table_ctrl.filter)
286
- @conversation_table_ctrl.update_text
287
- return true
248
+ @chatTable.showConversation(Watobo::Chats.to_a)
249
+ @chatTable.apply_filter(@conversation_table_ctrl.filter)
250
+ @conversation_table_ctrl.update_text
251
+ return true
288
252
  end
289
-
253
+
290
254
  #
291
255
  # SHOW CHAT
292
256
  #
@@ -303,15 +267,15 @@ module Watobo#:nodoc: all
303
267
  @switcher.current=0
304
268
  @lastViewed = chat
305
269
  src = case chat.source
306
- when CHAT_SOURCE_INTERCEPT
307
- "Interceptor"
308
- when CHAT_SOURCE_PROXY
309
- "Proxy"
310
- when CHAT_SOURCE_MANUAL
311
- "Manual"
312
- when CHAT_SOURCE_FUZZER
313
- "Fuzzer"
314
- end
270
+ when CHAT_SOURCE_INTERCEPT
271
+ "Interceptor"
272
+ when CHAT_SOURCE_PROXY
273
+ "Proxy"
274
+ when CHAT_SOURCE_MANUAL
275
+ "Manual"
276
+ when CHAT_SOURCE_FUZZER
277
+ "Fuzzer"
278
+ end
315
279
  @quickViewTitle.text = "Chat-ID: #{chat.id} (#{src})"
316
280
  @quickViewSubTitle.text = ""
317
281
  end
@@ -320,7 +284,7 @@ module Watobo#:nodoc: all
320
284
  # SHOW VULN
321
285
  #
322
286
  def showVulnerability(vuln)
323
-
287
+
324
288
  @mre_button.enabled = true
325
289
  @fuzz_button.enabled = true
326
290
  @bv_button.enabled = true
@@ -334,22 +298,22 @@ module Watobo#:nodoc: all
334
298
  @lastViewed = vuln
335
299
  if vuln.details[:check_pattern] then
336
300
 
337
- pattern = vuln.details[:check_pattern].strip
338
-
339
- @request_viewer.highlight(pattern)
301
+ pattern = vuln.details[:check_pattern].strip
302
+
303
+ @request_viewer.highlight(pattern)
340
304
  end
341
305
 
342
306
  if vuln.details[:proof_pattern] then
343
- pattern = vuln.details[:proof_pattern].strip
344
-
345
- @response_viewer.highlight(pattern)
307
+ pattern = vuln.details[:proof_pattern].strip
308
+
309
+ @response_viewer.highlight(pattern)
346
310
  end
347
311
  @switcher.current = 0
348
312
 
349
313
  @quickViewTitle.text = "Finding: #{vuln.details[:class]}"
350
314
  chat_id = "unknown"
351
315
  chat_id = vuln.details[:chat_id] if vuln.details.has_key? :chat_id
352
- info_text = "[Module: #{vuln.details[:module].gsub(/watobo::modules::/i,'')}] [Chat-ID: #{chat_id}]"
316
+ info_text = "[Module: #{vuln.details[:module].gsub(/watobo::modules::/i, '')}] [Chat-ID: #{chat_id}]"
353
317
  @quickViewSubTitle.text = info_text
354
318
 
355
319
  end
@@ -361,21 +325,21 @@ module Watobo#:nodoc: all
361
325
  def openSessionManagement(sender, sel, item)
362
326
  smdlg = SessionManagementDialog.new(self)
363
327
  if smdlg.execute != 0 then
364
-
328
+
365
329
  sidpatterns = smdlg.getSidPatterns()
366
330
  logout_signatures = smdlg.getLogoutSignatures()
367
331
  unless Watobo.project.nil?
368
- ids = smdlg.getLoginScriptIds()
369
- Watobo.project.setLoginChatIds(ids)
370
- #Watobo.project.setSidPatterns(sidpatterns)
371
- Watobo.project.setLogoutSignatures(logout_signatures)
332
+ ids = smdlg.getLoginScriptIds()
333
+ Watobo.project.setLoginChatIds(ids)
334
+ #Watobo.project.setSidPatterns(sidpatterns)
335
+ Watobo.project.setLogoutSignatures(logout_signatures)
372
336
  end
373
- # save settings
374
- #saveProjectSettings(@project)
375
- #saveSessionSettings(@project)
376
- Watobo::Conf::Scanner.logout_signatures = logout_signatures
377
- Watobo::Conf::SidCache.patterns = sidpatterns
378
- Watobo::Gui.save_settings()
337
+ # save settings
338
+ #saveProjectSettings(@project)
339
+ #saveSessionSettings(@project)
340
+ Watobo::Conf::Scanner.logout_signatures = logout_signatures
341
+ Watobo::Conf::SidCache.patterns = sidpatterns
342
+ Watobo::Gui.save_settings()
379
343
  end
380
344
  end
381
345
 
@@ -408,21 +372,21 @@ module Watobo#:nodoc: all
408
372
  end
409
373
 
410
374
  def openWwwAuthDialog()
411
- # if @project.nil?
412
- # FXMessageBox.information(self,MBOX_OK,"No Project Defined", "Create Project First")
413
- # else
414
- auth_settings = {}
415
- w3adlg = Watobo::Gui::WwwAuthDialog.new(self )
416
- if w3adlg.execute != 0
375
+ # if @project.nil?
376
+ # FXMessageBox.information(self,MBOX_OK,"No Project Defined", "Create Project First")
377
+ # else
378
+ auth_settings = {}
379
+ w3adlg = Watobo::Gui::WwwAuthDialog.new(self)
380
+ if w3adlg.execute != 0
417
381
  #puts "* New WWW-Authentication"
418
382
  #puts @project.getWwwAuthentication().to_yaml
419
383
  Watobo::Conf::General.save_passwords = w3adlg.savePasswords?
420
- # saveProjectSettings(@project)
421
- # Watobo::Gui.save_default_settings(@project)
422
- Watobo::Gui.save_settings()
384
+ # saveProjectSettings(@project)
385
+ # Watobo::Gui.save_default_settings(@project)
386
+ Watobo::Gui.save_settings()
423
387
  #@iproxy.www_auth = @project.getWwwAuthentication()
424
388
  Watobo::Interceptor.proxy.refresh_www_auth
425
- end
389
+ end
426
390
  #puts "* new www_auth settings"
427
391
  # puts YAML.dump(@project.settings[:www_auth])
428
392
  #end
@@ -431,42 +395,42 @@ module Watobo#:nodoc: all
431
395
 
432
396
  def open_client_cert_dialog()
433
397
  if @project.nil?
434
- FXMessageBox.information(self,MBOX_OK,"No Project Defined", "Create Project First")
398
+ FXMessageBox.information(self, MBOX_OK, "No Project Defined", "Create Project First")
435
399
  else
436
400
  ccdlg = Watobo::Gui::ClientCertDialog.new(self)
437
401
  if ccdlg.execute != 0
438
- #puts "* New WWW-Authentication"
439
- #puts @project.getWwwAuthentication().to_yaml
440
- #@settings[:password_policy][:save_passwords] = ccdlg.savePasswords?
441
- puts "* got client certificate settings"
442
- #puts ccdlg.client_cert_settings.to_yaml
443
- # Watobo.project.client_certificates = ccdlg.client_certificates
444
- # Watobo::Interceptor.proxy.client_certificates = ccdlg.client_certificates
445
- # saveProjectSettings(@project)
446
- Watobo::Gui.save_settings()
447
- # Watobo::Gui.save_default_settings(@project)
402
+ #puts "* New WWW-Authentication"
403
+ #puts @project.getWwwAuthentication().to_yaml
404
+ #@settings[:password_policy][:save_passwords] = ccdlg.savePasswords?
405
+ puts "* got client certificate settings"
406
+ #puts ccdlg.client_cert_settings.to_yaml
407
+ # Watobo.project.client_certificates = ccdlg.client_certificates
408
+ # Watobo::Interceptor.proxy.client_certificates = ccdlg.client_certificates
409
+ # saveProjectSettings(@project)
410
+ Watobo::Gui.save_settings()
411
+ # Watobo::Gui.save_default_settings(@project)
448
412
 
449
413
  end
450
- # puts YAML.dump(@project.settings[:www_auth])
414
+ # puts YAML.dump(@project.settings[:www_auth])
451
415
  end
452
416
 
453
417
  end
454
418
 
455
419
  def openPWPolicyDialog()
456
420
  if @project.nil?
457
- FXMessageBox.information(self,MBOX_OK,"No Project Defined", "Create Project First")
421
+ FXMessageBox.information(self, MBOX_OK, "No Project Defined", "Create Project First")
458
422
  else
459
423
  auth_settings = {}
460
- dlg = Watobo::Gui::PasswordPolicyDialog.new(self, @settings[:password_policy] )
424
+ dlg = Watobo::Gui::PasswordPolicyDialog.new(self, @settings[:password_policy])
461
425
  if dlg.execute != 0
462
- @settings[:password_policy] = dlg.passwordPolicy
463
- #Watobo::Gui.save_default_settings(@project)
464
- #puts "* New WWW-Authentication"
465
- #puts @project.getWwwAuthentication().to_yaml
466
- #@settings[:password_policy][:save_passwords] = w3adlg.savePasswords?
467
- #saveProjectSettings(@project)
468
- Watobo::Gui.save_settings()
469
- #@iproxy.www_auth = @project.settings[:www_auth]
426
+ @settings[:password_policy] = dlg.passwordPolicy
427
+ #Watobo::Gui.save_default_settings(@project)
428
+ #puts "* New WWW-Authentication"
429
+ #puts @project.getWwwAuthentication().to_yaml
430
+ #@settings[:password_policy][:save_passwords] = w3adlg.savePasswords?
431
+ #saveProjectSettings(@project)
432
+ Watobo::Gui.save_settings()
433
+ #@iproxy.www_auth = @project.settings[:www_auth]
470
434
  end
471
435
  end
472
436
 
@@ -478,30 +442,30 @@ module Watobo#:nodoc: all
478
442
  fuzzer.create
479
443
  fuzzer.show(Fox::PLACEMENT_SCREEN)
480
444
  rescue => bang
481
- puts "!!! could not open fuzzer"
482
- puts bang
445
+ puts "!!! could not open fuzzer"
446
+ puts bang
483
447
  end
484
448
  end
485
-
449
+
486
450
  def open_plugin_sqlmap(chat)
487
451
  begin
488
452
  sqlmap = Watobo::Plugin::Sqlmap::Gui.new(FXApp.instance, @project, chat)
489
453
  sqlmap.create
490
454
  sqlmap.show(Fox::PLACEMENT_SCREEN)
491
455
  rescue => bang
492
- puts "!!! could not open fuzzer"
493
- puts bang
456
+ puts "!!! could not open fuzzer"
457
+ puts bang
494
458
  end
495
459
  end
496
-
497
- def open_plugin_crawler(chat)
460
+
461
+ def open_plugin_crawler(chat)
498
462
  begin
499
463
  plugin = Watobo::Plugin::Crawler::Gui.new(FXApp.instance, @project, chat)
500
464
  plugin.create
501
465
  plugin.show(Fox::PLACEMENT_SCREEN)
502
466
  rescue => bang
503
- puts "!!! could not open fuzzer"
504
- puts bang
467
+ puts "!!! could not open fuzzer"
468
+ puts bang
505
469
  end
506
470
  end
507
471
 
@@ -526,7 +490,7 @@ module Watobo#:nodoc: all
526
490
  begin
527
491
  @switcher.setCurrent(2, true)
528
492
  rescue
529
- puts "no dashboard available yet!"
493
+ puts "no dashboard available yet!"
530
494
  end
531
495
  end
532
496
 
@@ -546,10 +510,10 @@ module Watobo#:nodoc: all
546
510
  puts "!!! PREVIEW PROBLEM !!"
547
511
  puts bang
548
512
  case bang
549
- when /JSSH_CONNECT_ERROR/i
550
- FXMessageBox.information(self, MBOX_OK, "JSSH Missing", "It seem that the Firefox JSSH extension is not installed,\nwhich is required in order to use the BrowserPreview.\nPlease read the installation instruction in the README\n or online at http://watobo.sourceforge.net.")
551
- else
552
- FXMessageBox.information(self, MBOX_OK, "Proxy Settings", "Your Browser does not use WATOBO (127.0.0.1:#{Watobo::Interceptor.proxy.port}) as its proxy.\nSo you can't use the Browser-View feature.\nPlease change your proxy settings and try it again!")
513
+ when /JSSH_CONNECT_ERROR/i
514
+ FXMessageBox.information(self, MBOX_OK, "JSSH Missing", "It seem that the Firefox JSSH extension is not installed,\nwhich is required in order to use the BrowserPreview.\nPlease read the installation instruction in the README\n or online at http://watobo.sourceforge.net.")
515
+ else
516
+ FXMessageBox.information(self, MBOX_OK, "Proxy Settings", "Your Browser does not use WATOBO (127.0.0.1:#{Watobo::Interceptor.proxy.port}) as its proxy.\nSo you can't use the Browser-View feature.\nPlease change your proxy settings and try it again!")
553
517
  end
554
518
  end
555
519
  end
@@ -581,31 +545,31 @@ module Watobo#:nodoc: all
581
545
  @switcher.setCurrent(4, true)
582
546
  @pluginboard.updateBoard()
583
547
  rescue => bang
584
- puts bang
585
- puts bang.backtrace if $DEBUG
548
+ puts bang
549
+ puts bang.backtrace if $DEBUG
586
550
  end
587
551
  end
588
552
 
589
553
  def useSmallIcons()
590
554
  unless @project.nil?
591
- @findings_tree.useSmallIcons()
592
- @sites_tree.useSmallIcons()
593
- # @chatTable.setNewFont( "helvetica", GUI_SMALL_FONT_SIZE)
594
- @chatTable.setNewFont("Segoe UI", GUI_SMALL_FONT_SIZE)
595
- @request_viewer.setFontSize(GUI_SMALL_FONT_SIZE)
596
- @response_viewer.setFontSize(GUI_SMALL_FONT_SIZE)
555
+ @findings_tree.useSmallIcons()
556
+ @sites_tree.useSmallIcons()
557
+ # @chatTable.setNewFont( "helvetica", GUI_SMALL_FONT_SIZE)
558
+ @chatTable.setNewFont("Segoe UI", GUI_SMALL_FONT_SIZE)
559
+ @request_viewer.setFontSize(GUI_SMALL_FONT_SIZE)
560
+ @response_viewer.setFontSize(GUI_SMALL_FONT_SIZE)
597
561
  else
598
562
  end
599
563
  end
600
564
 
601
565
  def useRegularIcons()
602
566
  unless @project.nil?
603
- @findings_tree.useRegularIcons()
604
- @sites_tree.useRegularIcons()
605
- @chatTable.setNewFont("Segoe UI", GUI_REGULAR_FONT_SIZE)
606
- #@chatTable.setNewFont("helvetica", GUI_REGULAR_FONT_SIZE)
607
- @request_viewer.setFontSize(GUI_REGULAR_FONT_SIZE)
608
- @response_viewer.setFontSize(GUI_REGULAR_FONT_SIZE)
567
+ @findings_tree.useRegularIcons()
568
+ @sites_tree.useRegularIcons()
569
+ @chatTable.setNewFont("Segoe UI", GUI_REGULAR_FONT_SIZE)
570
+ #@chatTable.setNewFont("helvetica", GUI_REGULAR_FONT_SIZE)
571
+ @request_viewer.setFontSize(GUI_REGULAR_FONT_SIZE)
572
+ @response_viewer.setFontSize(GUI_REGULAR_FONT_SIZE)
609
573
  else
610
574
  end
611
575
  end
@@ -619,50 +583,50 @@ module Watobo#:nodoc: all
619
583
  def refreshViewers()
620
584
  @findings_tree.reload()
621
585
  @sites_tree.reload()
622
- #@chatTable.clearItems()
586
+ #@chatTable.clearItems()
623
587
  end
624
588
 
625
589
  def onOpenInterceptor(sender, sel, ptr)
626
590
  unless Watobo.project.nil?
627
- interceptor = Watobo::Gui::InterceptorUI.new(self, :opts => DECOR_ALL)
628
- Watobo::Interceptor.proxy.target = interceptor
629
- puts "* Interceptor created"
630
- #@project.interceptor = interceptor
631
- interceptor.create
632
- interceptor.show(Fox::PLACEMENT_SCREEN)
633
- getApp().runModalWhileShown(interceptor)
634
- interceptor.releaseAll()
635
- puts "* Interceptor closed"
636
- #iproxy.target = nil
637
- #if interceptor.execute != 0 then
638
- # puts "interceptor finished"
639
- #end
591
+ interceptor = Watobo::Gui::InterceptorUI.new(self, :opts => DECOR_ALL)
592
+ Watobo::Interceptor.proxy.target = interceptor
593
+ puts "* Interceptor created"
594
+ #@project.interceptor = interceptor
595
+ interceptor.create
596
+ interceptor.show(Fox::PLACEMENT_SCREEN)
597
+ getApp().runModalWhileShown(interceptor)
598
+ interceptor.releaseAll()
599
+ puts "* Interceptor closed"
600
+ #iproxy.target = nil
601
+ #if interceptor.execute != 0 then
602
+ # puts "interceptor finished"
603
+ #end
640
604
  else
641
605
 
642
- FXMessageBox.information(self,MBOX_OK,"No Project Defined", "Create Project First")
606
+ FXMessageBox.information(self, MBOX_OK, "No Project Defined", "Create Project First")
643
607
  end
644
608
  end
645
609
 
646
610
  def update_status_bar()
647
- unless Watobo.project.nil?
648
- @statusBar.projectName = Watobo.project_name
649
- @statusBar.sessionName = Watobo.session_name
650
- @dashboard.updateProjectInfo()
651
- @scan_button.enable
652
- @statusBar.statusInfoText = "Ready"
611
+ unless Watobo.project.nil?
612
+ @statusBar.projectName = Watobo.project_name
613
+ @statusBar.sessionName = Watobo.session_name
614
+ @dashboard.updateProjectInfo()
615
+ @scan_button.enable
616
+ @statusBar.statusInfoText = "Ready"
653
617
  end
654
618
  @statusBar.bindAddress= Watobo::Conf::Interceptor.bind_addr.to_s
655
619
  @statusBar.portNumber = Watobo::Conf::Interceptor.port.to_s
656
620
  @statusBar.forwardingProxy = "-"
657
- # puts Watobo::Conf::ForwardingProxy.default_proxy
658
-
621
+ # puts Watobo::Conf::ForwardingProxy.default_proxy
622
+
659
623
  #unless Watobo::Conf::ForwardingProxy.default_proxy.empty?
660
624
  # default_proxy = Watobo::Conf::ForwardingProxy.default_proxy
661
625
  # ps = Watobo::Conf::ForwardingProxy.to_h
662
626
  # proxy = ps[default_proxy]
663
627
  # @statusBar.forwardingProxy = "#{proxy[:name]} (#{proxy[:host]}:#{proxy[:port]})"
664
628
  #end
665
-
629
+
666
630
  @statusBar.update_proxy_mode
667
631
  end
668
632
 
@@ -688,7 +652,6 @@ module Watobo#:nodoc: all
688
652
  end
689
653
 
690
654
 
691
-
692
655
  def closeProject()
693
656
  @project = nil
694
657
  Watobo::Chats.reset
@@ -711,38 +674,38 @@ module Watobo#:nodoc: all
711
674
  #
712
675
  # onNewProject
713
676
  #
714
- def onNewProject(sender,sel,ptr)
677
+ def onNewProject(sender, sel, ptr)
715
678
 
716
679
  if @project then
717
- response = FXMessageBox.question(self, MBOX_YES_NO, "New Project", "This will close the actual project!\nAre you sure?")
718
- return 0 if not response == MBOX_CLICKED_YES
719
- # clear old project
720
- closeProject()
721
- # stop interceptor
680
+ response = FXMessageBox.question(self, MBOX_YES_NO, "New Project", "This will close the actual project!\nAre you sure?")
681
+ return 0 if not response == MBOX_CLICKED_YES
682
+ # clear old project
683
+ closeProject()
684
+ # stop interceptor
722
685
  end
723
686
 
724
687
  puts "* Open Project Wizzard (#{Watobo::Conf::General.workspace_path})" if $DEBUG
725
- newProjectWizzard = Watobo::Gui::NewProjectWizzard.new(self, Watobo::Conf::General.workspace_path )
688
+ newProjectWizzard = Watobo::Gui::NewProjectWizzard.new(self, Watobo::Conf::General.workspace_path)
726
689
  if newProjectWizzard.execute != 0
727
690
  # prepare project settings
728
691
  new_project_settings = {
729
- :project_path => newProjectWizzard.selected_project_path,
730
- :session_path => newProjectWizzard.selected_session_path,
731
- :project_name => newProjectWizzard.project_name,
732
- :session_name => newProjectWizzard.session_name
692
+ :project_path => newProjectWizzard.selected_project_path,
693
+ :session_path => newProjectWizzard.selected_session_path,
694
+ :project_name => newProjectWizzard.project_name,
695
+ :session_name => newProjectWizzard.session_name
733
696
  }
734
- # @settings[:general][:workspace_path]
735
- Watobo::Conf::General.workspace_path = newProjectWizzard.workspace_dir
736
- Watobo.workspace_path = newProjectWizzard.workspace_dir
697
+ # @settings[:general][:workspace_path]
698
+ Watobo::Conf::General.workspace_path = newProjectWizzard.workspace_dir
699
+ Watobo.workspace_path = newProjectWizzard.workspace_dir
737
700
 
738
- project = Watobo.create_project(:project_name => newProjectWizzard.project_name, :session_name => newProjectWizzard.session_name)
739
-
740
- startProject(project)
741
-
742
- Watobo::Gui.history.add_entry(:project_name => new_project_settings[:project_name], :session_name => new_project_settings[:session_name])
743
- #Watobo::Gui.save_default_settings project
744
- Watobo::Gui.save_settings()
745
- #puts @project.class
701
+ project = Watobo.create_project(:project_name => newProjectWizzard.project_name, :session_name => newProjectWizzard.session_name)
702
+
703
+ startProject(project)
704
+
705
+ Watobo::Gui.history.add_entry(:project_name => new_project_settings[:project_name], :session_name => new_project_settings[:session_name])
706
+ #Watobo::Gui.save_default_settings project
707
+ Watobo::Gui.save_settings()
708
+ #puts @project.class
746
709
  end
747
710
 
748
711
  end
@@ -757,11 +720,11 @@ module Watobo#:nodoc: all
757
720
 
758
721
  subscribeProject()
759
722
 
760
- @project.subscribe(:update_progress){ |up|
723
+ @project.subscribe(:update_progress) { |up|
761
724
  begin
762
725
  @progress_window.update_progress(up)
763
726
  rescue => bang
764
- puts bang
727
+ puts bang
765
728
  end
766
729
  }
767
730
 
@@ -772,63 +735,61 @@ module Watobo#:nodoc: all
772
735
  @findings_tree.hide
773
736
  #TODO: Disable Menu
774
737
 
775
- Thread.new{
738
+ Thread.new {
776
739
  begin
777
740
  print "\n* setting up project ..."
778
741
  @project.setupProject()
779
742
  print "[OK]\n"
780
743
 
781
-
744
+
782
745
  Watobo::Gui.clear_plugins
783
746
  print "* load plugins ..."
784
747
  Watobo::Gui::Utils.load_plugins(@project)
785
748
  print "[OK]\n"
786
-
749
+
787
750
  @sites_tree.project = @project
788
751
  @findings_tree.project = @project
789
752
  Watobo::Gui.project = @project
790
753
  puts "* finished, closing progress window" if $DEBUG
791
754
 
792
755
  rescue => bang
793
- # puts "!!! Could not create project"
756
+ # puts "!!! Could not create project"
794
757
  puts bang
795
758
  puts bang.backtrace if $DEBUG
796
759
  puts "!!! Could not create project :("
797
760
  ensure
798
- puts "* stop modal mode" if $DEBUG
799
- @msg_lock.synchronize do
800
- #getApp.stopModal
801
- @msg_queue << :modal_finished
802
- end
803
-
761
+ puts "* stop modal mode" if $DEBUG
762
+ # Watobo::Gui.application.runOnUiThread do
763
+ FXApp.instance.addChore do
764
+ getApp.stopModal
765
+ end
804
766
  end
805
-
806
767
  }
807
768
  getApp().runModal
808
-
809
-
810
- update_conversation_table()
811
- update_status_bar()
812
- puts "* starting interceptor"
813
- Watobo::Interceptor.start
814
- puts "* starting passive scanner"
815
- Watobo::PassiveScanner.start
816
- @browserView = BrowserPreview.new(Watobo::Interceptor.proxy)
817
-
818
- # be sure to hide the progress window
819
- @progress_window.destroy
820
-
821
-
822
- @chatTable.show
823
- @sites_tree.show
824
- @sites_tree.reload
825
- @findings_tree.show
826
- @findings_tree.reload
827
-
828
- @chatTable.apply_filter(@conversation_table_ctrl.filter)
829
- @conversation_table_ctrl.update_text
830
-
831
-
769
+
770
+
771
+ update_conversation_table()
772
+ update_status_bar()
773
+ puts "* starting interceptor"
774
+ Watobo::Interceptor.start
775
+ puts "* starting passive scanner"
776
+ Watobo::PassiveScanner.start
777
+ @browserView = BrowserPreview.new(Watobo::Interceptor.proxy)
778
+
779
+ # be sure to hide the progress window
780
+ @progress_window.destroy
781
+
782
+
783
+ @chatTable.show
784
+ @sites_tree.show
785
+ @sites_tree.reload
786
+ @findings_tree.show
787
+ @findings_tree.reload
788
+
789
+ @chatTable.apply_filter(@conversation_table_ctrl.filter)
790
+ @conversation_table_ctrl.update_text
791
+
792
+
832
793
  puts "Project Started"
833
794
  puts "Active Modules: #{Watobo::ActiveModules.length}"
834
795
  puts "Passive Modules: #{Watobo::PassiveModules.length}"
@@ -844,13 +805,13 @@ module Watobo#:nodoc: all
844
805
  if @settings[:master_password].empty?
845
806
  note = ""
846
807
  message = case bad_pass_count
847
- when 1
848
- "Bad Password!!!\n"
849
- when 2
850
- "Wrong Password Again? Next time WATOBO will continue without loading stored passwords.\n"
851
- else
852
- "Please provide the master-password to decrypt passwords.\n"
853
- end
808
+ when 1
809
+ "Bad Password!!!\n"
810
+ when 2
811
+ "Wrong Password Again? Next time WATOBO will continue without loading stored passwords.\n"
812
+ else
813
+ "Please provide the master-password to decrypt passwords.\n"
814
+ end
854
815
  message << "If you hit 'cancel' the passwords will be deleted!\nYou can disable master-password in the settings menu.\nThe latter is not recommended!"
855
816
  dlg = MasterPWDialog.new(self, dlg_titel, :info => message, :retype => false)
856
817
  if dlg.execute != 0
@@ -859,22 +820,22 @@ module Watobo#:nodoc: all
859
820
  dec_pw = Crypto.decryptPassword(enc_pw, master_pass)
860
821
  @settings[:master_password] = master_pass
861
822
  rescue => bang
862
- puts "! wrong password"
863
- @settings[:master_password] = ''
864
- bad_pass_count += 1
865
- #FXMessageBox.information(self,MBOX_OK,"Wrong Password!", "Could not decrypt proxy passwords. Check proxy settings!")
823
+ puts "! wrong password"
824
+ @settings[:master_password] = ''
825
+ bad_pass_count += 1
826
+ #FXMessageBox.information(self,MBOX_OK,"Wrong Password!", "Could not decrypt proxy passwords. Check proxy settings!")
866
827
  end
867
828
  else
868
- dlg_canceled = true
869
- @settings[:master_password] = ''
829
+ dlg_canceled = true
830
+ @settings[:master_password] = ''
870
831
  end
871
832
  else
872
833
  begin
873
834
  dec_pw = Crypto.decryptPassword(enc_pw, @settings[:master_password])
874
- # @settings[:master_password] = master_pass
835
+ # @settings[:master_password] = master_pass
875
836
  rescue => bang
876
- @settings[:master_password] = ''
877
- #FXMessageBox.information(self,MBOX_OK,"Wrong Password!", "Could not decrypt proxy passwords. Check proxy settings!")
837
+ @settings[:master_password] = ''
838
+ #FXMessageBox.information(self,MBOX_OK,"Wrong Password!", "Could not decrypt proxy passwords. Check proxy settings!")
878
839
  end
879
840
  end
880
841
  end
@@ -898,17 +859,17 @@ module Watobo#:nodoc: all
898
859
  # puts "* decrypting password for proxy #{proxies[k][:host]}"
899
860
  dp = decryptPassword(proxy[:password], "Decrypt Proxy Passwords")
900
861
  unless dp.nil?
901
- proxy[:password] = dp
902
- proxy[:encrypted] = false
862
+ proxy[:password] = dp
863
+ proxy[:encrypted] = false
903
864
  else
904
- proxy[:password] = ''
905
- proxy[:encrypted] = false
906
- decrypt_failed = true
907
- FXMessageBox.information(self,MBOX_OK,"Wrong Master Password!", "Could not decrypt passwords. Please reconfigure proxy passwords!")
865
+ proxy[:password] = ''
866
+ proxy[:encrypted] = false
867
+ decrypt_failed = true
868
+ FXMessageBox.information(self, MBOX_OK, "Wrong Master Password!", "Could not decrypt passwords. Please reconfigure proxy passwords!")
908
869
  end
909
870
  else
910
- proxy[:password] = ''
911
- proxy[:encrypted] = false
871
+ proxy[:password] = ''
872
+ proxy[:encrypted] = false
912
873
  end
913
874
  end
914
875
  end
@@ -923,17 +884,17 @@ module Watobo#:nodoc: all
923
884
  unless decrypt_failed
924
885
  dp = decryptPassword(creds[:password], "Decrypt Server Password")
925
886
  unless dp.nil?
926
- creds[:password] = dp
927
- creds[:encrypted] = false
887
+ creds[:password] = dp
888
+ creds[:encrypted] = false
928
889
  else
929
- creds[:password] = ''
930
- creds[:encrypted] = false
931
- decrypt_failed = true
932
- FXMessageBox.information(self,MBOX_OK,"Wrong Master Password!", "Could not decrypt passwords. Please reconfigure server passwords!")
890
+ creds[:password] = ''
891
+ creds[:encrypted] = false
892
+ decrypt_failed = true
893
+ FXMessageBox.information(self, MBOX_OK, "Wrong Master Password!", "Could not decrypt passwords. Please reconfigure server passwords!")
933
894
  end
934
895
  else
935
- creds[:password] = ''
936
- creds[:encrypted] = false
896
+ creds[:password] = ''
897
+ creds[:encrypted] = false
937
898
  end
938
899
 
939
900
  end
@@ -942,23 +903,23 @@ module Watobo#:nodoc: all
942
903
 
943
904
  end
944
905
 
945
- def openSession( prefs = {} )
906
+ def openSession(prefs = {})
946
907
  # puts "= Loading Session ="
947
908
  # session_file = File.join( Watobo.workspace_path, prefs[:project_name], prefs[:session_name] )
948
909
  # puts "SessionFile: #{session_file}"
949
910
  if @project then
950
- response = FXMessageBox.question(self, MBOX_YES_NO, "New Project", "This will close the actual project!\nAre you sure?")
951
- return false if not response == MBOX_CLICKED_YES
952
- # clear old project
953
- closeProject()
954
- # stop interceptor
911
+ response = FXMessageBox.question(self, MBOX_YES_NO, "New Project", "This will close the actual project!\nAre you sure?")
912
+ return false if not response == MBOX_CLICKED_YES
913
+ # clear old project
914
+ closeProject()
915
+ # stop interceptor
955
916
  end
956
917
 
957
918
  session_settings = {}
958
919
 
959
920
  # if File.exists?(session_file) then
960
921
  # session_settings = Watobo::Utils.load_settings(session_file)
961
- #updateistory(session_file)
922
+ #updateistory(session_file)
962
923
 
963
924
  # else
964
925
  # puts "!!! Session file does not exist (#{session_file})."
@@ -969,8 +930,8 @@ module Watobo#:nodoc: all
969
930
  return false unless prefs.has_key? :session_name
970
931
 
971
932
  project = Watobo.create_project(
972
- :project_name => prefs[:project_name],
973
- :session_name => prefs[:session_name]
933
+ :project_name => prefs[:project_name],
934
+ :session_name => prefs[:session_name]
974
935
  )
975
936
 
976
937
  puts "* starting project"
@@ -1013,40 +974,40 @@ module Watobo#:nodoc: all
1013
974
  =end
1014
975
  end
1015
976
 
1016
- def openScannerSettingsDialog(sender,sel,ptr)
1017
- # if @project then
1018
- # settings = @project.getScanPreferences()
1019
- # puts settings.to_yaml
1020
- # dlg = Watobo::Gui::ScannerSettingsDialog.new(self, settings, LAYOUT_FILL_X|LAYOUT_FILL_Y)
1021
- dlg = Watobo::Gui::ScannerSettingsDialog.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
1022
- if dlg.execute != 0 then
977
+ def openScannerSettingsDialog(sender, sel, ptr)
978
+ # if @project then
979
+ # settings = @project.getScanPreferences()
980
+ # puts settings.to_yaml
981
+ # dlg = Watobo::Gui::ScannerSettingsDialog.new(self, settings, LAYOUT_FILL_X|LAYOUT_FILL_Y)
982
+ dlg = Watobo::Gui::ScannerSettingsDialog.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
983
+ if dlg.execute != 0 then
1023
984
  # puts dlg.scanner_settings.to_yaml
1024
- # @project.updateSettings(YAML.load(YAML.dump(dlg.scanner_settings)))
1025
- # saveProjectSettings(@project)
985
+ # @project.updateSettings(YAML.load(YAML.dump(dlg.scanner_settings)))
986
+ # saveProjectSettings(@project)
1026
987
  Watobo::Gui.save_settings()
1027
988
 
1028
- end
1029
- # else
1030
- # FXMessageBox.information(self,MBOX_OK,"No Project Defined", "Create Project First!")
1031
- # end
989
+ end
990
+ # else
991
+ # FXMessageBox.information(self,MBOX_OK,"No Project Defined", "Create Project First!")
992
+ # end
1032
993
  end
1033
994
 
1034
- def openInterceptorSettingsDialog(sender,sel,ptr)
995
+ def openInterceptorSettingsDialog(sender, sel, ptr)
1035
996
  dlg = Watobo::Gui::InterceptorSettingsDialog.new(self)
1036
997
  if dlg.execute != 0 then
1037
- puts dlg.interceptor_settings.to_yaml if $DEBUG
1038
- Watobo::Conf::Interceptor.set dlg.interceptor_settings
1039
- @statusBar.update_proxy_mode
1040
- #@settings[:interceptor].update YAML.load(YAML.dump(dlg.interceptor_settings))
1041
- #@project.updateSettings(YAML.load(YAML.dump(dlg.scanner_settings)))
1042
- FXMessageBox.information(self, MBOX_OK, "Restart required!", "You must restart WATOBO in order your changes take effect.")
1043
- Watobo::Conf::Interceptor.save
1044
- Watobo::Gui.save_settings()
1045
- #Watobo::Gui.save_default_settings(@settings[:interceptor])
998
+ puts dlg.interceptor_settings.to_yaml if $DEBUG
999
+ Watobo::Conf::Interceptor.set dlg.interceptor_settings
1000
+ @statusBar.update_proxy_mode
1001
+ #@settings[:interceptor].update YAML.load(YAML.dump(dlg.interceptor_settings))
1002
+ #@project.updateSettings(YAML.load(YAML.dump(dlg.scanner_settings)))
1003
+ FXMessageBox.information(self, MBOX_OK, "Restart required!", "You must restart WATOBO in order your changes take effect.")
1004
+ Watobo::Conf::Interceptor.save
1005
+ Watobo::Gui.save_settings()
1006
+ #Watobo::Gui.save_default_settings(@settings[:interceptor])
1046
1007
  end
1047
1008
  end
1048
1009
 
1049
- def openScopeDialog(sender,sel,ptr)
1010
+ def openScopeDialog(sender, sel, ptr)
1050
1011
  dlg = Watobo::Gui::EditScopeDialog.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y)
1051
1012
  if dlg.execute != 0 then
1052
1013
  Watobo::Gui.save_settings()
@@ -1054,55 +1015,55 @@ module Watobo#:nodoc: all
1054
1015
  end
1055
1016
  end
1056
1017
 
1057
- def startFullScan(sender,sel,ptr)
1018
+ def startFullScan(sender, sel, ptr)
1058
1019
  unless @scanner.nil?
1059
- #if @scan_button.icon == ICON_STOP
1060
- @scanner.cancel() if @scanner
1061
- @scan_button.icon = ICON_START
1062
- @scan_running = false
1063
- @scanner = nil
1020
+ #if @scan_button.icon == ICON_STOP
1021
+ @scanner.cancel() if @scanner
1022
+ @scan_button.icon = ICON_START
1023
+ @scan_running = false
1024
+ @scanner = nil
1064
1025
  else
1065
1026
  dlg = Watobo::Gui::FullScanDialog.new(self, @project, LAYOUT_FILL_X|LAYOUT_FILL_Y)
1066
1027
  if dlg.execute != 0 then
1067
1028
 
1068
1029
  @scan_running = true
1069
1030
  @scan_button.icon = ICON_STOP
1070
-
1031
+
1071
1032
  Watobo::Scope.set dlg.scope
1072
1033
 
1073
-
1034
+
1074
1035
  selected_modules = dlg.activeModules
1075
-
1036
+
1076
1037
  in_scope_chats = Watobo::Chats.in_scope()
1077
-
1038
+
1078
1039
  puts "Chats in Scope: #{in_scope_chats.length}"
1079
1040
 
1080
1041
  confirm_dlg = Watobo::Gui::ConfirmScanDialog.new(self, in_scope_chats)
1081
-
1042
+
1082
1043
  if confirm_dlg.execute == 0
1083
1044
  @scan_button.icon = ICON_START
1084
1045
  @scan_running = false
1085
1046
  return 0
1086
1047
  end
1087
1048
 
1088
- # scan_prefs = @project.getScanPreferences()
1089
- scan_prefs = Watobo::Conf::Scanner.to_h
1049
+ # scan_prefs = @project.getScanPreferences()
1050
+ scan_prefs = Watobo::Conf::Scanner.to_h
1090
1051
  scan_prefs[:scan_name] = "scan_" + Time.now.to_i.to_s + "_full"
1091
1052
 
1092
- @scanner = Watobo::Scanner3.new(in_scope_chats, selected_modules , [], scan_prefs)
1053
+ @scanner = Watobo::Scanner3.new(in_scope_chats, selected_modules, [], scan_prefs)
1093
1054
 
1094
1055
  @scanner.subscribe(:progress) { |check|
1095
- @dashboard.progress(check)
1096
-
1056
+ @dashboard.progress(check)
1057
+
1097
1058
  }
1098
1059
 
1099
- @scanner.subscribe(:module_finished) { |mod|
1100
- @dashboard.module_finished(mod)
1060
+ @scanner.subscribe(:module_finished) { |mod|
1061
+ @dashboard.module_finished(mod)
1101
1062
  }
1102
1063
 
1103
- @scanner.subscribe(:logger){ |level, message|
1104
- #@log_viewer.log(level, message)
1105
- Watobo.log(message, :sender=>'Scanner')
1064
+ @scanner.subscribe(:logger) { |level, message|
1065
+ #@log_viewer.log(level, message)
1066
+ Watobo.log(message, :sender => 'Scanner')
1106
1067
  }
1107
1068
 
1108
1069
 
@@ -1110,18 +1071,18 @@ module Watobo#:nodoc: all
1110
1071
  begin
1111
1072
  @project.addFinding(finding)
1112
1073
  rescue => bang
1113
- puts bang
1114
- puts bang.backtrace if $DEBUG
1074
+ puts bang
1075
+ puts bang.backtrace if $DEBUG
1115
1076
  end
1116
1077
  }
1117
1078
 
1118
1079
 
1119
- @dashboard.setupScanProgressFrame(@scanner)
1120
-
1121
- @dashboard.setScanStatus("Running")
1122
- @statusBar.setStatusInfo(:text => "Full Scan Running", :color => 'red')
1123
- @scanner.run(:run_passive_checks => false, :update_sids => true, :update_session => true)
1124
-
1080
+ @dashboard.setupScanProgressFrame(@scanner)
1081
+
1082
+ @dashboard.setScanStatus("Running")
1083
+ @statusBar.setStatusInfo(:text => "Full Scan Running", :color => 'red')
1084
+ @scanner.run(:run_passive_checks => false, :update_sids => true, :update_session => true)
1085
+
1125
1086
  end
1126
1087
  end
1127
1088
  end
@@ -1129,17 +1090,17 @@ module Watobo#:nodoc: all
1129
1090
  def pauseScan(sender, sel, ptr)
1130
1091
  begin
1131
1092
  if @scanner.running?
1132
- @scanner.stop
1133
- @dashboard.setScanStatus("Scan Paused")
1134
- @statusBar.statusInfoText = "Scan Paused"
1093
+ @scanner.stop
1094
+ @dashboard.setScanStatus("Scan Paused")
1095
+ @statusBar.statusInfoText = "Scan Paused"
1135
1096
  else
1136
- @scanner.continue
1137
- @dashboard.setScanStatus("Scan Running")
1138
- @statusBar.statusInfoText = "Full Scan Running"
1097
+ @scanner.continue
1098
+ @dashboard.setScanStatus("Scan Running")
1099
+ @statusBar.statusInfoText = "Full Scan Running"
1139
1100
  end
1140
1101
  rescue => bang
1141
- puts "!!!ERROR: Could not pause scanner"
1142
- puts bang
1102
+ puts "!!!ERROR: Could not pause scanner"
1103
+ puts bang
1143
1104
  end
1144
1105
  end
1145
1106
 
@@ -1152,15 +1113,15 @@ module Watobo#:nodoc: all
1152
1113
 
1153
1114
  self.icon = ICON_WATOBO
1154
1115
  self.show(PLACEMENT_MAXIMIZED)
1155
-
1116
+
1156
1117
  self.extend Watobo::Gui::Settings
1157
-
1118
+
1158
1119
  self.connect(SEL_CLOSE, method(:onClose))
1159
1120
 
1160
1121
  @project = nil
1161
1122
 
1162
1123
  @scanner = nil
1163
- # @iproxy = nil
1124
+ # @iproxy = nil
1164
1125
  @browserView = nil
1165
1126
 
1166
1127
  @scan_running = false
@@ -1176,7 +1137,7 @@ module Watobo#:nodoc: all
1176
1137
  # array for gui plugins. will be filled after project creation.
1177
1138
  @plugins = []
1178
1139
  @app = app
1179
- @progressWindow = nil # reserved for simple progress Window
1140
+ @progressWindow = nil # reserved for simple progress Window
1180
1141
  @switcher = nil
1181
1142
  @interceptor = nil
1182
1143
 
@@ -1185,7 +1146,6 @@ module Watobo#:nodoc: all
1185
1146
  @finding_lock = Mutex.new
1186
1147
  @chat_lock = Mutex.new
1187
1148
  @status_lock = Mutex.new
1188
- @msg_lock = Mutex.new
1189
1149
 
1190
1150
  @finding_queue = []
1191
1151
  @chat_queue = []
@@ -1194,39 +1154,39 @@ module Watobo#:nodoc: all
1194
1154
  # setup clipboard
1195
1155
  @clipboard_text = ""
1196
1156
  self.connect(SEL_CLIPBOARD_REQUEST) do
1197
- # setDNDData(FROM_CLIPBOARD, FXWindow.stringType, Fox.fxencodeStringData(@clipboard_text))
1198
- setDNDData(FROM_CLIPBOARD, FXWindow.stringType, @clipboard_text + "\x00" )
1157
+ # setDNDData(FROM_CLIPBOARD, FXWindow.stringType, Fox.fxencodeStringData(@clipboard_text))
1158
+ setDNDData(FROM_CLIPBOARD, FXWindow.stringType, @clipboard_text + "\x00")
1199
1159
  end
1200
1160
 
1201
1161
  menu_bar = FXMenuBar.new(self, :opts => LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
1202
1162
 
1203
- @menu_items = []
1163
+ @menu_items = []
1204
1164
  file_menu_pane = FXMenuPane.new(self)
1205
-
1206
- FXMenuTitle.new(menu_bar, "File" , :popupMenu => file_menu_pane)
1207
- @file_new_menu = FXMenuCommand.new(file_menu_pane, "New/Open" )
1165
+
1166
+ FXMenuTitle.new(menu_bar, "File", :popupMenu => file_menu_pane)
1167
+ @file_new_menu = FXMenuCommand.new(file_menu_pane, "New/Open")
1208
1168
  @file_new_menu.connect(SEL_COMMAND, method(:onNewProject))
1209
-
1210
- export_menu = FXMenuCommand.new(file_menu_pane, "Export" )
1169
+
1170
+ export_menu = FXMenuCommand.new(file_menu_pane, "Export")
1211
1171
  #FXMenuCommand.new(file_menu_pane, "Exit", nil, getApp(), FXApp::ID_QUIT)
1212
1172
  export_menu.connect(SEL_COMMAND, method(:onExport))
1213
1173
 
1214
1174
 
1215
- exit_menu = FXMenuCommand.new(file_menu_pane, "Exit" )
1175
+ exit_menu = FXMenuCommand.new(file_menu_pane, "Exit")
1216
1176
  #FXMenuCommand.new(file_menu_pane, "Exit", nil, getApp(), FXApp::ID_QUIT)
1217
1177
  exit_menu.connect(SEL_COMMAND, method(:onExit))
1218
1178
 
1219
1179
  FXMenuSeparator.new(file_menu_pane)
1220
1180
 
1221
1181
  submenu = FXMenuPane.new(self) do |session_menu|
1222
- Watobo::Gui.history.entries.sort_by{ |id, he| he[:last_used] }.reverse.each do |i,h|
1182
+ Watobo::Gui.history.entries.sort_by { |id, he| he[:last_used] }.reverse.each do |i, h|
1223
1183
  hname = h[:project_name] + " - " + h[:session_name] + " (#{Time.at(h[:last_used]).strftime("%Y-%m-%d %H:%M")})"
1224
- history = FXMenuCommand.new(session_menu, hname )
1184
+ history = FXMenuCommand.new(session_menu, hname)
1225
1185
  history.connect(SEL_COMMAND) do |sender, sel, item|
1226
- # puts "open session #{h}"
1227
- # puts "!!!ERROR Could not start session #{h}" if !openSession(h)
1186
+ # puts "open session #{h}"
1187
+ # puts "!!!ERROR Could not start session #{h}" if !openSession(h)
1228
1188
  if openSession(:project_name => h[:project_name], :session_name => h[:session_name])
1229
- Watobo::Gui.history.update_usage( :project_name => h[:project_name], :session_name => h[:session_name])
1189
+ Watobo::Gui.history.update_usage(:project_name => h[:project_name], :session_name => h[:session_name])
1230
1190
  end
1231
1191
 
1232
1192
  end
@@ -1240,32 +1200,32 @@ module Watobo#:nodoc: all
1240
1200
  # file_save_as_command = FXMenuCommand.new(file_menu_pane, "Save As..." )
1241
1201
 
1242
1202
  settings_menu_pane = FXMenuPane.new(self)
1243
- # @menu_items << settings_menu_pane
1244
- FXMenuTitle.new(menu_bar, "Settings" , :popupMenu => settings_menu_pane)
1245
- @proxy_menu = FXMenuCommand.new(settings_menu_pane, "Forwarding Proxy..." )
1246
- @session_mgmt_menu = FXMenuCommand.new(settings_menu_pane, "Session Management..." )
1203
+ # @menu_items << settings_menu_pane
1204
+ FXMenuTitle.new(menu_bar, "Settings", :popupMenu => settings_menu_pane)
1205
+ @proxy_menu = FXMenuCommand.new(settings_menu_pane, "Forwarding Proxy...")
1206
+ @session_mgmt_menu = FXMenuCommand.new(settings_menu_pane, "Session Management...")
1247
1207
  # @project ? menu_session.enable : menu_session.disable
1248
1208
 
1249
- # menu_ca = FXMenuCommand.new(settings_menu_pane, "Create Certificate..." )
1250
- # menu_ca.connect(SEL_COMMAND, method(:openCADialog))
1209
+ # menu_ca = FXMenuCommand.new(settings_menu_pane, "Create Certificate..." )
1210
+ # menu_ca.connect(SEL_COMMAND, method(:openCADialog))
1251
1211
 
1252
- @target_scope_menu = FXMenuCommand.new(settings_menu_pane, "Target Scope..." )
1212
+ @target_scope_menu = FXMenuCommand.new(settings_menu_pane, "Target Scope...")
1253
1213
  @target_scope_menu.connect(SEL_COMMAND, method(:openScopeDialog))
1254
1214
 
1255
- @scanner_menu = FXMenuCommand.new(settings_menu_pane, "Scanner..." )
1215
+ @scanner_menu = FXMenuCommand.new(settings_menu_pane, "Scanner...")
1256
1216
  @scanner_menu.connect(SEL_COMMAND, method(:openScannerSettingsDialog))
1257
1217
 
1258
- @interceptor_menu = FXMenuCommand.new(settings_menu_pane, "Interceptor..." )
1218
+ @interceptor_menu = FXMenuCommand.new(settings_menu_pane, "Interceptor...")
1259
1219
  @interceptor_menu.connect(SEL_COMMAND, method(:openInterceptorSettingsDialog))
1260
1220
 
1261
- @www_auth_menu = FXMenuCommand.new(settings_menu_pane, "WWW-Auth..." )
1262
- @www_auth_menu .connect(SEL_COMMAND) { openWwwAuthDialog() }
1221
+ @www_auth_menu = FXMenuCommand.new(settings_menu_pane, "WWW-Auth...")
1222
+ @www_auth_menu.connect(SEL_COMMAND) { openWwwAuthDialog() }
1263
1223
 
1264
- @client_cert_menu = FXMenuCommand.new(settings_menu_pane, "Client Certificates..." )
1224
+ @client_cert_menu = FXMenuCommand.new(settings_menu_pane, "Client Certificates...")
1265
1225
  @client_cert_menu.connect(SEL_COMMAND) { open_client_cert_dialog() }
1266
1226
 
1267
- # pp_prefs = FXMenuCommand.new(settings_menu_pane, "Password Policy..." )
1268
- # pp_prefs.connect(SEL_COMMAND) { openPWPolicyDialog() }
1227
+ # pp_prefs = FXMenuCommand.new(settings_menu_pane, "Password Policy..." )
1228
+ # pp_prefs.connect(SEL_COMMAND) { openPWPolicyDialog() }
1269
1229
  # intercept_enable = FXMenuCheck.new(settings_menu_pane, "Enable Interception")
1270
1230
 
1271
1231
  # file_menu_title = FXMenuTitle.new(menu_bar, "Settings" , :popupMenu => settings_menu_pane)
@@ -1274,18 +1234,18 @@ module Watobo#:nodoc: all
1274
1234
  @session_mgmt_menu.connect(SEL_COMMAND, method(:openSessionManagement))
1275
1235
 
1276
1236
  tools_menu_pane = FXMenuPane.new(self)
1277
- FXMenuTitle.new(menu_bar, "Tools" , :popupMenu => tools_menu_pane)
1237
+ FXMenuTitle.new(menu_bar, "Tools", :popupMenu => tools_menu_pane)
1278
1238
  @transcoder_menu = FXMenuCommand.new(tools_menu_pane, "Transcoder")
1279
1239
  @interceptor_menu = FXMenuCommand.new(tools_menu_pane, "Interceptor")
1280
-
1240
+
1281
1241
  @transcoder_menu.connect(SEL_COMMAND, method(:onOpenTranscoder))
1282
1242
  @interceptor_menu.connect(SEL_COMMAND, method(:onOpenInterceptor))
1283
1243
 
1284
1244
  view_menu_pane = FXMenuPane.new(self)
1285
-
1286
- FXMenuTitle.new(menu_bar, "View" , :popupMenu => view_menu_pane)
1287
- view_logs_command = FXMenuCommand.new(view_menu_pane, "Logs" )
1288
- view_dashboard_command = FXMenuCommand.new(view_menu_pane, "Dashboard" )
1245
+
1246
+ FXMenuTitle.new(menu_bar, "View", :popupMenu => view_menu_pane)
1247
+ view_logs_command = FXMenuCommand.new(view_menu_pane, "Logs")
1248
+ view_dashboard_command = FXMenuCommand.new(view_menu_pane, "Dashboard")
1289
1249
  view_findings_command = FXMenuCommand.new(view_menu_pane, "Chat-Table")
1290
1250
 
1291
1251
  view_dashboard_command.connect(SEL_COMMAND, method(:showDashboard))
@@ -1293,23 +1253,23 @@ module Watobo#:nodoc: all
1293
1253
  view_findings_command.connect(SEL_COMMAND, method(:showConversation))
1294
1254
 
1295
1255
  window_menu_pane = FXMenuPane.new(self)
1296
-
1297
- FXMenuTitle.new(menu_bar, "Window" , :popupMenu => window_menu_pane)
1298
- use_small_icons = FXMenuCheck.new(window_menu_pane, "Small Icons/Text" )
1256
+
1257
+ FXMenuTitle.new(menu_bar, "Window", :popupMenu => window_menu_pane)
1258
+ use_small_icons = FXMenuCheck.new(window_menu_pane, "Small Icons/Text")
1299
1259
  use_small_icons.connect(SEL_COMMAND) {
1300
1260
  if use_small_icons.checked?
1301
- useSmallIcons()
1261
+ useSmallIcons()
1302
1262
  else
1303
- useRegularIcons()
1263
+ useRegularIcons()
1304
1264
  end
1305
1265
  }
1306
1266
 
1307
1267
  help_menu_pane = FXMenuPane.new(self)
1308
- FXMenuTitle.new(menu_bar, "Help" , :popupMenu => help_menu_pane)
1268
+ FXMenuTitle.new(menu_bar, "Help", :popupMenu => help_menu_pane)
1309
1269
  # menu_lic = FXMenuCommand.new(help_menu_pane, "License" )
1310
- menu_about = FXMenuCommand.new(help_menu_pane, "About" )
1270
+ menu_about = FXMenuCommand.new(help_menu_pane, "About")
1311
1271
  menu_about.connect(SEL_COMMAND) {
1312
- #FXMessageBox.information(self,MBOX_OK,"About", "WATOBO Version 0.9.1!")
1272
+ #FXMessageBox.information(self,MBOX_OK,"About", "WATOBO Version 0.9.1!")
1313
1273
  aboutDlg = AboutWatobo.new(self)
1314
1274
  aboutDlg.create
1315
1275
  aboutDlg.show(Fox::PLACEMENT_SCREEN)
@@ -1324,10 +1284,10 @@ module Watobo#:nodoc: all
1324
1284
  # FXToolBarGrip.new(project_bar, :opts => TOOLBARGRIP_SINGLE)
1325
1285
  top_bar = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X|FRAME_SUNKEN, :padding => 0)
1326
1286
  project_bar = FXHorizontalFrame.new(top_bar, :opts => LAYOUT_FILL_X|PACK_UNIFORM_WIDTH|FRAME_NONE, :padding => 2)
1327
- @new_project_button = FXButton.new(project_bar, "\tNew Project\tNew Project." , :icon => ICON_ADD_PROJECT, :padding => 0)
1287
+ @new_project_button = FXButton.new(project_bar, "\tNew Project\tNew Project.", :icon => ICON_ADD_PROJECT, :padding => 0)
1328
1288
  @new_project_button.connect(SEL_COMMAND, method(:onNewProject))
1329
1289
 
1330
- @scan_button = FXButton.new(project_bar, "\tStart Scan\tStart Scan." ,:opts => FRAME_RAISED|FRAME_THICK, :icon => ICON_START, :padding => 0)
1290
+ @scan_button = FXButton.new(project_bar, "\tStart Scan\tStart Scan.", :opts => FRAME_RAISED|FRAME_THICK, :icon => ICON_START, :padding => 0)
1331
1291
  @scan_button.disable
1332
1292
  # @start_scan_button.tipText = "Start Scan"
1333
1293
  @scan_button.connect(SEL_COMMAND, method(:startFullScan))
@@ -1382,45 +1342,45 @@ module Watobo#:nodoc: all
1382
1342
  frame = FXVerticalFrame.new(tab_frame, :opts => LAYOUT_FILL_Y|LAYOUT_FILL_X|FRAME_SUNKEN, :padding => 0)
1383
1343
  @sites_tree = Watobo::Gui::SitesTree.new(frame, self, nil)
1384
1344
 
1385
- @treeTabbook.connect(SEL_COMMAND) { |sender, sel, item|
1386
- case item
1387
- when 0
1388
- # @chatTable.apply_filter @conversation_table_ctrl.filter_settings
1389
- begin
1390
- getApp().beginWaitCursor()
1391
- update_conversation_table()
1392
- ensure
1393
- getApp().endWaitCursor()
1394
- end
1395
- # if @project
1396
- # @project.settings.delete(:site_filter)
1397
- # updateRequestTable(@project)
1398
- #end
1399
- end
1400
- }
1401
-
1345
+ @treeTabbook.connect(SEL_COMMAND) { |sender, sel, item|
1346
+ case item
1347
+ when 0
1348
+ # @chatTable.apply_filter @conversation_table_ctrl.filter_settings
1349
+ begin
1350
+ getApp().beginWaitCursor()
1351
+ update_conversation_table()
1352
+ ensure
1353
+ getApp().endWaitCursor()
1354
+ end
1355
+ # if @project
1356
+ # @project.settings.delete(:site_filter)
1357
+ # updateRequestTable(@project)
1358
+ #end
1359
+ end
1360
+ }
1361
+
1402
1362
  subscribeFindingsTree()
1403
1363
  subscribeSitesTree()
1404
-
1364
+
1405
1365
  # S W I T C H E R
1406
- @switcher = FXSwitcher.new(splitter,LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
1366
+ @switcher = FXSwitcher.new(splitter, LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
1407
1367
 
1408
1368
  # R E Q U E S T I N F O
1409
1369
  requestInfo = FXVerticalFrame.new(@switcher, :opts => LAYOUT_FILL_X|LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
1410
1370
  request_splitter = FXSplitter.new(requestInfo, :opts => LAYOUT_SIDE_TOP|SPLITTER_HORIZONTAL|LAYOUT_FILL_Y|LAYOUT_FILL_X|SPLITTER_TRACKING|SPLITTER_REVERSED)
1411
- #request_splitter.connect(SEL_COMMAND){
1412
- #puts "Request Splitter Resized!"
1413
- #}
1371
+ #request_splitter.connect(SEL_COMMAND){
1372
+ #puts "Request Splitter Resized!"
1373
+ #}
1414
1374
 
1415
1375
  # C H A T T A B L E C O N T R O L L E R
1416
- # @conversation_table_ctrl = ConversationTableCtrl.new(request_splitter, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN)
1417
- @conversation_table_ctrl = ConversationTableCtrl2.new(request_splitter, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN)
1376
+ # @conversation_table_ctrl = ConversationTableCtrl.new(request_splitter, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN)
1377
+ @conversation_table_ctrl = ConversationTableCtrl2.new(request_splitter, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN)
1418
1378
 
1419
1379
  # C H A T T A B L E
1420
- @chatTable = ConversationTable.new(@conversation_table_ctrl )
1380
+ @chatTable = ConversationTable.new(@conversation_table_ctrl)
1421
1381
  @conversation_table_ctrl.table = @chatTable
1422
1382
 
1423
- @chatTable.autoscroll = true
1383
+ @chatTable.autoscroll = true
1424
1384
  =begin
1425
1385
  @chatTable.connect(SEL_COMMAND) do |sender, sel, item|
1426
1386
  @findings_tree.killSelection()
@@ -1428,14 +1388,14 @@ module Watobo#:nodoc: all
1428
1388
  onTableClick(sender,sel,item)
1429
1389
  end
1430
1390
  =end
1431
- @chatTable.subscribe(:chat_selected){ |chat|
1432
- chat_selected(chat) unless chat.nil?
1433
- }
1434
-
1435
- @chatTable.subscribe(:chat_doubleclicked){ |chat|
1391
+ @chatTable.subscribe(:chat_selected) { |chat|
1392
+ chat_selected(chat) unless chat.nil?
1393
+ }
1394
+
1395
+ @chatTable.subscribe(:chat_doubleclicked) { |chat|
1436
1396
  open_manual_request_editor(chat)
1437
- }
1438
-
1397
+ }
1398
+
1439
1399
  =begin
1440
1400
  @chatTable.connect(SEL_DOUBLECLICKED) do |sender, sel, data|
1441
1401
  @findings_tree.killSelection()
@@ -1449,7 +1409,7 @@ module Watobo#:nodoc: all
1449
1409
  end
1450
1410
  end
1451
1411
  =end
1452
-
1412
+
1453
1413
  =begin
1454
1414
  @chatTable.connect(SEL_CHANGED){ |sender, sel, item|
1455
1415
  #puts item.row
@@ -1478,33 +1438,33 @@ module Watobo#:nodoc: all
1478
1438
 
1479
1439
  }
1480
1440
  =end
1481
- @chatTable.subscribe(:edit_comment){|chat|
1482
- puts "#{self} EDIT COMMENT"
1483
- dlg = Watobo::Gui::EditCommentDialog.new(self, chat)
1484
- if dlg.execute != 0 then
1485
- chat.comment = dlg.comment
1486
- @chatTable.updateComment(@chatTable.currentRow, dlg.comment)
1487
- Watobo::Utils.saveChat(chat, chat.file)
1488
- end
1489
-
1490
- }
1491
-
1492
- @chatTable.subscribe(:open_filter_dlg){|chat|
1493
- puts "#{self} Open Filter Dialog"
1494
- dlg = Watobo::Gui::ConversationFilterDialog.new(self, @conversation_table_ctrl.filter)
1441
+ @chatTable.subscribe(:edit_comment) { |chat|
1442
+ puts "#{self} EDIT COMMENT"
1443
+ dlg = Watobo::Gui::EditCommentDialog.new(self, chat)
1444
+ if dlg.execute != 0 then
1445
+ chat.comment = dlg.comment
1446
+ @chatTable.updateComment(@chatTable.currentRow, dlg.comment)
1447
+ Watobo::Utils.saveChat(chat, chat.file)
1448
+ end
1449
+
1450
+ }
1451
+
1452
+ @chatTable.subscribe(:open_filter_dlg) { |chat|
1453
+ puts "#{self} Open Filter Dialog"
1454
+ dlg = Watobo::Gui::ConversationFilterDialog.new(self, @conversation_table_ctrl.filter)
1495
1455
  if dlg.execute != 0
1496
1456
  #puts dlg.filter_settings.to_yaml
1497
1457
  filter = dlg.filter_settings
1498
-
1458
+
1499
1459
  unless @chatTable.nil?
1500
1460
  getApp().beginWaitCursor do
1501
- @chatTable.apply_filter(filter)
1461
+ @chatTable.apply_filter(filter)
1502
1462
  end
1503
1463
  end
1504
-
1464
+
1505
1465
  end
1506
-
1507
- }
1466
+
1467
+ }
1508
1468
 
1509
1469
  @chatTable.connect(SEL_RIGHTBUTTONRELEASE) do |sender, sel, event|
1510
1470
  @findings_tree.killSelection()
@@ -1524,22 +1484,22 @@ module Watobo#:nodoc: all
1524
1484
 
1525
1485
  FXMenuPane.new(self) do |menu_pane|
1526
1486
 
1527
- # SEND TO SUBMENU
1487
+ # SEND TO SUBMENU
1528
1488
  submenu = FXMenuPane.new(self) do |sendto_menu|
1529
1489
 
1530
- target = FXMenuCommand.new(sendto_menu, "Fuzzer..." )
1490
+ target = FXMenuCommand.new(sendto_menu, "Fuzzer...")
1531
1491
  target.connect(SEL_COMMAND) {
1532
1492
  openFuzzer(chat)
1533
1493
  }
1534
- target = FXMenuCommand.new(sendto_menu, "Manual Request..." )
1494
+ target = FXMenuCommand.new(sendto_menu, "Manual Request...")
1535
1495
  target.connect(SEL_COMMAND) {
1536
1496
  open_manual_request_editor(chat)
1537
1497
  }
1538
- target = FXMenuCommand.new(sendto_menu, "SQLmap..." )
1498
+ target = FXMenuCommand.new(sendto_menu, "SQLmap...")
1539
1499
  target.connect(SEL_COMMAND) {
1540
1500
  open_plugin_sqlmap(chat)
1541
1501
  }
1542
- target = FXMenuCommand.new(sendto_menu, "Crawler..." )
1502
+ target = FXMenuCommand.new(sendto_menu, "Crawler...")
1543
1503
  target.connect(SEL_COMMAND) {
1544
1504
  open_plugin_crawler(chat)
1545
1505
  }
@@ -1551,22 +1511,22 @@ module Watobo#:nodoc: all
1551
1511
  exclude_submenu = FXMenuPane.new(self) do |sub|
1552
1512
  chat = Watobo::Chats.get_by_id(chatid)
1553
1513
 
1554
- target = FXMenuCheck.new(sub, "Chat (#{chatid})" )
1514
+ target = FXMenuCheck.new(sub, "Chat (#{chatid})")
1555
1515
 
1556
1516
  target.check = @project.scan_settings[:excluded_chats].include?(chatid) ? true : false
1557
1517
 
1558
1518
  target.connect(SEL_COMMAND) {
1559
1519
  if target.checked?()
1560
- @project.scan_settings[:excluded_chats].push chatid
1520
+ @project.scan_settings[:excluded_chats].push chatid
1561
1521
  else
1562
- @project.scan_settings[:excluded_chats].delete(chatid)
1522
+ @project.scan_settings[:excluded_chats].delete(chatid)
1563
1523
  end
1564
1524
 
1565
1525
  }
1566
- # target = FXMenuCommand.new(sub, "Path" )
1567
- # target.connect(SEL_COMMAND) {
1568
- # ...
1569
- # }
1526
+ # target = FXMenuCommand.new(sub, "Path" )
1527
+ # target.connect(SEL_COMMAND) {
1528
+ # ...
1529
+ # }
1570
1530
 
1571
1531
  end
1572
1532
  FXMenuCascade.new(menu_pane, "Exclude from Scan", nil, exclude_submenu)
@@ -1576,53 +1536,53 @@ module Watobo#:nodoc: all
1576
1536
  chat = Watobo::Chats.get_by_id(chatid)
1577
1537
  url = chat.request.url.to_s
1578
1538
  # puts url
1579
- url_string = "URL: #{url.slice(0,35)}"
1539
+ url_string = "URL: #{url.slice(0, 35)}"
1580
1540
  url_string += "..." if url.length > 36
1581
1541
 
1582
- target = FXMenuCommand.new(sub, url_string )
1542
+ target = FXMenuCommand.new(sub, url_string)
1583
1543
  target.connect(SEL_COMMAND) {
1584
- types = [ FXWindow.stringType ]
1544
+ types = [FXWindow.stringType]
1585
1545
  if acquireClipboard(types)
1586
- puts
1587
- @clipboard_text = url
1546
+ puts
1547
+ @clipboard_text = url
1588
1548
  end
1589
1549
 
1590
1550
  }
1591
- target = FXMenuCommand.new(sub, "Site: #{chat.request.site}" )
1551
+ target = FXMenuCommand.new(sub, "Site: #{chat.request.site}")
1592
1552
  target.connect(SEL_COMMAND) {
1593
1553
  site = Watobo::Chats.get_by_id(chatid).request.site
1594
1554
 
1595
- types = [ FXWindow.stringType ]
1555
+ types = [FXWindow.stringType]
1596
1556
  if acquireClipboard(types)
1597
- @clipboard_text = site
1557
+ @clipboard_text = site
1598
1558
  end
1599
1559
  }
1600
1560
 
1601
1561
  end
1602
1562
  FXMenuCascade.new(menu_pane, "Copy", nil, copy_submenu)
1603
1563
 
1604
- addToLogin = FXMenuCommand.new(menu_pane, "Add to Login-Script" )
1564
+ addToLogin = FXMenuCommand.new(menu_pane, "Add to Login-Script")
1605
1565
  addToLogin.connect(SEL_COMMAND) {
1606
1566
  @project.add_login_chat_id(chatid)
1607
1567
  puts "Add to Login-Script ... saveSessionSettings (#{@project.class})"
1608
1568
  Watobo::Gui.save_settings()
1609
1569
  }
1610
1570
 
1611
- target = FXMenuCheck.new(menu_pane, "Tested" )
1571
+ target = FXMenuCheck.new(menu_pane, "Tested")
1612
1572
  target.check = chat.tested?
1613
1573
  target.connect(SEL_COMMAND) {
1614
1574
  chat.tested = target.checked?()
1615
1575
  Watobo::Utils.saveChat(chat, chat.file)
1616
1576
  }
1617
1577
 
1618
- FXMenuCommand.new(menu_pane, "Edit comment.." ).connect(SEL_COMMAND) {
1619
- # puts row
1578
+ FXMenuCommand.new(menu_pane, "Edit comment..").connect(SEL_COMMAND) {
1579
+ # puts row
1620
1580
 
1621
1581
  dlg = Watobo::Gui::EditCommentDialog.new(self, chat)
1622
1582
  if dlg.execute != 0 then
1623
- chat.comment = dlg.comment
1624
- @chatTable.updateComment(row, dlg.comment)
1625
- Watobo::Utils.saveChat(chat, chat.file)
1583
+ chat.comment = dlg.comment
1584
+ @chatTable.updateComment(row, dlg.comment)
1585
+ Watobo::Utils.saveChat(chat, chat.file)
1626
1586
  end
1627
1587
  }
1628
1588
  # copyRequest = FXMenuCommand.new(menu_pane, "copy Request(#{chatid})" )
@@ -1646,7 +1606,7 @@ module Watobo#:nodoc: all
1646
1606
  #===================================================================
1647
1607
  # CHAT VIEWER
1648
1608
  #===================================================================
1649
- chat_outer_frame = FXVerticalFrame.new(request_splitter, :opts => LAYOUT_FILL_Y|LAYOUT_FILL_X|FRAME_SUNKEN|LAYOUT_MIN_WIDTH, :padding => 0, :width=>400)
1609
+ chat_outer_frame = FXVerticalFrame.new(request_splitter, :opts => LAYOUT_FILL_Y|LAYOUT_FILL_X|FRAME_SUNKEN|LAYOUT_MIN_WIDTH, :padding => 0, :width => 400)
1650
1610
  chat_frame = chat_outer_frame
1651
1611
  # chat_frame = FXVerticalFrame.new(chat_outer_frame, :opts => LAYOUT_FILL_X|FRAME_SUNKEN, :padding => 0)
1652
1612
  #view_menu = FXVerticalFrame.new(chat_frame, :opts => LAYOUT_FILL_X, :padding => 0)
@@ -1674,10 +1634,10 @@ module Watobo#:nodoc: all
1674
1634
  @bv_button.connect(SEL_COMMAND) {
1675
1635
  begin
1676
1636
  if @lastViewed and @browserView then
1677
- openBrowser(@lastViewed.request, @lastViewed.response)
1637
+ openBrowser(@lastViewed.request, @lastViewed.response)
1678
1638
  end
1679
1639
  rescue => bang
1680
- puts bang
1640
+ puts bang
1681
1641
 
1682
1642
  end
1683
1643
  }
@@ -1685,32 +1645,32 @@ module Watobo#:nodoc: all
1685
1645
 
1686
1646
  # FXHorizontalSeparator.new(chat_frame, :opts => SEPARATOR_GROOVE|LAYOUT_FILL_X)
1687
1647
  # FXLabel.new(view_menu, "Source:")
1688
- @chat_frame_splitter = FXSplitter.new(chat_outer_frame, :opts => LAYOUT_SIDE_TOP|SPLITTER_VERTICAL|LAYOUT_FILL_Y|LAYOUT_FILL_X|SPLITTER_TRACKING)
1689
- chat_frame = FXVerticalFrame.new(@chat_frame_splitter, :opts => LAYOUT_FILL_X|FRAME_SUNKEN|LAYOUT_MIN_WIDTH|LAYOUT_MIN_HEIGHT, :padding => 0, :width=>400, :height => 400)
1648
+ @chat_frame_splitter = FXSplitter.new(chat_outer_frame, :opts => LAYOUT_SIDE_TOP|SPLITTER_VERTICAL|LAYOUT_FILL_Y|LAYOUT_FILL_X|SPLITTER_TRACKING)
1649
+ chat_frame = FXVerticalFrame.new(@chat_frame_splitter, :opts => LAYOUT_FILL_X|FRAME_SUNKEN|LAYOUT_MIN_WIDTH|LAYOUT_MIN_HEIGHT, :padding => 0, :width => 400, :height => 400)
1690
1650
  #chat_frame = FXVerticalFrame.new(chat_frame_splitter, :opts => LAYOUT_FILL_X|FRAME_SUNKEN|LAYOUT_MIN_WIDTH, :padding => 0, :width=>400)
1691
1651
  title_frame = FXHorizontalFrame.new(chat_frame, :opts => LAYOUT_FILL_X)
1692
- FXLabel.new(title_frame, "Request").setFont(FXFont.new(getApp(), "helvetica", 9, FONTWEIGHT_BOLD, FONTENCODING_DEFAULT))
1652
+ FXLabel.new(title_frame, "Request").setFont(FXFont.new(getApp(), "helvetica", 9, FONTWEIGHT_BOLD, FONTENCODING_DEFAULT))
1693
1653
 
1694
1654
  @request_viewer = Watobo::Gui::RequestViewer.new(chat_frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
1695
1655
  # @request_viewer = Watobo::Gui::ChatViewer.new(chat_frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
1696
1656
  # @request_viewer.highlight_style = 1
1697
-
1657
+
1698
1658
  #
1699
1659
  # SEL_CONFIGURE is fired when the window is resized
1700
1660
  #@request_viewer.connect(SEL_CONFIGURE){ |sender, sel, ptr|
1701
- @chat_frame_splitter.connect(SEL_COMMAND){
1702
- # puts sender.class
1703
- # puts sender.width
1704
- puts @request_viewer.height
1705
- }
1661
+ @chat_frame_splitter.connect(SEL_COMMAND) {
1662
+ # puts sender.class
1663
+ # puts sender.width
1664
+ puts @request_viewer.height
1665
+ }
1706
1666
 
1707
1667
  # FXHorizontalSeparator.new(chat_frame, :opts => SEPARATOR_GROOVE|LAYOUT_FILL_X)
1708
- chat_frame = FXVerticalFrame.new(@chat_frame_splitter, :opts => LAYOUT_FILL_X|FRAME_SUNKEN|LAYOUT_MIN_WIDTH, :padding => 0, :width=>400)
1668
+ chat_frame = FXVerticalFrame.new(@chat_frame_splitter, :opts => LAYOUT_FILL_X|FRAME_SUNKEN|LAYOUT_MIN_WIDTH, :padding => 0, :width => 400)
1709
1669
  title_frame = FXHorizontalFrame.new(chat_frame, :opts => LAYOUT_FILL_X)
1710
1670
  FXLabel.new(title_frame, "Response").setFont(FXFont.new(getApp(), "helvetica", 9, FONTWEIGHT_BOLD, FONTENCODING_DEFAULT))
1711
-
1671
+
1712
1672
  @save_response_btn = FXButton.new(title_frame, "Save", nil, nil, 0, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT)
1713
- @save_response_btn.connect(SEL_COMMAND){ save_response }
1673
+ @save_response_btn.connect(SEL_COMMAND) { save_response }
1714
1674
  #fxViewButton = FXButton.new(title_frame, "View", nil, nil, 0, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT)
1715
1675
  #fxViewButton.connect(SEL_COMMAND, method(:onViewResponse))
1716
1676
 
@@ -1723,9 +1683,9 @@ module Watobo#:nodoc: all
1723
1683
  #===================================================================
1724
1684
  #logFrame = FXVerticalFrame.new(@switcher, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN)
1725
1685
  #FXLabel.new(logFrame, "Eventlist:", :opts => LAYOUT_FILL_X)
1726
-
1727
- # @log_viewer = Watobo::Gui::LogViewer.new(logFrame, :opts => FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_X|LAYOUT_FILL_Y)
1728
- @log_viewer = Watobo::Gui::LogFileViewer.new(@switcher, :opts => FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_X|LAYOUT_FILL_Y)
1686
+
1687
+ # @log_viewer = Watobo::Gui::LogViewer.new(logFrame, :opts => FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_X|LAYOUT_FILL_Y)
1688
+ @log_viewer = Watobo::Gui::LogFileViewer.new(@switcher, :opts => FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_X|LAYOUT_FILL_Y)
1729
1689
 
1730
1690
  # DASHBOARD#
1731
1691
  @dashboard = Dashboard.new(@switcher)
@@ -1737,16 +1697,15 @@ module Watobo#:nodoc: all
1737
1697
  # PLUGIN-BOARD
1738
1698
  @pluginboard = PluginBoard.new(@switcher)
1739
1699
 
1740
- # if @foption_nopix.checked? then @doctype_TableFilter.concat(@fext_pix);end
1741
- # if @foption_nodocs.checked? then @doctype_TableFilter.concat(@fext_docs);end
1742
- # if @foption_nojs.checked? then @doctype_TableFilter.concat(@fext_javascript);end
1743
- # if @foption_nocss.checked? then @doctype_TableFilter.concat(@fext_style);end
1744
-
1700
+ # if @foption_nopix.checked? then @doctype_TableFilter.concat(@fext_pix);end
1701
+ # if @foption_nodocs.checked? then @doctype_TableFilter.concat(@fext_docs);end
1702
+ # if @foption_nojs.checked? then @doctype_TableFilter.concat(@fext_javascript);end
1703
+ # if @foption_nocss.checked? then @doctype_TableFilter.concat(@fext_style);end
1704
+
1745
1705
  add_queue_timer(250)
1746
1706
  #disable_menu
1747
1707
  update_menu
1748
-
1749
-
1708
+
1750
1709
 
1751
1710
  end
1752
1711
 
@@ -1755,8 +1714,9 @@ module Watobo#:nodoc: all
1755
1714
  # adjust splitters
1756
1715
  frame_height = (@chat_frame_splitter.getSplit(1) + @chat_frame_splitter.getSplit(0)) / 2
1757
1716
  @chat_frame_splitter.setSplit(0, frame_height)
1758
- @chat_frame_splitter.setSplit(1, frame_height )
1717
+ @chat_frame_splitter.setSplit(1, frame_height)
1759
1718
  end
1719
+
1760
1720
  # !!!
1761
1721
  # TODO: FXRUBY-Bug???
1762
1722
  # If splash screen is shown app will crash on close :(
@@ -1773,83 +1733,92 @@ module Watobo#:nodoc: all
1773
1733
 
1774
1734
  # end
1775
1735
  private
1776
-
1736
+
1777
1737
  def chat_selected(chat)
1778
1738
  begin
1779
1739
  getApp().beginWaitCursor()
1780
1740
  # purge viewers
1781
1741
  @request_viewer.setText('')
1782
1742
  @response_viewer.setText('')
1783
-
1784
- showChat(chat)
1785
-
1743
+
1744
+ showChat(chat)
1745
+
1786
1746
  rescue => bang
1787
1747
  puts "!!!ERROR: chat_selected"
1788
1748
  puts bang
1789
1749
  puts bang.backtrace
1790
1750
  puts "!!!"
1791
1751
  ensure
1792
- getApp().endWaitCursor()
1752
+ getApp().endWaitCursor()
1793
1753
  end
1794
1754
  end
1795
1755
 
1796
1756
  def save_response
1797
1757
  unless @last_chat.nil?
1798
- dlg = SaveChatDialog.new(self, @last_chat)
1799
- if dlg.execute != 0
1800
- FXMessageBox.information(self,MBOX_OK,"Response Saved", "The response has been saved to #{dlg.filename}!")
1801
-
1802
- end
1758
+ dlg = SaveChatDialog.new(self, @last_chat)
1759
+ if dlg.execute != 0
1760
+ FXMessageBox.information(self, MBOX_OK, "Response Saved", "The response has been saved to #{dlg.filename}!")
1761
+
1762
+ end
1803
1763
  else
1804
1764
  puts "NO CHAT SELECTED!"
1805
1765
  end
1806
1766
  end
1807
-
1767
+
1808
1768
  def subscribeProject()
1809
- Watobo::Chats.subscribe(:new){ |c|
1769
+ Watobo::Chats.subscribe(:new) { |c|
1810
1770
  # Thread.new { addChat(c)}
1811
- # puts "Got New Chat (#{c.id})"
1812
- @chat_lock.synchronize do
1813
- @chat_queue << c
1814
- end
1771
+ # puts "Got New Chat (#{c.id})"
1772
+ #@chat_lock.synchronize do
1773
+ # @chat_queue << c
1774
+ #end
1775
+
1776
+ FXApp.instance.addChore do
1777
+ addChat(c)
1778
+ end
1779
+
1815
1780
  }
1816
-
1817
- Watobo::Findings.subscribe(:new){ |f|
1818
- # Thread.new { addFinding(f) }
1819
- @finding_lock.synchronize do
1820
- @finding_queue << f
1821
- end
1781
+
1782
+ Watobo::Findings.subscribe(:new) { |f|
1783
+
1784
+
1785
+ FXApp.instance.addChore do
1786
+ addFinding(f)
1787
+ end
1788
+
1822
1789
  }
1823
1790
 
1824
-
1791
+
1825
1792
  end
1826
1793
 
1827
1794
  def subscribeSitesTree()
1828
- @sites_tree.subscribe(:add_site_to_scope){ |site|
1795
+ @sites_tree.subscribe(:add_site_to_scope) { |site|
1829
1796
  Watobo::Scope.add(site)
1830
1797
  Watobo::Gui.save_settings()
1831
1798
  }
1832
1799
 
1833
- @sites_tree.subscribe(:show_conversation){ |chat_list|
1800
+ @sites_tree.subscribe(:show_conversation) { |chat_list|
1834
1801
  showConversation()
1835
1802
  @chatTable.showConversation(chat_list, :ignore_filter)
1836
1803
  @conversation_table_ctrl.text = "Selected Chats (#{chat_list.length}/#{Watobo::Chats.length})"
1837
1804
  }
1838
1805
 
1839
- @sites_tree.subscribe(:show_chat){ |chat|
1806
+ @sites_tree.subscribe(:show_chat) { |chat|
1840
1807
  showChat(chat)
1841
1808
  }
1842
-
1843
- @sites_tree.subscribe(:vuln_click){ |v| showVulnerability(v) }
1809
+
1810
+ @sites_tree.subscribe(:vuln_click) { |v|
1811
+ showVulnerability(v)
1812
+ }
1844
1813
  end
1845
1814
 
1846
1815
  def subscribeFindingsTree()
1847
- @findings_tree.subscribe(:add_site_to_scope){ |site|
1816
+ @findings_tree.subscribe(:add_site_to_scope) { |site|
1848
1817
  Watobo::Scope.add(site)
1849
1818
  Watobo::Gui.save_settings()
1850
1819
  }
1851
1820
 
1852
- @findings_tree.subscribe(:delete_domain_filter){ |df|
1821
+ @findings_tree.subscribe(:delete_domain_filter) { |df|
1853
1822
  @project.settings[:domain_filters].delete(df)
1854
1823
  # puts "Delete Domain-Filter #{df}"
1855
1824
  updateTreeLists()
@@ -1860,19 +1829,19 @@ module Watobo#:nodoc: all
1860
1829
  updateTreeLists()
1861
1830
  }
1862
1831
 
1863
- @findings_tree.subscribe(:vuln_click){ |v| showVulnerability(v) }
1832
+ @findings_tree.subscribe(:vuln_click) { |v| showVulnerability(v) }
1833
+
1834
+ @findings_tree.subscribe(:finding_click) { |v| showFindingDetails(v) }
1835
+
1836
+ @findings_tree.subscribe(:show_finding_details) { |v| showFindingDetails(v) }
1837
+
1838
+ @findings_tree.subscribe(:open_manual_request) { |v| open_manual_request_editor(v) }
1864
1839
 
1865
- @findings_tree.subscribe(:finding_click){ |v| showFindingDetails(v) }
1840
+ @findings_tree.subscribe(:purge_findings) { |f| purge_findings(f) }
1866
1841
 
1867
- @findings_tree.subscribe(:show_finding_details){ |v| showFindingDetails(v) }
1842
+ @findings_tree.subscribe(:set_false_positive) { |f| set_false_positive(f) }
1868
1843
 
1869
- @findings_tree.subscribe(:open_manual_request){ |v| open_manual_request_editor(v) }
1870
-
1871
- @findings_tree.subscribe(:purge_findings){ |f| purge_findings(f) }
1872
-
1873
- @findings_tree.subscribe(:set_false_positive){ |f| set_false_positive(f) }
1874
-
1875
- @findings_tree.subscribe(:unset_false_positive){ |f| unset_false_positive(f) }
1844
+ @findings_tree.subscribe(:unset_false_positive) { |f| unset_false_positive(f) }
1876
1845
 
1877
1846
  end
1878
1847
 
@@ -1884,7 +1853,7 @@ module Watobo#:nodoc: all
1884
1853
  # puts "Num. Threads: #{Thread.list.length}"
1885
1854
  getApp().exit(0)
1886
1855
  else
1887
- 1
1856
+ 1
1888
1857
  end
1889
1858
  end
1890
1859
 
@@ -1894,11 +1863,11 @@ module Watobo#:nodoc: all
1894
1863
  begin
1895
1864
  settings = Hash.new
1896
1865
  settings = Watobo::Utils.load_settings(filename)
1897
- # puts settings.to_yaml
1866
+ # puts settings.to_yaml
1898
1867
  rescue => bang
1899
- puts "!!!ERROR: could not update project settings"
1900
- puts bang
1901
- return false
1868
+ puts "!!!ERROR: could not update project settings"
1869
+ puts bang
1870
+ return false
1902
1871
  end
1903
1872
  end
1904
1873
  return settings
@@ -1911,41 +1880,41 @@ module Watobo#:nodoc: all
1911
1880
  begin
1912
1881
  settings = Watobo::Utils.load_settings(filename)
1913
1882
  rescue => bang
1914
- puts "!!!ERROR: could not load session settings"
1915
- puts bang
1916
- return false
1883
+ puts "!!!ERROR: could not load session settings"
1884
+ puts bang
1885
+ return false
1917
1886
  end
1918
1887
  else
1919
- puts "! SessionSettings file #{filename} does not exist!"
1888
+ puts "! SessionSettings file #{filename} does not exist!"
1920
1889
  end
1921
1890
  return settings
1922
1891
  end
1923
-
1924
- def onExport(sender,sel, item)
1925
- ccdlg = Watobo::Gui::ExportDialog.new(self)
1926
- if ccdlg.execute != 0
1927
-
1928
- end
1929
-
1892
+
1893
+ def onExport(sender, sel, item)
1894
+ ccdlg = Watobo::Gui::ExportDialog.new(self)
1895
+ if ccdlg.execute != 0
1896
+
1897
+ end
1898
+
1930
1899
  end
1931
1900
 
1932
1901
  def onExit(sender, sel, item)
1933
1902
  response = FXMessageBox.question(self, MBOX_YES_NO, "Finished?", "Are you sure?")
1934
1903
  if response == MBOX_CLICKED_YES
1935
- getApp().exit(0)
1904
+ getApp().exit(0)
1936
1905
  end
1937
1906
  end
1938
1907
 
1939
- # def onApplyFilterClick(sender,sel,item)
1940
- # applyFilter()
1941
- # end
1908
+ # def onApplyFilterClick(sender,sel,item)
1909
+ # applyFilter()
1910
+ # end
1942
1911
 
1943
1912
  def onClear(sender, sel, item)
1944
1913
  @table_filter.value =""
1945
1914
  @tableFilterFX.handle(self, FXSEL(SEL_UPDATE, 0), nil)
1946
1915
  end
1947
1916
 
1948
- def onTableClick(sender,sel,item)
1917
+ def onTableClick(sender, sel, item)
1949
1918
  begin
1950
1919
  getApp().beginWaitCursor()
1951
1920
  # purge viewers
@@ -1958,75 +1927,75 @@ module Watobo#:nodoc: all
1958
1927
  # @logText.appendText("selected ID: (#{chatid})\n")
1959
1928
  chat = Watobo::Chats.get_by_id chatid
1960
1929
  showChat(chat) unless chat.nil?
1961
-
1930
+
1962
1931
  rescue => bang
1963
1932
  puts "!!!ERROR: onTableClick"
1964
1933
  puts bang
1965
1934
  puts "!!!"
1966
1935
  ensure
1967
- getApp().endWaitCursor()
1936
+ getApp().endWaitCursor()
1968
1937
  end
1969
1938
  end
1970
1939
 
1971
- def onMenuProxy(sender,sel,item)
1972
- proxy_dialog = Watobo::Gui::ProxyDialog.new(self)
1973
- if proxy_dialog.execute != 0 then
1940
+ def onMenuProxy(sender, sel, item)
1941
+ proxy_dialog = Watobo::Gui::ProxyDialog.new(self)
1942
+ if proxy_dialog.execute != 0 then
1974
1943
  proxy_prefs = proxy_dialog.getProxyPrefs
1975
1944
  Watobo::Conf::ForwardingProxy.set proxy_prefs
1976
- # Watobo::Gui.save_settings()
1977
- #Watobo::Conf::ForwardingProxy.save
1978
-
1979
- Watobo.save_proxy_settings
1945
+ # Watobo::Gui.save_settings()
1946
+ #Watobo::Conf::ForwardingProxy.save
1947
+
1948
+ Watobo.save_proxy_settings
1980
1949
  update_status_bar()
1981
- end
1982
-
1950
+ end
1951
+
1983
1952
  #FXMessageBox.information(self,MBOX_OK,"No Project Defined", "Create Project First")
1984
-
1953
+
1985
1954
  end
1986
-
1955
+
1987
1956
  def update_menu
1988
- [@client_cert_menu, @www_auth_menu, @target_scope_menu ].each do |m|
1989
- Watobo.project.nil? ? m.disable : m.enable
1957
+ [@client_cert_menu, @www_auth_menu, @target_scope_menu].each do |m|
1958
+ Watobo.project.nil? ? m.disable : m.enable
1990
1959
  end
1991
1960
  end
1992
-
1961
+
1993
1962
  def disable_menu_UNUSED
1994
- @menu_items.each do |e|
1995
- e.disable if e.respond_to? :disable
1996
- if e.respond_to? :each_child
1997
- e.each_child do |c|
1998
- c.disable if c.respond_to? :disable
1999
- end
2000
- end
2001
- end
2002
- end
2003
-
1963
+ @menu_items.each do |e|
1964
+ e.disable if e.respond_to? :disable
1965
+ if e.respond_to? :each_child
1966
+ e.each_child do |c|
1967
+ c.disable if c.respond_to? :disable
1968
+ end
1969
+ end
1970
+ end
1971
+ end
1972
+
2004
1973
  def enable_menu_UNUSED
2005
- @menu_items.each do |e|
2006
- e.enable if e.respond_to? :enable
2007
- if e.respond_to? :each_child
2008
- e.each_child do |c|
2009
- c.enable if c.respond_to? :enable
2010
- end
2011
- end
2012
- end
2013
-
2014
- end
2015
-
1974
+ @menu_items.each do |e|
1975
+ e.enable if e.respond_to? :enable
1976
+ if e.respond_to? :each_child
1977
+ e.each_child do |c|
1978
+ c.enable if c.respond_to? :enable
1979
+ end
1980
+ end
1981
+ end
1982
+
1983
+ end
1984
+
2016
1985
  def purge_findings(findings)
2017
1986
  findings.each do |f|
2018
1987
  Watobo::Findings.delete(f)
2019
1988
  end
2020
1989
  @findings_tree.reload
2021
1990
  end
2022
-
1991
+
2023
1992
  def set_false_positive(findings)
2024
1993
  findings.each do |f|
2025
1994
  Watobo::Findings.set_false_positive(f)
2026
1995
  end
2027
1996
  @findings_tree.reload
2028
1997
  end
2029
-
1998
+
2030
1999
  def unset_false_positive(findings)
2031
2000
  findings.each do |f|
2032
2001
  Watobo::Findings.unset_false_positive(f)