watobo 0.9.8.677

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. data/bin/watobo_gui.rb +39 -0
  2. data/certificates/cert.pem +19 -0
  3. data/certificates/privkey.pem +15 -0
  4. data/certificates/watobo_dh.key +5 -0
  5. data/config/datastore.yml +5 -0
  6. data/config/forwarding_proxy.yml +12 -0
  7. data/config/general.yml +4 -0
  8. data/config/gui.yml +23 -0
  9. data/config/interceptor.yml +16 -0
  10. data/config/scan_policy.yml +13 -0
  11. data/config/scanner.yml +34 -0
  12. data/icons/Add.ico +0 -0
  13. data/icons/Add_24x24.ico +0 -0
  14. data/icons/Bandwidth.ico +0 -0
  15. data/icons/Bandwidth_24x24.ico +0 -0
  16. data/icons/Mr. Bomb.ico +0 -0
  17. data/icons/Mr. Bomb_16x16.ico +0 -0
  18. data/icons/Mr. Bomb_24x24.ico +0 -0
  19. data/icons/Orange Ball.ico +0 -0
  20. data/icons/Orange Ball_16x16.ico +0 -0
  21. data/icons/Orange Ball_24x24.ico +0 -0
  22. data/icons/Pause.ico +0 -0
  23. data/icons/Play.ico +0 -0
  24. data/icons/Play_24x24.ico +0 -0
  25. data/icons/Red Ball.ico +0 -0
  26. data/icons/Red Ball_16x16.ico +0 -0
  27. data/icons/Red Ball_24x24.ico +0 -0
  28. data/icons/Run.ico +0 -0
  29. data/icons/Stop.ico +0 -0
  30. data/icons/Stop_24x24.ico +0 -0
  31. data/icons/Terminal.ico +0 -0
  32. data/icons/Transfer.ico +0 -0
  33. data/icons/Transfer_16x16.ico +0 -0
  34. data/icons/User.ico +0 -0
  35. data/icons/User_16x16.ico +0 -0
  36. data/icons/User_24x24.ico +0 -0
  37. data/icons/Web Browser.ico +0 -0
  38. data/icons/Web Browser_16x16.ico +0 -0
  39. data/icons/Write Document.ico +0 -0
  40. data/icons/Yellow Ball.ico +0 -0
  41. data/icons/Yellow Ball_16x16.ico +0 -0
  42. data/icons/Yellow Ball_24x24.ico +0 -0
  43. data/icons/advanced.ico +0 -0
  44. data/icons/advanced_16x16.ico +0 -0
  45. data/icons/advanced_24x24.ico +0 -0
  46. data/icons/applications.ico +0 -0
  47. data/icons/applications_16x16.ico +0 -0
  48. data/icons/applications_24x24.ico +0 -0
  49. data/icons/browser_16x16.ico +0 -0
  50. data/icons/browser_24x24.ico +0 -0
  51. data/icons/burn.ico +0 -0
  52. data/icons/burn_16x16.ico +0 -0
  53. data/icons/burn_24x24.ico +0 -0
  54. data/icons/calculator.ico +0 -0
  55. data/icons/calculator_24x24.ico +0 -0
  56. data/icons/cb_checked.ico +0 -0
  57. data/icons/cb_checked_orange.ico +0 -0
  58. data/icons/cb_unchecked.ico +0 -0
  59. data/icons/coin_24x24.ico +0 -0
  60. data/icons/conversation.ico +0 -0
  61. data/icons/conversation_24x24.ico +0 -0
  62. data/icons/engine.ico +0 -0
  63. data/icons/filter.ico +0 -0
  64. data/icons/folder.ico +0 -0
  65. data/icons/folder_16x16.ico +0 -0
  66. data/icons/fuzzer_16x16.ico +0 -0
  67. data/icons/fuzzer_24x24.ico +0 -0
  68. data/icons/go-down_16x16.png +0 -0
  69. data/icons/go-up_16x16.png +0 -0
  70. data/icons/help.ico +0 -0
  71. data/icons/help_16x16.ico +0 -0
  72. data/icons/help_24x24.ico +0 -0
  73. data/icons/iChat.ico +0 -0
  74. data/icons/iChat_16x16.ico +0 -0
  75. data/icons/iChat_24x24.ico +0 -0
  76. data/icons/icons.txt +3 -0
  77. data/icons/info.ico +0 -0
  78. data/icons/info_16x16.ico +0 -0
  79. data/icons/info_24x24.ico +0 -0
  80. data/icons/interceptor_24x24.ico +0 -0
  81. data/icons/lock.ico +0 -0
  82. data/icons/lock_12x12.ico +0 -0
  83. data/icons/lock_16x16.ico +0 -0
  84. data/icons/monitor.ico +0 -0
  85. data/icons/plugin.ico +0 -0
  86. data/icons/plugin_24x24.ico +0 -0
  87. data/icons/scan_16x16.png +0 -0
  88. data/icons/send.ico +0 -0
  89. data/icons/server.ico +0 -0
  90. data/icons/server_16x16.ico +0 -0
  91. data/icons/siberas_logo_x24.gif +0 -0
  92. data/icons/tag_blue_32x32.ico +0 -0
  93. data/icons/watobo-48x48.png +0 -0
  94. data/icons/watobo-logo.png +0 -0
  95. data/icons/watobo.ico +0 -0
  96. data/lib/watobo/adapters/data_store.rb +38 -0
  97. data/lib/watobo/adapters/file/file_store.rb +211 -0
  98. data/lib/watobo/adapters/session_store.rb +27 -0
  99. data/lib/watobo/adapters.rb +26 -0
  100. data/lib/watobo/config.rb +143 -0
  101. data/lib/watobo/constants.rb +92 -0
  102. data/lib/watobo/core/active_check.rb +404 -0
  103. data/lib/watobo/core/cookie.rb +69 -0
  104. data/lib/watobo/core/fuzz_gen.rb +160 -0
  105. data/lib/watobo/core/http_socket.rb +142 -0
  106. data/lib/watobo/core/interceptor.rb +729 -0
  107. data/lib/watobo/core/passive_check.rb +141 -0
  108. data/lib/watobo/core/project.rb +1058 -0
  109. data/lib/watobo/core/scanner.rb +396 -0
  110. data/lib/watobo/core/session.rb +1320 -0
  111. data/lib/watobo/core/simple_ca.rb +393 -0
  112. data/lib/watobo/core.rb +34 -0
  113. data/lib/watobo/defaults.rb +40 -0
  114. data/lib/watobo/external/diff/lcs/array.rb +42 -0
  115. data/lib/watobo/external/diff/lcs/block.rb +72 -0
  116. data/lib/watobo/external/diff/lcs/callbacks.rb +343 -0
  117. data/lib/watobo/external/diff/lcs/change.rb +190 -0
  118. data/lib/watobo/external/diff/lcs/hunk.rb +279 -0
  119. data/lib/watobo/external/diff/lcs/ldiff.rb +247 -0
  120. data/lib/watobo/external/diff/lcs/string.rb +40 -0
  121. data/lib/watobo/external/diff/lcs.rb +1124 -0
  122. data/lib/watobo/external/ntlm/ntlm.rb +797 -0
  123. data/lib/watobo/externals.rb +28 -0
  124. data/lib/watobo/framework/create_project.rb +55 -0
  125. data/lib/watobo/framework/init.rb +149 -0
  126. data/lib/watobo/framework/init_modules.rb +116 -0
  127. data/lib/watobo/framework/license_text.rb +50 -0
  128. data/lib/watobo/framework.rb +26 -0
  129. data/lib/watobo/gui/about_watobo.rb +68 -0
  130. data/lib/watobo/gui/browser_preview.rb +460 -0
  131. data/lib/watobo/gui/certificate_dialog.rb +132 -0
  132. data/lib/watobo/gui/chat_diff.rb +415 -0
  133. data/lib/watobo/gui/chatviewer_frame.rb +427 -0
  134. data/lib/watobo/gui/checkboxtree.rb +221 -0
  135. data/lib/watobo/gui/checks_policy_frame.rb +123 -0
  136. data/lib/watobo/gui/client_cert_dialog.rb +227 -0
  137. data/lib/watobo/gui/confirm_scan_dialog.rb +67 -0
  138. data/lib/watobo/gui/conversation_table.rb +386 -0
  139. data/lib/watobo/gui/conversation_table_ctrl.rb +175 -0
  140. data/lib/watobo/gui/csrf_token_dialog.rb +446 -0
  141. data/lib/watobo/gui/dashboard.rb +341 -0
  142. data/lib/watobo/gui/define_scope_frame.rb +380 -0
  143. data/lib/watobo/gui/edit_comment.rb +70 -0
  144. data/lib/watobo/gui/edit_scope_dialog.rb +69 -0
  145. data/lib/watobo/gui/finding_info.rb +212 -0
  146. data/lib/watobo/gui/findings_tree.rb +459 -0
  147. data/lib/watobo/gui/full_scan_dialog.rb +269 -0
  148. data/lib/watobo/gui/fuzzer_gui.rb +1522 -0
  149. data/lib/watobo/gui/hex_viewer.rb +106 -0
  150. data/lib/watobo/gui/interceptor_gui.rb +994 -0
  151. data/lib/watobo/gui/interceptor_settings_dialog.rb +201 -0
  152. data/lib/watobo/gui/log_viewer.rb +97 -0
  153. data/lib/watobo/gui/login_wizzard.rb +301 -0
  154. data/lib/watobo/gui/main_window.rb +1815 -0
  155. data/lib/watobo/gui/manual_request_editor.rb +1105 -0
  156. data/lib/watobo/gui/master_pw_dialog.rb +142 -0
  157. data/lib/watobo/gui/password_policy_dialog.rb +98 -0
  158. data/lib/watobo/gui/plugin/base.rb +82 -0
  159. data/lib/watobo/gui/plugin_board.rb +95 -0
  160. data/lib/watobo/gui/preferences_dialog.rb +116 -0
  161. data/lib/watobo/gui/progress_window.rb +102 -0
  162. data/lib/watobo/gui/project_wizzard.rb +369 -0
  163. data/lib/watobo/gui/proxy_dialog.rb +550 -0
  164. data/lib/watobo/gui/quick_scan_dialog.rb +242 -0
  165. data/lib/watobo/gui/request_editor.rb +480 -0
  166. data/lib/watobo/gui/save_chat_dialog.rb +158 -0
  167. data/lib/watobo/gui/scanner_settings_dialog.rb +360 -0
  168. data/lib/watobo/gui/select_chat_dialog.rb +169 -0
  169. data/lib/watobo/gui/session_management_dialog.rb +688 -0
  170. data/lib/watobo/gui/sites_tree.rb +347 -0
  171. data/lib/watobo/gui/status_bar.rb +88 -0
  172. data/lib/watobo/gui/table_editor.rb +445 -0
  173. data/lib/watobo/gui/tagless_viewer.rb +62 -0
  174. data/lib/watobo/gui/templates/plugin.rb +80 -0
  175. data/lib/watobo/gui/templates/plugin2.rb +103 -0
  176. data/lib/watobo/gui/text_viewer.rb +247 -0
  177. data/lib/watobo/gui/transcoder_window.rb +215 -0
  178. data/lib/watobo/gui/utils/gui_utils.rb +129 -0
  179. data/lib/watobo/gui/utils/init_icons.rb +106 -0
  180. data/lib/watobo/gui/utils/load_icons.rb +54 -0
  181. data/lib/watobo/gui/utils/load_plugins.rb +94 -0
  182. data/lib/watobo/gui/utils/master_password.rb +90 -0
  183. data/lib/watobo/gui/utils/save_default_settings.rb +99 -0
  184. data/lib/watobo/gui/utils/save_project_settings.rb +21 -0
  185. data/lib/watobo/gui/utils/save_proxy_settings.rb +45 -0
  186. data/lib/watobo/gui/utils/save_session_settings.rb +21 -0
  187. data/lib/watobo/gui/utils/session_history.rb +134 -0
  188. data/lib/watobo/gui/workspace_dialog.rb +89 -0
  189. data/lib/watobo/gui/www_auth_dialog.rb +348 -0
  190. data/lib/watobo/gui/xml_viewer_frame.rb +114 -0
  191. data/lib/watobo/gui.rb +139 -0
  192. data/lib/watobo/mixins/httpparser.rb +664 -0
  193. data/lib/watobo/mixins/request_parser.rb +210 -0
  194. data/lib/watobo/mixins/shapers.rb +345 -0
  195. data/lib/watobo/mixins/transcoders.rb +88 -0
  196. data/lib/watobo/mixins.rb +32 -0
  197. data/lib/watobo/utils/check_regex.rb +36 -0
  198. data/lib/watobo/utils/copy_object.rb +29 -0
  199. data/lib/watobo/utils/crypto.rb +74 -0
  200. data/lib/watobo/utils/expand_range.rb +45 -0
  201. data/lib/watobo/utils/file_management.rb +73 -0
  202. data/lib/watobo/utils/load_chat.rb +219 -0
  203. data/lib/watobo/utils/load_icon.rb +47 -0
  204. data/lib/watobo/utils/print_debug.rb +34 -0
  205. data/lib/watobo/utils/response_hash.rb +143 -0
  206. data/lib/watobo/utils/secure_eval.rb +57 -0
  207. data/lib/watobo/utils/text2request.rb +96 -0
  208. data/lib/watobo/utils.rb +32 -0
  209. data/lib/watobo.rb +76 -0
  210. data/modules/active/Apache/mod_status.rb +123 -0
  211. data/modules/active/Flash/crossdomain.rb +102 -0
  212. data/modules/active/directories/dirwalker.rb +89 -0
  213. data/modules/active/discovery/fileextensions.rb +151 -0
  214. data/modules/active/discovery/http_methods.rb +135 -0
  215. data/modules/active/domino/domino_db.lst +164 -0
  216. data/modules/active/domino/domino_db.rb +128 -0
  217. data/modules/active/fileinclusion/lfi_simple.rb +134 -0
  218. data/modules/active/jboss/jboss_basic.rb +119 -0
  219. data/modules/active/sap/business_objects.rb +73 -0
  220. data/modules/active/sap/its_commands.rb +101 -0
  221. data/modules/active/sap/its_service_parameter.rb +105 -0
  222. data/modules/active/sap/its_services.rb +103 -0
  223. data/modules/active/sap/its_xss.rb +98 -0
  224. data/modules/active/sqlinjection/sql_boolean.rb +262 -0
  225. data/modules/active/sqlinjection/sqli_simple.rb +205 -0
  226. data/modules/active/xss/xss_simple.rb +179 -0
  227. data/modules/passive/cookie_options.rb +97 -0
  228. data/modules/passive/cookie_xss.rb +85 -0
  229. data/modules/passive/detect_code.rb +89 -0
  230. data/modules/passive/detect_fileupload.rb +80 -0
  231. data/modules/passive/detect_infrastructure.rb +98 -0
  232. data/modules/passive/detect_one_time_tokens.rb +86 -0
  233. data/modules/passive/dirindexing.rb +81 -0
  234. data/modules/passive/disclosure_emails.rb +82 -0
  235. data/modules/passive/disclosure_ipaddr.rb +87 -0
  236. data/modules/passive/filename_as_parameter.rb +85 -0
  237. data/modules/passive/form_spotter.rb +75 -0
  238. data/modules/passive/hotspots.rb +86 -0
  239. data/modules/passive/in_script_parameter.rb +92 -0
  240. data/modules/passive/multiple_server_headers.rb +98 -0
  241. data/modules/passive/possible_login.rb +134 -0
  242. data/modules/passive/redirect_url.rb +88 -0
  243. data/modules/passive/redirectionz.rb +96 -0
  244. data/modules/passive/xss_dom.rb +91 -0
  245. data/plugins/catalog/catalog.ico +0 -0
  246. data/plugins/catalog/catalog.rb +726 -0
  247. data/plugins/catalog/db_tests +6483 -0
  248. data/plugins/catalog/db_variables +29 -0
  249. data/plugins/filefinder/dbs/hbci.db +12 -0
  250. data/plugins/filefinder/filefinder.rb +602 -0
  251. data/plugins/sslchecker/cli/sslchecker_cli.rb +21 -0
  252. data/plugins/sslchecker/gui/cipher_table.rb +260 -0
  253. data/plugins/sslchecker/gui/gui.rb +245 -0
  254. data/plugins/sslchecker/gui/sslchecker.rb +26 -0
  255. data/plugins/sslchecker/icons/green_16x16.ico +0 -0
  256. data/plugins/sslchecker/icons/grey_16x16.ico +0 -0
  257. data/plugins/sslchecker/icons/red_16x16.ico +0 -0
  258. data/plugins/sslchecker/icons/sslchecker.ico +0 -0
  259. data/plugins/sslchecker/lib/check.rb +117 -0
  260. metadata +317 -0
@@ -0,0 +1,142 @@
1
+ # .
2
+ # master_pw_dialog.rb
3
+ #
4
+ # Copyright 2012 by siberas, http://www.siberas.de
5
+ #
6
+ # This file is part of WATOBO (Web Application Tool Box)
7
+ # http://watobo.sourceforge.com
8
+ #
9
+ # WATOBO is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation version 2 of the License.
12
+ #
13
+ # WATOBO is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with WATOBO; if not, write to the Free Software
20
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
+ # .
22
+ module Watobo
23
+ module Gui
24
+ class MasterPWDialog < FXDialogBox
25
+
26
+ include Responder
27
+
28
+ attr :master_password
29
+ def masterPassword
30
+ @master_password
31
+ end
32
+
33
+ def initialize(owner, title="Set Master Password", new_opts = {})
34
+ @opts = {
35
+ :info => "Please provide a master password to encrypt your login credentials.\n\nIf you click 'cancel' your passwords will not be saved.",
36
+ :retype => true
37
+ }
38
+ @opts.update new_opts
39
+ super(owner, title, :opts => DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE, :width => 300, :height => 350)
40
+
41
+ FXMAPFUNC(SEL_COMMAND, ID_ACCEPT, :onAccept)
42
+
43
+ @master_password = nil
44
+ @pw_first_dt = FXDataTarget.new('')
45
+ @pw_second_dt = FXDataTarget.new('')
46
+ main = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
47
+
48
+ #info_frame = FXButton.new(main, info_text, :opts => LAYOUT_FILL_X|FRAME_NONE)
49
+ textbox = FXText.new(main, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
50
+ textbox.backColor = textbox.parent.backColor
51
+ textbox.editable = false
52
+ textbox.enabled = false
53
+ textbox.textStyle |= TEXT_WORDWRAP
54
+
55
+ textbox.setText @opts[:info]
56
+ top_frame = FXVerticalFrame.new(main, :opts => LAYOUT_FILL_X)
57
+
58
+ FXLabel.new(top_frame, "Password:", nil, LAYOUT_TOP|JUSTIFY_RIGHT)
59
+ @pw_first_txt = FXTextField.new(top_frame, 30,
60
+ :target => @pw_first_dt, :selector => FXDataTarget::ID_VALUE,
61
+ :opts => TEXTFIELD_NORMAL|LAYOUT_SIDE_RIGHT|TEXTFIELD_PASSWD)
62
+
63
+ if @opts[:retype]
64
+
65
+ FXLabel.new(top_frame, "Repeat:", nil, LAYOUT_TOP|JUSTIFY_RIGHT)
66
+ @pw_second_txt = FXTextField.new(top_frame, 30,
67
+ :target => @pw_second_dt, :selector => FXDataTarget::ID_VALUE,
68
+ :opts => TEXTFIELD_NORMAL|LAYOUT_SIDE_RIGHT|TEXTFIELD_PASSWD)
69
+
70
+ @pw_second_txt.connect(SEL_KEYRELEASE) {
71
+ @acceptBtn.disable
72
+ if @pw_first_txt.text == @pw_second_txt.text
73
+ @acceptBtn.enable
74
+ @acceptBtn.setFocus
75
+ @acceptBtn.setDefault
76
+ end
77
+ false
78
+ }
79
+ else
80
+
81
+ =begin
82
+ @pw_first_txt.connect(SEL_KEYRELEASE) {
83
+ @acceptBtn.disable
84
+
85
+ @acceptBtn.enable
86
+ @acceptBtn.setFocus
87
+ @acceptBtn.setDefault
88
+
89
+ false
90
+ }
91
+ =end
92
+ end
93
+
94
+ buttons = FXHorizontalFrame.new(main, :opts => LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH,
95
+ :padLeft => 40, :padRight => 40, :padTop => 20, :padBottom => 20)
96
+
97
+ # Accept
98
+ @acceptBtn = FXButton.new(buttons, "&Accept", nil, self, ID_ACCEPT,
99
+ FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
100
+ @acceptBtn.disable
101
+
102
+ unless @opts[:retype]
103
+ @acceptBtn.enable
104
+ @acceptBtn.setFocus
105
+ @acceptBtn.setDefault
106
+ end
107
+
108
+ FXButton.new(buttons, "&Cancel", nil, self, ID_CANCEL,
109
+ FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
110
+ # @hostname.handle(self, FXSEL(SEL_UPDATE, 0), nil)
111
+ # @domain.handle(self, FXSEL(SEL_UPDATE, 0), nil)
112
+ # @user.handle(self, FXSEL(SEL_UPDATE, 0), nil)
113
+ # @email.handle(self, FXSEL(SEL_UPDATE, 0), nil)
114
+
115
+ #@pw_first_txt.enable
116
+ @pw_first_txt.setFocus
117
+ @pw_first_txt.setDefault
118
+ end
119
+
120
+ private
121
+
122
+ def onAccept(sender, sel, event)
123
+ @master_password = nil
124
+ if @opts[:retype] == false or @pw_first_txt.text == @pw_second_txt.text then
125
+ @master_password = @pw_first_txt.text
126
+ # puts "* new MasterPassword #{@master_password}"
127
+ getApp().stopModal(self, 1)
128
+ self.hide()
129
+ return 1
130
+ else
131
+ FXMessageBox.information(self, MBOX_OK, "Wrong Passwords", "The passwords you've entered don't match!")
132
+ end
133
+
134
+ end
135
+ end
136
+
137
+ end
138
+ end
139
+
140
+ if __FILE__ == $0
141
+ # TODO Generated stub
142
+ end
@@ -0,0 +1,98 @@
1
+ # .
2
+ # password_policy_dialog.rb
3
+ #
4
+ # Copyright 2012 by siberas, http://www.siberas.de
5
+ #
6
+ # This file is part of WATOBO (Web Application Tool Box)
7
+ # http://watobo.sourceforge.com
8
+ #
9
+ # WATOBO is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation version 2 of the License.
12
+ #
13
+ # WATOBO is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with WATOBO; if not, write to the Free Software
20
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
+ # .
22
+ module Watobo
23
+ module Gui
24
+ class PasswordPolicyDialog < FXDialogBox
25
+
26
+ include Responder
27
+ def passwordPolicy
28
+ pp = {
29
+ :save_passwords => @save_pws_cbt.checked?,
30
+ :save_without_master => @save_without_cbt.checked?
31
+ }
32
+ end
33
+
34
+ def initialize(owner, password_policy = {} )
35
+ super(owner, "Password Policy", :opts => DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE, :width => 200, :height => 150)
36
+
37
+ @password_policy = {
38
+ :save_passwords => false,
39
+ :save_without_master => false
40
+ }
41
+ @password_policy.update password_policy if password_policy.is_a? Hash
42
+
43
+ FXMAPFUNC(SEL_COMMAND, ID_ACCEPT, :onAccept)
44
+
45
+ frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
46
+ @save_pws_cbt = FXCheckButton.new(frame, "save passwords")
47
+ @save_pws_cbt.checkState = false
48
+ @save_pws_cbt.checkState = true if @password_policy[:save_passwords] == true
49
+
50
+ @save_pws_cbt.connect(SEL_COMMAND) {
51
+ @save_without_cbt.enabled = @save_pws_cbt.checked?
52
+ }
53
+
54
+ @save_without_cbt = FXCheckButton.new(frame, "save without masterpassword")
55
+
56
+ @save_without_cbt.enabled = @save_pws_cbt.checked?
57
+
58
+ @save_without_cbt.checkState = false
59
+ @save_without_cbt.checkState = true if @password_policy[:save_without_master] == true
60
+
61
+ buttons = FXHorizontalFrame.new(frame, :opts => LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH,
62
+ :padLeft => 40, :padRight => 40, :padTop => 20, :padBottom => 20)
63
+
64
+ # Accept
65
+ @acceptBtn = FXButton.new(buttons, "&Accept", nil, self, ID_ACCEPT,
66
+ FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
67
+ @acceptBtn.enable
68
+
69
+ FXButton.new(buttons, "&Cancel", nil, self, ID_CANCEL,
70
+ FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
71
+ # @hostname.handle(self, FXSEL(SEL_UPDATE, 0), nil)
72
+ # @domain.handle(self, FXSEL(SEL_UPDATE, 0), nil)
73
+ # @user.handle(self, FXSEL(SEL_UPDATE, 0), nil)
74
+ # @email.handle(self, FXSEL(SEL_UPDATE, 0), nil)
75
+
76
+ end
77
+
78
+ private
79
+
80
+ def onAccept(sender, sel, event)
81
+
82
+ if true then
83
+ # puts "* new MasterPassword #{@master_password}"
84
+ getApp().stopModal(self, 1)
85
+ self.hide()
86
+ return 1
87
+ else
88
+ FXMessageBox.information(self, MBOX_OK, "Wrong Passwords", "The passwords you've entered don't match!")
89
+ end
90
+
91
+ end
92
+ end
93
+ end
94
+ end
95
+
96
+ if __FILE__ == $0
97
+ # TODO Generated stub
98
+ end
@@ -0,0 +1,82 @@
1
+ # .
2
+ # base.rb
3
+ #
4
+ # Copyright 2012 by siberas, http://www.siberas.de
5
+ #
6
+ # This file is part of WATOBO (Web Application Tool Box)
7
+ # http://watobo.sourceforge.com
8
+ #
9
+ # WATOBO is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation version 2 of the License.
12
+ #
13
+ # WATOBO is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with WATOBO; if not, write to the Free Software
20
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
+ # .
22
+ module Watobo
23
+ module Gui
24
+ module Plugin
25
+ class Plugin < FXDialogBox
26
+ attr :plugin_name
27
+ attr :icon
28
+
29
+ include Watobo::Gui
30
+ include Watobo::Gui::Icons
31
+ def subscribe(event, &callback)
32
+ (@event_dispatcher_listeners[event] ||= []) << callback
33
+ end
34
+
35
+ def clearEvents(event)
36
+ @event_dispatcher_listener[event].clear
37
+ end
38
+
39
+ def notify(event, *args)
40
+ if @event_dispatcher_listeners[event]
41
+ @event_dispatcher_listeners[event].each do |m|
42
+ m.call(*args) if m.respond_to? :call
43
+ end
44
+ end
45
+ end
46
+
47
+ def updateView()
48
+ raise "!!! updateView not defined"
49
+ end
50
+
51
+ def icon=(file=__FILE__)
52
+ begin
53
+ @icon = ICON_PLUGIN
54
+ path = File.dirname(file)
55
+ # puts "... searching for icons in #{path}"
56
+ file = Dir.glob("#{path}/*.ico").first
57
+
58
+ # puts "* load icon: #{file}"
59
+ @icon = Watobo::Gui.load_icon(file) unless file.nil?
60
+
61
+ self.icon = @icon
62
+ rescue => bang
63
+ puts "!!!Error: could not init icon"
64
+ puts bang
65
+ puts bang.backtrace if $DEBUG
66
+ end
67
+ end
68
+
69
+ def initialize(owner, title, project, opts)
70
+ super(owner, title, :opts => DECOR_ALL,:width=>800, :height=>600)
71
+ # Implement Sender
72
+ # Implement Scanner
73
+ @icon = nil
74
+ # load_icon()
75
+ @plugin_name = "undefined"
76
+ @event_dispatcher_listeners = Hash.new
77
+
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,95 @@
1
+ # .
2
+ # plugin_board.rb
3
+ #
4
+ # Copyright 2012 by siberas, http://www.siberas.de
5
+ #
6
+ # This file is part of WATOBO (Web Application Tool Box)
7
+ # http://watobo.sourceforge.com
8
+ #
9
+ # WATOBO is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation version 2 of the License.
12
+ #
13
+ # WATOBO is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with WATOBO; if not, write to the Free Software
20
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
+ # .
22
+ module Watobo
23
+ module Gui
24
+
25
+ class PluginBoard < FXVerticalFrame
26
+ include Watobo::Gui::Icons
27
+
28
+ def updateBoard()
29
+
30
+ return false unless Watobo::Gui.plugins.first.respond_to? :plugin_name
31
+ begin
32
+ @matrix.each_child do |child|
33
+ @matrix.removeChild(child)
34
+ end
35
+
36
+ Watobo::Gui.plugins.each do |p|
37
+ pbtn = FXButton.new( @matrix, "\n"+p.plugin_name, p.icon, nil, 0,
38
+ :opts => ICON_ABOVE_TEXT|FRAME_RAISED|FRAME_THICK|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT|LAYOUT_RIGHT,
39
+ :width => 80, :height => 80)
40
+ pbtn.create
41
+
42
+ pbtn.connect(SEL_COMMAND) {
43
+ p.create
44
+ p.show(Fox::PLACEMENT_SCREEN)
45
+ p.updateView()
46
+ }
47
+
48
+ frame = FXFrame.new(@matrix, :opts => FRAME_NONE|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, :width => 80, :height => 80)
49
+ frame.backColor = FXColor::White
50
+ end
51
+
52
+ @plugin_frame.recalc
53
+ @plugin_frame.update
54
+
55
+ rescue => bang
56
+ puts bang
57
+ puts bang.backtrace if $DEBUG
58
+ end
59
+ end
60
+
61
+ def initialize(parent)
62
+ begin
63
+
64
+ super(parent, LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN)
65
+ # db_title = FXLabel.new(self, "PLUGIN-BOARD", :opts => LAYOUT_LEFT)
66
+ main = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_GROOVE)
67
+ main.backColor = FXColor::White
68
+
69
+ frame = FXHorizontalFrame.new(main, :opts => LAYOUT_FILL_X|FRAME_GROOVE)
70
+ frame.backColor = FXColor::White
71
+ title_icon = FXButton.new(frame, '', ICON_PLUGIN, :opts => FRAME_NONE)
72
+ title_icon.backColor = FXColor::White
73
+
74
+
75
+ @font_title = FXFont.new(getApp(), "helvetica", 14, FONTWEIGHT_BOLD, FONTSLANT_ITALIC, FONTENCODING_DEFAULT)
76
+ title = FXLabel.new(frame, "Plugin-Board", nil, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
77
+ title.backColor = FXColor::White
78
+ title.setFont(@font_title)
79
+ title.justify = JUSTIFY_LEFT|JUSTIFY_CENTER_Y
80
+
81
+ @plugin_frame = FXVerticalFrame.new(main, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_GROOVE)
82
+
83
+ @plugin_frame.backColor = FXColor::White
84
+
85
+ @matrix = FXMatrix.new(@plugin_frame, 7, :opts => MATRIX_BY_COLUMNS|LAYOUT_FILL_X)
86
+ @matrix.backColor = FXColor::White
87
+ rescue => bang
88
+ puts bang
89
+ puts bang.backtrace if $DEBUG
90
+ end
91
+ # update(nil)
92
+ end
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,116 @@
1
+ # .
2
+ # preferences_dialog.rb
3
+ #
4
+ # Copyright 2012 by siberas, http://www.siberas.de
5
+ #
6
+ # This file is part of WATOBO (Web Application Tool Box)
7
+ # http://watobo.sourceforge.com
8
+ #
9
+ # WATOBO is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation version 2 of the License.
12
+ #
13
+ # WATOBO is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with WATOBO; if not, write to the Free Software
20
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
+ # .
22
+ module Watobo
23
+ module Gui
24
+ class PreferencesDialog < FXDialogBox
25
+
26
+ attr :settings
27
+
28
+ include Responder
29
+
30
+
31
+ def onAccept(sender, sel, event)
32
+ @settings[:enable_smart_scan] = @enable_smart_scan.checked?
33
+ @settings[:max_parallel_checks] = @max_par_checks_dt.value
34
+ @settings[:intercept_port] = @intercept_port_dt.value
35
+
36
+ getApp().stopModal(self, 1)
37
+ self.hide()
38
+ return 1
39
+
40
+ end
41
+
42
+ def startProxyDialog(sender, sel, ptr)
43
+ proxy_dialog = Watobo::Gui::ProxyDialog.new(self, @settings[:proxy], @settings[:proxy_list])
44
+ if proxy_dialog.execute != 0 then
45
+ @settings[:proxy_list] = proxy_dialog.getProxyList
46
+ @settings[:proxy] = proxy_dialog.proxy
47
+ @forwarding_proxy_dt.value = @settings[:proxy]
48
+ @forwarding_proxy.handle(self, FXSEL(SEL_UPDATE, 0), nil)
49
+ end
50
+ end
51
+
52
+ def initialize(owner, settings)
53
+ super(owner, "Preferences", :opts => DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE)
54
+
55
+ FXMAPFUNC(SEL_COMMAND, ID_ACCEPT, :onAccept)
56
+
57
+ @settings = Hash.new
58
+ @settings.update(settings)
59
+
60
+ @advancedFrame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
61
+
62
+ gbox_frame = FXGroupBox.new(@advancedFrame, "Scan Options ", LAYOUT_SIDE_RIGHT|FRAME_GROOVE|LAYOUT_FILL_X, 0, 0, 0, 0)
63
+ gbox = FXVerticalFrame.new(gbox_frame, :opts => LAYOUT_SIDE_TOP|PACK_UNIFORM_WIDTH)
64
+ frame = FXHorizontalFrame.new(gbox, :opts => LAYOUT_FILL_X|LAYOUT_SIDE_RIGHT)
65
+ FXLabel.new(frame, "Max. Par. Request:")
66
+ @max_par_checks_dt = FXDataTarget.new(0)
67
+ @max_par_checks_dt.value = @settings[:max_parallel_checks]
68
+ @max_par_checks = FXTextField.new(frame, 3, @max_par_checks_dt, FXDataTarget::ID_VALUE, :opts => JUSTIFY_RIGHT|FRAME_GROOVE|FRAME_SUNKEN)
69
+
70
+
71
+ @enable_smart_scan = FXCheckButton.new(gbox, "Enable Smart Scan ", nil, 0, JUSTIFY_RIGHT|JUSTIFY_TOP|ICON_AFTER_TEXT|LAYOUT_SIDE_RIGHT)
72
+ @enable_smart_scan.checkState = @settings[:smart_scan]
73
+
74
+ #-------------------------- Forwarding Proxy ---------------------------------#
75
+ # gbox = FXGroupBox.new(@advancedFrame, "Forwarding Proxy",LAYOUT_SIDE_RIGHT|FRAME_GROOVE|LAYOUT_FILL_X, 0, 0, 0, 0)
76
+ # frame = FXHorizontalFrame.new(gbox, :opts => LAYOUT_FILL_X|LAYOUT_SIDE_RIGHT)
77
+ # FXLabel.new(frame, "Current: ")
78
+ # @forwarding_proxy_dt = FXDataTarget.new('')
79
+ # @forwarding_proxy = FXTextField.new(frame, 20, @forwarding_proxy_dt, FXDataTarget::ID_VALUE, :opts => LAYOUT_FILL_X|FRAME_GROOVE|FRAME_SUNKEN)
80
+
81
+ # @forwarding_proxy_dt.value = @settings[:proxy]
82
+ # button = FXButton.new(frame, "View/Edit" , nil, nil, :opts => BUTTON_NORMAL|LAYOUT_RIGHT)
83
+ # button.enable
84
+ # button.connect(SEL_COMMAND, method(:startProxyDialog))
85
+
86
+ #-------------------------- Interceptor ---------------------------------#
87
+ # gbox = FXGroupBox.new(@advancedFrame, "Interceptor",LAYOUT_SIDE_RIGHT|FRAME_GROOVE|LAYOUT_FILL_X, 0, 0, 0, 0)
88
+ # frame = FXHorizontalFrame.new(gbox, :opts => LAYOUT_FILL_X|LAYOUT_SIDE_RIGHT)
89
+ # FXLabel.new(frame, "Listener Port: ")
90
+ # @intercept_port_dt = FXDataTarget.new(@settings[:intercept_port])
91
+ # @intercept_port = FXTextField.new(frame, 0, @intercept_port_dt, FXDataTarget::ID_VALUE, :opts => LAYOUT_FILL_X|FRAME_GROOVE|FRAME_SUNKEN)
92
+
93
+
94
+ buttons_frame = FXHorizontalFrame.new(@advancedFrame, :opts => LAYOUT_FILL_X)
95
+
96
+ @cancelButton = FXButton.new(buttons_frame, "Accept" ,
97
+ :target => self, :selector => FXDialogBox::ID_ACCEPT,
98
+ :opts => BUTTON_NORMAL|LAYOUT_RIGHT)
99
+
100
+ @cancelButton = FXButton.new(buttons_frame, "Cancel" ,
101
+ :target => self, :selector => FXDialogBox::ID_CANCEL,
102
+ :opts => BUTTON_NORMAL|LAYOUT_RIGHT)
103
+
104
+ @max_par_checks.handle(self, FXSEL(SEL_UPDATE, 0), nil)
105
+ # @forwarding_proxy.handle(self, FXSEL(SEL_UPDATE, 0), nil)
106
+ # @intercept_port.handle(self, FXSEL(SEL_UPDATE, 0), nil)
107
+
108
+
109
+ end
110
+ end
111
+ end
112
+ end
113
+
114
+ if __FILE__ == $0
115
+ # TODO Generated stub
116
+ end
@@ -0,0 +1,102 @@
1
+ # .
2
+ # progress_window.rb
3
+ #
4
+ # Copyright 2012 by siberas, http://www.siberas.de
5
+ #
6
+ # This file is part of WATOBO (Web Application Tool Box)
7
+ # http://watobo.sourceforge.com
8
+ #
9
+ # WATOBO is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation version 2 of the License.
12
+ #
13
+ # WATOBO is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with WATOBO; if not, write to the Free Software
20
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
+ # .
22
+ module Watobo
23
+ module Gui
24
+ class ProgressWindow < FXTopWindow
25
+ def increment(x)
26
+ @increment += x
27
+ end
28
+
29
+ def total=(x)
30
+ @total = x
31
+ end
32
+
33
+ def progress=(x)
34
+ @pbar.progress = x
35
+ end
36
+
37
+ def title=(new_title)
38
+ @title = new_title
39
+ end
40
+
41
+ def task=(new_task)
42
+ @task = new_task
43
+ end
44
+
45
+ def job=(new_job)
46
+ @job = new_job
47
+ end
48
+
49
+ def update_progress(settings={})
50
+ @update_lock.synchronize do
51
+ @total = settings[:total] unless settings[:total].nil?
52
+ @title = settings[:title] unless settings[:title].nil?
53
+ @task = settings[:task] unless settings[:task].nil?
54
+ @job = settings[:job] unless settings[:job].nil?
55
+ @increment += settings[:increment] unless settings[:increment].nil?
56
+ end
57
+ end
58
+
59
+ def initialize(owner, opts={})
60
+ super( owner, 'Progress Bar', nil, nil, DECOR_BORDER, 0, 0, 300, 100, 0, 0, 0, 0, 0, 0)
61
+ frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_RAISED)
62
+ @update_lock = Mutex.new
63
+
64
+ @title_lbl = FXLabel.new(frame, "title")
65
+ @title_lbl.setFont(FXFont.new(getApp(), "helvetica", 12, FONTWEIGHT_BOLD, FONTSLANT_ITALIC, FONTENCODING_DEFAULT))
66
+
67
+ @task_lbl = FXLabel.new(frame, "task")
68
+
69
+ @pbar = FXProgressBar.new(frame, nil, 0, LAYOUT_FILL_X|FRAME_SUNKEN|FRAME_THICK|PROGRESSBAR_HORIZONTAL)
70
+
71
+ @job_lbl = FXLabel.new(frame, "job")
72
+
73
+ @pbar.progress = 0
74
+ @pbar.total = 100
75
+ @increment = 0
76
+ @total = 100
77
+ @title = "-"
78
+ @job = "-"
79
+ @task = "-"
80
+
81
+ add_update_timer(50)
82
+ end
83
+
84
+ def add_update_timer(ms)
85
+ @update_timer = FXApp.instance.addTimeout( ms, :repeat => true) {
86
+ @update_lock.synchronize do
87
+ @title_lbl.text = @title
88
+ @task_lbl.text = @task
89
+ @job_lbl.text = @job
90
+
91
+ @pbar.increment(@increment)
92
+ @increment = 0
93
+ @pbar.total = @total
94
+ # @pbar.progress = settings[:progress] unless settings[:progress].nil?
95
+ end
96
+ }
97
+ end
98
+
99
+ end
100
+
101
+ end
102
+ end