watobo 0.9.12 → 0.9.13
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +2 -2
- data/{CHANGELOG → CHANGELOG.md} +62 -0
- data/README.md +30 -0
- data/bin/nfq_server.rb +4 -3
- data/bin/watobo_gui.rb +1 -1
- data/config/ott_cache.yml +4 -0
- data/config/scanner.yml +1 -18
- data/config/sid_cache.yml +14 -0
- data/extras/private-hostspot.sh +17 -0
- data/extras/watobo-installer.sh +61 -0
- data/extras/watobo-transparent.sh +38 -0
- data/icons/BestPractice_16x16.ico +0 -0
- data/icons/BestPractice_24x24.ico +0 -0
- data/lib/watobo/adapters/data_store.rb +25 -3
- data/lib/watobo/adapters/file/file_store.rb +19 -11
- data/lib/watobo/adapters/session_store.rb +3 -2
- data/lib/watobo/adapters.rb +1 -1
- data/lib/watobo/ca.rb +1 -1
- data/lib/watobo/config.rb +17 -19
- data/lib/watobo/constants.rb +3 -2
- data/lib/watobo/core/active_check.rb +62 -40
- data/lib/watobo/core/active_checks.rb +73 -0
- data/lib/watobo/core/ca.rb +3 -2
- data/lib/watobo/core/cert_store.rb +3 -2
- data/lib/watobo/core/chat.rb +122 -0
- data/lib/watobo/core/chats.rb +301 -0
- data/lib/watobo/core/conversation.rb +71 -0
- data/lib/watobo/core/cookie.rb +9 -25
- data/lib/watobo/core/finding.rb +89 -0
- data/lib/watobo/core/findings.rb +132 -0
- data/lib/watobo/core/forwarding_proxy.rb +4 -2
- data/lib/watobo/core/fuzz_gen.rb +3 -2
- data/lib/watobo/core/intercept_carver.rb +24 -12
- data/lib/watobo/core/intercept_filter.rb +4 -3
- data/lib/watobo/core/interceptor.rb +9 -888
- data/lib/watobo/core/min_class.rb +27 -0
- data/lib/watobo/core/netfilter_queue.rb +3 -2
- data/lib/watobo/core/ott_cache.rb +156 -0
- data/lib/watobo/core/parameter.rb +66 -0
- data/lib/watobo/core/passive_check.rb +15 -22
- data/lib/watobo/core/passive_checks.rb +72 -0
- data/lib/watobo/core/passive_scanner.rb +69 -0
- data/lib/watobo/core/plugin.rb +33 -0
- data/lib/watobo/core/project.rb +40 -547
- data/lib/watobo/core/proxy.rb +7 -2
- data/lib/watobo/core/request.rb +95 -10
- data/lib/watobo/core/response.rb +44 -3
- data/lib/watobo/core/scanner.rb +6 -7
- data/lib/watobo/core/scanner3.rb +439 -0
- data/lib/watobo/core/scope.rb +106 -0
- data/lib/watobo/core/session.rb +106 -286
- data/lib/watobo/core/sid_cache.rb +121 -0
- data/lib/watobo/core/subscriber.rb +48 -0
- data/lib/watobo/core.rb +2 -2
- data/lib/watobo/defaults.rb +3 -2
- data/lib/watobo/external/diff/lcs/array.rb +1 -1
- data/lib/watobo/external/diff/lcs/block.rb +1 -1
- data/lib/watobo/external/diff/lcs/callbacks.rb +1 -1
- data/lib/watobo/external/diff/lcs/change.rb +1 -1
- data/lib/watobo/external/diff/lcs/hunk.rb +1 -1
- data/lib/watobo/external/diff/lcs/ldiff.rb +1 -1
- data/lib/watobo/external/diff/lcs/string.rb +1 -1
- data/lib/watobo/external/diff/lcs.rb +1 -1
- data/lib/watobo/external/ntlm/ntlm.rb +1 -1
- data/lib/watobo/externals.rb +1 -1
- data/lib/watobo/framework/create_project.rb +19 -12
- data/lib/watobo/framework/init.rb +4 -3
- data/lib/watobo/framework/init_modules.rb +32 -3
- data/lib/watobo/framework/license_text.rb +3 -2
- data/lib/watobo/framework/load_chat.rb +36 -0
- data/lib/watobo/framework.rb +2 -2
- data/lib/watobo/gui/about_watobo.rb +3 -2
- data/lib/watobo/gui/browser_preview.rb +4 -3
- data/lib/watobo/gui/certificate_dialog.rb +3 -2
- data/lib/watobo/gui/chat_diff.rb +6 -14
- data/lib/watobo/gui/chatviewer_frame.rb +30 -5
- data/lib/watobo/gui/checkboxtree.rb +13 -12
- data/lib/watobo/gui/checks_policy_frame.rb +8 -10
- data/lib/watobo/gui/client_cert_dialog.rb +8 -6
- data/lib/watobo/gui/confirm_scan_dialog.rb +5 -3
- data/lib/watobo/gui/conversation_table.rb +288 -51
- data/lib/watobo/gui/conversation_table_ctrl.rb +36 -3
- data/lib/watobo/gui/conversation_table_ctrl2.rb +416 -0
- data/lib/watobo/gui/csrf_token_dialog.rb +25 -33
- data/lib/watobo/gui/dashboard.rb +47 -45
- data/lib/watobo/gui/define_scope_frame.rb +27 -22
- data/lib/watobo/gui/differ_frame.rb +238 -0
- data/lib/watobo/gui/edit_comment.rb +3 -2
- data/lib/watobo/gui/edit_scope_dialog.rb +7 -6
- data/lib/watobo/gui/finding_info.rb +3 -2
- data/lib/watobo/gui/findings_tree.rb +101 -26
- data/lib/watobo/gui/full_scan_dialog.rb +5 -6
- data/lib/watobo/gui/fuzzer_gui.rb +51 -18
- data/lib/watobo/gui/goto_url_dialog.rb +92 -0
- data/lib/watobo/gui/hex_viewer.rb +16 -5
- data/lib/watobo/gui/html_viewer.rb +309 -0
- data/lib/watobo/gui/intercept_filter_dialog.rb +3 -2
- data/lib/watobo/gui/interceptor_gui.rb +5 -4
- data/lib/watobo/gui/interceptor_settings_dialog.rb +4 -3
- data/lib/watobo/gui/list_box.rb +4 -3
- data/lib/watobo/gui/log_file_viewer.rb +55 -0
- data/lib/watobo/gui/log_viewer.rb +3 -82
- data/lib/watobo/gui/login_wizzard.rb +3 -3
- data/lib/watobo/gui/main_window.rb +183 -164
- data/lib/watobo/gui/manual_request_editor.rb +157 -642
- data/lib/watobo/gui/master_pw_dialog.rb +3 -2
- data/lib/watobo/gui/mixins/gui_settings.rb +3 -2
- data/lib/watobo/gui/page_tree.rb +3 -2
- data/lib/watobo/gui/password_policy_dialog.rb +3 -2
- data/lib/watobo/gui/plugin_board.rb +103 -73
- data/lib/watobo/gui/preferences_dialog.rb +3 -2
- data/lib/watobo/gui/progress_window.rb +3 -2
- data/lib/watobo/gui/project_wizzard.rb +3 -2
- data/lib/watobo/gui/proxy_dialog.rb +3 -2
- data/lib/watobo/gui/quick_scan_dialog.rb +17 -32
- data/lib/watobo/gui/request_builder_frame.rb +134 -0
- data/lib/watobo/gui/request_editor.rb +14 -9
- data/lib/watobo/gui/rewrite_filters_dialog.rb +4 -3
- data/lib/watobo/gui/rewrite_rules_dialog.rb +4 -3
- data/lib/watobo/gui/save_chat_dialog.rb +7 -3
- data/lib/watobo/gui/scanner_settings_dialog.rb +4 -3
- data/lib/watobo/gui/select_chat_dialog.rb +15 -25
- data/lib/watobo/gui/session_management_dialog.rb +21 -25
- data/lib/watobo/gui/sites_tree.rb +5 -4
- data/lib/watobo/gui/status_bar.rb +3 -2
- data/lib/watobo/gui/table_editor.rb +398 -386
- data/lib/watobo/gui/tagless_viewer.rb +3 -2
- data/lib/watobo/gui/templates/plugin.rb +3 -2
- data/lib/watobo/gui/templates/plugin2.rb +4 -3
- data/lib/watobo/gui/templates/plugin_base.rb +168 -0
- data/lib/watobo/gui/text_viewer.rb +49 -3
- data/lib/watobo/gui/transcoder_window.rb +3 -2
- data/lib/watobo/gui/utils/gui_utils.rb +5 -4
- data/lib/watobo/gui/utils/init_icons.rb +5 -2
- data/lib/watobo/gui/utils/load_icons.rb +3 -2
- data/lib/watobo/gui/utils/load_plugins.rb +22 -5
- data/lib/watobo/gui/utils/master_password.rb +3 -2
- data/lib/watobo/gui/utils/save_default_settings.rb +7 -5
- data/lib/watobo/gui/utils/save_project_settings.rb +1 -1
- data/lib/watobo/gui/utils/save_proxy_settings.rb +4 -3
- data/lib/watobo/gui/utils/save_scanner_settings.rb +5 -4
- data/lib/watobo/gui/utils/session_history.rb +3 -2
- data/lib/watobo/gui/workspace_dialog.rb +3 -2
- data/lib/watobo/gui/www_auth_dialog.rb +4 -3
- data/lib/watobo/gui/xml_viewer_frame.rb +3 -2
- data/lib/watobo/gui.rb +6 -3
- data/lib/watobo/http/cookies/cookies.rb +66 -0
- data/lib/watobo/http/data/data.rb +68 -0
- data/lib/watobo/{gui/mixins/subscriber.rb → http/url/url.rb} +33 -19
- data/lib/watobo/http_socket/agent.rb +851 -0
- data/lib/watobo/http_socket/client_socket.rb +290 -0
- data/lib/watobo/http_socket/connection.rb +423 -0
- data/lib/watobo/http_socket/http_socket.rb +273 -0
- data/lib/watobo/http_socket/ntlm_auth.rb +152 -0
- data/lib/watobo/http_socket/proxy.rb +31 -0
- data/lib/watobo/http_socket.rb +25 -0
- data/lib/watobo/interceptor/proxy.rb +883 -0
- data/lib/watobo/interceptor/transparent.rb +37 -0
- data/lib/watobo/interceptor.rb +25 -0
- data/lib/watobo/mixins/check_info.rb +50 -0
- data/lib/watobo/mixins/httpparser.rb +92 -20
- data/lib/watobo/mixins/request_parser.rb +103 -88
- data/lib/watobo/mixins/shapers.rb +42 -11
- data/lib/watobo/mixins/transcoders.rb +61 -57
- data/lib/watobo/mixins.rb +3 -2
- data/lib/watobo/parser/html.rb +106 -0
- data/lib/watobo/parser.rb +22 -0
- data/lib/watobo/utils/check_regex.rb +3 -2
- data/lib/watobo/utils/copy_object.rb +3 -2
- data/lib/watobo/utils/crypto.rb +3 -2
- data/lib/watobo/utils/expand_range.rb +3 -2
- data/lib/watobo/utils/file_management.rb +7 -3
- data/lib/watobo/utils/hexprint.rb +3 -2
- data/lib/watobo/utils/load_chat.rb +4 -3
- data/lib/watobo/utils/load_icon.rb +3 -2
- data/lib/watobo/utils/print_debug.rb +3 -2
- data/lib/watobo/utils/response_builder.rb +6 -4
- data/lib/watobo/utils/response_hash.rb +66 -49
- data/lib/watobo/utils/secure_eval.rb +3 -2
- data/lib/watobo/utils/strings.rb +3 -2
- data/lib/watobo/utils/text2request.rb +4 -5
- data/lib/watobo/utils/url.rb +46 -0
- data/lib/watobo/utils.rb +3 -2
- data/lib/watobo.rb +13 -3
- data/modules/active/Apache/mod_status.rb +15 -11
- data/modules/active/Flash/crossdomain.rb +17 -14
- data/modules/active/RoR/cve_2013_015x.rb +21 -0
- data/modules/active/directories/dirwalker.rb +10 -16
- data/modules/active/discovery/fileextensions.rb +10 -7
- data/modules/active/discovery/http_methods.rb +8 -9
- data/modules/active/domino/domino_db.rb +10 -11
- data/modules/active/dotNET/custom_errors.rb +124 -0
- data/modules/active/dotNET/dotnet_files.rb +112 -0
- data/modules/active/fileinclusion/lfi_simple.rb +9 -7
- data/modules/active/jboss/jboss_basic.rb +12 -9
- data/modules/active/sap/its_commands.rb +10 -9
- data/modules/active/sap/its_service_parameter.rb +10 -9
- data/modules/active/sap/its_services.rb +10 -9
- data/modules/active/sap/its_xss.rb +11 -10
- data/modules/active/siebel/siebel_apps.rb +14 -16
- data/modules/active/sqlinjection/sql_boolean.rb +139 -75
- data/modules/active/sqlinjection/sqli_error.rb +9 -6
- data/modules/active/sqlinjection/sqli_timing.rb +13 -11
- data/modules/active/xml/xml_xxe.rb +134 -0
- data/modules/active/xss/{xss_rated.rb → xss_ng.rb} +89 -56
- data/modules/active/xss/xss_simple.rb +9 -6
- data/modules/passive/ajax.rb +85 -0
- data/modules/passive/autocomplete.rb +78 -0
- data/modules/passive/cookie_options.rb +3 -2
- data/modules/passive/cookie_xss.rb +3 -2
- data/modules/passive/detect_code.rb +7 -4
- data/modules/passive/detect_fileupload.rb +3 -2
- data/modules/passive/detect_infrastructure.rb +7 -4
- data/modules/passive/detect_one_time_tokens.rb +3 -2
- data/modules/passive/dirindexing.rb +3 -2
- data/modules/passive/disclosure_domino.rb +3 -2
- data/modules/passive/disclosure_emails.rb +3 -2
- data/modules/passive/disclosure_ipaddr.rb +3 -2
- data/modules/passive/filename_as_parameter.rb +3 -2
- data/modules/passive/form_spotter.rb +10 -7
- data/modules/passive/hidden_fields.rb +73 -0
- data/modules/passive/hotspots.rb +7 -4
- data/modules/passive/in_script_parameter.rb +3 -2
- data/modules/passive/multiple_server_headers.rb +4 -3
- data/modules/passive/possible_login.rb +3 -2
- data/modules/passive/redirect_url.rb +3 -2
- data/modules/passive/redirectionz.rb +6 -3
- data/modules/passive/xss_dom.rb +16 -9
- data/plugins/catalog/catalog.rb +119 -193
- data/plugins/crawler/crawler.rb +4 -3
- data/plugins/crawler/gui/auth_frame.rb +3 -2
- data/plugins/crawler/gui/crawler_gui.rb +3 -2
- data/plugins/crawler/gui/general_settings_frame.rb +3 -2
- data/plugins/crawler/gui/hooks_frame.rb +3 -2
- data/plugins/crawler/gui/scope_frame.rb +3 -2
- data/plugins/crawler/gui/settings_tabbook.rb +3 -2
- data/plugins/crawler/gui/status_frame.rb +3 -2
- data/plugins/crawler/gui.rb +3 -2
- data/plugins/crawler/lib/bags.rb +3 -2
- data/plugins/crawler/lib/constants.rb +3 -2
- data/plugins/crawler/lib/engine.rb +3 -2
- data/plugins/crawler/lib/grabber.rb +3 -2
- data/plugins/crawler/lib/uri_mp.rb +1 -1
- data/plugins/filefinder/filefinder.rb +92 -70
- data/plugins/sqlmap/bin/test.rb +3 -2
- data/plugins/sqlmap/gui/main.rb +3 -2
- data/plugins/sqlmap/gui/options_frame.rb +4 -3
- data/plugins/sqlmap/gui.rb +1 -1
- data/plugins/sqlmap/lib/sqlmap_ctrl.rb +3 -2
- data/plugins/sqlmap/sqlmap.rb +1 -1
- data/plugins/sslchecker/cli/sslchecker_cli.rb +1 -1
- data/plugins/sslchecker/gui/cipher_table.rb +17 -10
- data/plugins/sslchecker/gui/gui.rb +59 -56
- data/plugins/sslchecker/gui/sslchecker.rb +1 -1
- data/plugins/sslchecker/lib/check.rb +43 -18
- data/plugins/wshell/gui/main.rb +130 -0
- data/plugins/wshell/icons/wsh.ico +0 -0
- data/plugins/wshell/lib/core.rb +99 -0
- data/plugins/wshell/wshell.rb +33 -0
- metadata +80 -8
- data/README +0 -26
- data/lib/watobo/core/http_socket.rb +0 -161
- data/lib/watobo/gui/plugin/base.rb +0 -82
@@ -1,7 +1,7 @@
|
|
1
1
|
# .
|
2
2
|
# master_pw_dialog.rb
|
3
3
|
#
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2013 by siberas, http://www.siberas.de
|
5
5
|
#
|
6
6
|
# This file is part of WATOBO (Web Application Tool Box)
|
7
7
|
# http://watobo.sourceforge.com
|
@@ -19,7 +19,8 @@
|
|
19
19
|
# along with WATOBO; if not, write to the Free Software
|
20
20
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
21
21
|
# .
|
22
|
-
|
22
|
+
# @private
|
23
|
+
module Watobo#:nodoc: all
|
23
24
|
module Gui
|
24
25
|
class MasterPWDialog < FXDialogBox
|
25
26
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# .
|
2
2
|
# gui_settings.rb
|
3
3
|
#
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2013 by siberas, http://www.siberas.de
|
5
5
|
#
|
6
6
|
# This file is part of WATOBO (Web Application Tool Box)
|
7
7
|
# http://watobo.sourceforge.com
|
@@ -19,7 +19,8 @@
|
|
19
19
|
# along with WATOBO; if not, write to the Free Software
|
20
20
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
21
21
|
# .
|
22
|
-
|
22
|
+
# @private
|
23
|
+
module Watobo#:nodoc: all
|
23
24
|
module Gui
|
24
25
|
module Settings
|
25
26
|
def self.save_gui_settings(settings)
|
data/lib/watobo/gui/page_tree.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# .
|
2
2
|
# page_tree.rb
|
3
3
|
#
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2013 by siberas, http://www.siberas.de
|
5
5
|
#
|
6
6
|
# This file is part of WATOBO (Web Application Tool Box)
|
7
7
|
# http://watobo.sourceforge.com
|
@@ -21,7 +21,8 @@
|
|
21
21
|
# .
|
22
22
|
#require 'qcustomize.rb'
|
23
23
|
|
24
|
-
|
24
|
+
# @private
|
25
|
+
module Watobo#:nodoc: all
|
25
26
|
module Gui
|
26
27
|
class PageTree < FXTreeList
|
27
28
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# .
|
2
2
|
# password_policy_dialog.rb
|
3
3
|
#
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2013 by siberas, http://www.siberas.de
|
5
5
|
#
|
6
6
|
# This file is part of WATOBO (Web Application Tool Box)
|
7
7
|
# http://watobo.sourceforge.com
|
@@ -19,7 +19,8 @@
|
|
19
19
|
# along with WATOBO; if not, write to the Free Software
|
20
20
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
21
21
|
# .
|
22
|
-
|
22
|
+
# @private
|
23
|
+
module Watobo#:nodoc: all
|
23
24
|
module Gui
|
24
25
|
class PasswordPolicyDialog < FXDialogBox
|
25
26
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# .
|
2
2
|
# plugin_board.rb
|
3
3
|
#
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2013 by siberas, http://www.siberas.de
|
5
5
|
#
|
6
6
|
# This file is part of WATOBO (Web Application Tool Box)
|
7
7
|
# http://watobo.sourceforge.com
|
@@ -19,77 +19,107 @@
|
|
19
19
|
# along with WATOBO; if not, write to the Free Software
|
20
20
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
21
21
|
# .
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
end
|
91
|
-
# update(nil)
|
92
|
-
end
|
22
|
+
# @private
|
23
|
+
module Watobo#:nodoc: all
|
24
|
+
module Gui
|
25
|
+
class PluginBoard < FXVerticalFrame
|
26
|
+
include Watobo::Gui::Icons
|
27
|
+
def updateBoard()
|
28
|
+
|
29
|
+
return false unless Watobo::Gui.plugins.first.respond_to? :plugin_name
|
30
|
+
begin
|
31
|
+
@matrix.each_child do |child|
|
32
|
+
@matrix.removeChild(child)
|
33
|
+
end
|
34
|
+
|
35
|
+
loaded = []
|
36
|
+
|
37
|
+
Watobo::Gui.plugins.each do |p|
|
38
|
+
plugin_name = p.respond_to?(:get_plugin_name) ? p.get_plugin_name : p.plugin_name
|
39
|
+
next if loaded.include? plugin_name
|
40
|
+
loaded << plugin_name
|
41
|
+
icon =p.respond_to?(:icon) ? p.icon : p.gui.icon
|
42
|
+
pbtn = FXButton.new( @matrix, "\n" + plugin_name, icon, nil, 0,
|
43
|
+
:opts => ICON_ABOVE_TEXT|FRAME_RAISED|FRAME_THICK|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT|LAYOUT_RIGHT,
|
44
|
+
:width => 80, :height => 80)
|
45
|
+
pbtn.create
|
46
|
+
|
47
|
+
pbtn.connect(SEL_COMMAND) {
|
48
|
+
gui = p.respond_to?(:create) ? p : p.gui
|
49
|
+
gui.create
|
50
|
+
gui.show(Fox::PLACEMENT_SCREEN)
|
51
|
+
# gui.updateView()
|
52
|
+
}
|
53
|
+
|
54
|
+
pbtn.connect(SEL_RIGHTBUTTONPRESS) { |sender, sel, event|
|
55
|
+
description = nil
|
56
|
+
description = p.get_description if p.respond_to?(:get_description)
|
57
|
+
description = "No description available." if description.nil?
|
58
|
+
|
59
|
+
plugin_name = p.respond_to?(:get_plugin_name) ? p.get_plugin_name : p.plugin_name
|
60
|
+
unless event.moved?
|
61
|
+
FXMenuPane.new(self) do |menu_pane|
|
62
|
+
#title = FXMenuCaption.new(menu_pane, "Description: #{plugin_name}")
|
63
|
+
#title.backColor = 'red'
|
64
|
+
#f = FXVerticalFrame.new(menu_pane, :opts=>LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
65
|
+
t = FXLabel.new(menu_pane, "#{plugin_name}")
|
66
|
+
# t.justify = JUSTIFY_LEFT
|
67
|
+
t.font = FXFont.new(getApp(), "courier", 12, FONTWEIGHT_BOLD)
|
68
|
+
|
69
|
+
f = FXVerticalFrame.new(menu_pane, :opts=>LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_THICK|FRAME_SUNKEN)
|
70
|
+
FXLabel.new(f, description).justify = JUSTIFY_LEFT
|
71
|
+
|
72
|
+
menu_pane.create
|
73
|
+
menu_pane.popup(nil, event.root_x, event.root_y)
|
74
|
+
app.runModalWhileShown(menu_pane)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
}
|
78
|
+
|
79
|
+
frame = FXFrame.new(@matrix, :opts => FRAME_NONE|LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT, :width => 80, :height => 80)
|
80
|
+
frame.backColor = FXColor::White
|
81
|
+
end
|
82
|
+
|
83
|
+
@plugin_frame.recalc
|
84
|
+
@plugin_frame.update
|
85
|
+
|
86
|
+
rescue => bang
|
87
|
+
puts bang
|
88
|
+
puts bang.backtrace if $DEBUG
|
89
|
+
end
|
93
90
|
end
|
94
|
-
|
91
|
+
|
92
|
+
def initialize(parent)
|
93
|
+
begin
|
94
|
+
|
95
|
+
super(parent, LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN)
|
96
|
+
# db_title = FXLabel.new(self, "PLUGIN-BOARD", :opts => LAYOUT_LEFT)
|
97
|
+
main = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_GROOVE)
|
98
|
+
main.backColor = FXColor::White
|
99
|
+
|
100
|
+
frame = FXHorizontalFrame.new(main, :opts => LAYOUT_FILL_X|FRAME_GROOVE)
|
101
|
+
frame.backColor = FXColor::White
|
102
|
+
title_icon = FXButton.new(frame, '', ICON_PLUGIN, :opts => FRAME_NONE)
|
103
|
+
title_icon.backColor = FXColor::White
|
104
|
+
|
105
|
+
@font_title = FXFont.new(getApp(), "helvetica", 14, FONTWEIGHT_BOLD, FONTSLANT_ITALIC, FONTENCODING_DEFAULT)
|
106
|
+
title = FXLabel.new(frame, "Plugin-Board", nil, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
107
|
+
title.backColor = FXColor::White
|
108
|
+
title.setFont(@font_title)
|
109
|
+
title.justify = JUSTIFY_LEFT|JUSTIFY_CENTER_Y
|
110
|
+
|
111
|
+
@plugin_frame = FXVerticalFrame.new(main, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_GROOVE)
|
112
|
+
|
113
|
+
@plugin_frame.backColor = FXColor::White
|
114
|
+
|
115
|
+
@matrix = FXMatrix.new(@plugin_frame, 7, :opts => MATRIX_BY_COLUMNS|LAYOUT_FILL_X)
|
116
|
+
@matrix.backColor = FXColor::White
|
117
|
+
rescue => bang
|
118
|
+
puts bang
|
119
|
+
puts bang.backtrace if $DEBUG
|
120
|
+
end
|
121
|
+
# update(nil)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
95
125
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# .
|
2
2
|
# preferences_dialog.rb
|
3
3
|
#
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2013 by siberas, http://www.siberas.de
|
5
5
|
#
|
6
6
|
# This file is part of WATOBO (Web Application Tool Box)
|
7
7
|
# http://watobo.sourceforge.com
|
@@ -19,7 +19,8 @@
|
|
19
19
|
# along with WATOBO; if not, write to the Free Software
|
20
20
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
21
21
|
# .
|
22
|
-
|
22
|
+
# @private
|
23
|
+
module Watobo#:nodoc: all
|
23
24
|
module Gui
|
24
25
|
class PreferencesDialog_UNUSED < FXDialogBox
|
25
26
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# .
|
2
2
|
# progress_window.rb
|
3
3
|
#
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2013 by siberas, http://www.siberas.de
|
5
5
|
#
|
6
6
|
# This file is part of WATOBO (Web Application Tool Box)
|
7
7
|
# http://watobo.sourceforge.com
|
@@ -19,7 +19,8 @@
|
|
19
19
|
# along with WATOBO; if not, write to the Free Software
|
20
20
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
21
21
|
# .
|
22
|
-
|
22
|
+
# @private
|
23
|
+
module Watobo#:nodoc: all
|
23
24
|
module Gui
|
24
25
|
class ProgressWindow < FXTopWindow
|
25
26
|
def increment(x)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# .
|
2
2
|
# project_wizzard.rb
|
3
3
|
#
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2013 by siberas, http://www.siberas.de
|
5
5
|
#
|
6
6
|
# This file is part of WATOBO (Web Application Tool Box)
|
7
7
|
# http://watobo.sourceforge.com
|
@@ -19,7 +19,8 @@
|
|
19
19
|
# along with WATOBO; if not, write to the Free Software
|
20
20
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
21
21
|
# .
|
22
|
-
|
22
|
+
# @private
|
23
|
+
module Watobo#:nodoc: all
|
23
24
|
module Gui
|
24
25
|
|
25
26
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# .
|
2
2
|
# proxy_dialog.rb
|
3
3
|
#
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2013 by siberas, http://www.siberas.de
|
5
5
|
#
|
6
6
|
# This file is part of WATOBO (Web Application Tool Box)
|
7
7
|
# http://watobo.sourceforge.com
|
@@ -19,7 +19,8 @@
|
|
19
19
|
# along with WATOBO; if not, write to the Free Software
|
20
20
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
21
21
|
# .
|
22
|
-
|
22
|
+
# @private
|
23
|
+
module Watobo#:nodoc: all
|
23
24
|
module Gui
|
24
25
|
class AddProxyDialog < FXDialogBox
|
25
26
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# .
|
2
2
|
# quick_scan_dialog.rb
|
3
3
|
#
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2013 by siberas, http://www.siberas.de
|
5
5
|
#
|
6
6
|
# This file is part of WATOBO (Web Application Tool Box)
|
7
7
|
# http://watobo.sourceforge.com
|
@@ -19,15 +19,19 @@
|
|
19
19
|
# along with WATOBO; if not, write to the Free Software
|
20
20
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
21
21
|
# .
|
22
|
-
|
22
|
+
# @private
|
23
|
+
module Watobo#:nodoc: all
|
23
24
|
module Gui
|
24
25
|
class QuickScanOptionsFrame < FXVerticalFrame
|
25
26
|
def options()
|
27
|
+
csrf_requests = Watobo::OTTCache.requests(@target_chat)
|
28
|
+
|
26
29
|
o = Hash.new
|
27
30
|
o[:enable_logging] = @logScanChats.checked?
|
28
31
|
o[:scanlog_name] = @scanlog_name_dt.value
|
29
32
|
o[:csrf_tokens] = @csrf_patterns
|
30
33
|
o[:csrf_request_ids] = @csrf_ids
|
34
|
+
o[:csrf_requests] = csrf_requests
|
31
35
|
o[:update_csrf_tokens] = @csrfToken.checked?
|
32
36
|
o[:use_orig_request] = @useOriginalRequest.checked?
|
33
37
|
o[:detect_logout] = @detectLogout.checked?
|
@@ -36,8 +40,7 @@ module Watobo
|
|
36
40
|
o
|
37
41
|
end
|
38
42
|
|
39
|
-
def initialize(owner,
|
40
|
-
@project = project
|
43
|
+
def initialize(owner, prefs = {} )
|
41
44
|
|
42
45
|
super(owner, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
43
46
|
|
@@ -46,14 +49,14 @@ module Watobo
|
|
46
49
|
@target_chat = prefs[:target_chat]
|
47
50
|
|
48
51
|
# scan_opt_frame= FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
49
|
-
@useOriginalRequest = FXCheckButton.new(self, "Use
|
52
|
+
@useOriginalRequest = FXCheckButton.new(self, "Use original request", nil, 0, JUSTIFY_LEFT|JUSTIFY_TOP|ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP)
|
50
53
|
@useOriginalRequest.checkState = true
|
51
54
|
|
52
|
-
@followRedirects = FXCheckButton.new(self, "Follow
|
55
|
+
@followRedirects = FXCheckButton.new(self, "Follow redirects", nil, 0, JUSTIFY_LEFT|JUSTIFY_TOP|ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP)
|
53
56
|
@followRedirects.checkState = false
|
54
57
|
|
55
|
-
@detectLogout = FXCheckButton.new(self, "
|
56
|
-
|
58
|
+
@detectLogout = FXCheckButton.new(self, "Autom. login when logged out", nil, 0, JUSTIFY_LEFT|JUSTIFY_TOP|ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP)
|
59
|
+
@detectLogout.checkState = false
|
57
60
|
|
58
61
|
frame = FXGroupBox.new(self, "Logging", LAYOUT_SIDE_TOP|FRAME_GROOVE|LAYOUT_FILL_X, 0, 0, 0, 0)
|
59
62
|
@logScanChats = FXCheckButton.new(frame, "Log Scan", nil, 0, JUSTIFY_LEFT|JUSTIFY_TOP|ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP)
|
@@ -111,31 +114,13 @@ module Watobo
|
|
111
114
|
private
|
112
115
|
|
113
116
|
def openCSRFTokenDialog(sender, sel, item)
|
114
|
-
csrf_dlg = CSRFTokenDialog.new(self, @
|
117
|
+
csrf_dlg = CSRFTokenDialog.new(self, @target_chat)
|
115
118
|
if csrf_dlg.execute != 0 then
|
116
119
|
@csrf_ids = csrf_dlg.getTokenScriptIds()
|
117
120
|
@csrf_patterns = csrf_dlg.getTokenPatterns()
|
118
121
|
|
119
|
-
|
120
|
-
puts @csrf_ids
|
121
|
-
puts @csrf_patterns
|
122
|
-
puts @target_chat
|
123
|
-
|
124
|
-
@project.setCSRFRequest(@target_chat.request, @csrf_ids, @csrf_patterns)
|
125
|
-
|
126
|
-
# puts csrf_ids.to_yaml
|
127
|
-
# puts "= = ="
|
128
|
-
# puts csrf_patterns.to_yaml
|
122
|
+
Watobo.project.setCSRFRequest(@target_chat.request, @csrf_ids, @csrf_patterns)
|
129
123
|
|
130
|
-
# if @project
|
131
|
-
# @csrf_requests = []
|
132
|
-
# csrf_ids.each do |id|
|
133
|
-
# chat = @project.getChat(id)
|
134
|
-
# @csrf_requests.push chat.copyRequest
|
135
|
-
# end
|
136
|
-
|
137
|
-
#end
|
138
|
-
|
139
124
|
end
|
140
125
|
end
|
141
126
|
|
@@ -159,21 +144,21 @@ module Watobo
|
|
159
144
|
attr :selectedModules
|
160
145
|
attr :options
|
161
146
|
|
162
|
-
def initialize(parent,
|
147
|
+
def initialize(parent, prefs={} )
|
163
148
|
super(parent, "Quick Scan", DECOR_ALL, :width => 300, :height => 400)
|
164
149
|
# @active_policy = 'Default'
|
165
150
|
@selectedModules = []
|
166
|
-
|
151
|
+
|
167
152
|
|
168
153
|
FXMAPFUNC(SEL_COMMAND, ID_ACCEPT, :onAccept)
|
169
154
|
|
170
155
|
base_frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
|
171
156
|
@switcher = FXSwitcher.new(base_frame,LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
172
157
|
|
173
|
-
@quickScanOptionsFrame = QuickScanOptionsFrame.new(@switcher,
|
158
|
+
@quickScanOptionsFrame = QuickScanOptionsFrame.new(@switcher, prefs)
|
174
159
|
|
175
160
|
# @policyFrame = ChecksPolicyFrame.new(@switcher, project.active_checks, project.settings[:policy])
|
176
|
-
@policyFrame = ChecksPolicyFrame.new(@switcher
|
161
|
+
@policyFrame = ChecksPolicyFrame.new(@switcher)
|
177
162
|
|
178
163
|
# BUTTONS
|
179
164
|
buttons_frame = FXHorizontalFrame.new(base_frame, :opts => LAYOUT_FILL_X)
|
@@ -0,0 +1,134 @@
|
|
1
|
+
# .
|
2
|
+
# request_builder_frame.rb
|
3
|
+
#
|
4
|
+
# Copyright 2013 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
|
+
# @private
|
23
|
+
module Watobo#:nodoc: all
|
24
|
+
module Gui
|
25
|
+
class RequestBuilder < FXVerticalFrame
|
26
|
+
def subscribe(event, &callback)
|
27
|
+
(@event_dispatcher_listeners[event] ||= []) << callback
|
28
|
+
end
|
29
|
+
|
30
|
+
def clearEvents(event)
|
31
|
+
@event_dispatcher_listener[event].clear
|
32
|
+
end
|
33
|
+
|
34
|
+
def setRequest(raw_request)
|
35
|
+
begin
|
36
|
+
# request
|
37
|
+
if raw_request.is_a? String
|
38
|
+
request = Watobo::Utils.text2request(raw_request)
|
39
|
+
else
|
40
|
+
request = Watobo::Request.new raw_request
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
@editors.each do |name, item|
|
45
|
+
e = item[:editor]
|
46
|
+
if e.setRequest(request)
|
47
|
+
item[:tab_item].enable
|
48
|
+
else
|
49
|
+
item[:tab_item].disable
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
rescue => bang
|
55
|
+
puts bang
|
56
|
+
puts bang.backtrace
|
57
|
+
# puts request
|
58
|
+
# puts "== EOE =="
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def highlight(pattern)
|
63
|
+
# @text_edit.highlight(pattern)
|
64
|
+
end
|
65
|
+
|
66
|
+
def rawRequest
|
67
|
+
@current.rawRequest
|
68
|
+
end
|
69
|
+
|
70
|
+
def parseRequest
|
71
|
+
|
72
|
+
@current.parseRequest
|
73
|
+
|
74
|
+
end
|
75
|
+
|
76
|
+
def initialize(owner, opts)
|
77
|
+
super(owner,opts)
|
78
|
+
|
79
|
+
@event_dispatcher_listeners = Hash.new
|
80
|
+
@last_editor = nil
|
81
|
+
|
82
|
+
@tab = FXTabBook.new(self, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_RIGHT)
|
83
|
+
@tab.connect(SEL_COMMAND){
|
84
|
+
@current = @editors.to_a[@tab.current][1][:editor]
|
85
|
+
unless @last_editor.nil?
|
86
|
+
last_request = @last_editor.rawRequest
|
87
|
+
@current.setRequest(last_request)
|
88
|
+
end
|
89
|
+
@last_editor = @editors.to_a[@tab.current][1][:editor]
|
90
|
+
#puts @current.class
|
91
|
+
}
|
92
|
+
@editors = {}
|
93
|
+
@current = nil
|
94
|
+
|
95
|
+
add_editor("Text") do |frame|
|
96
|
+
Watobo::Gui::RequestEditor.new(frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN|FRAME_THICK, :padding => 0)
|
97
|
+
end
|
98
|
+
|
99
|
+
add_editor("Table") do |frame|
|
100
|
+
Watobo::Gui::TableEditorFrame.new(frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN|FRAME_THICK, :padding => 0)
|
101
|
+
end
|
102
|
+
|
103
|
+
@current = @editors.first[1][:editor]
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
end
|
108
|
+
|
109
|
+
private
|
110
|
+
|
111
|
+
def add_editor(tab_name, &b)
|
112
|
+
tab_item = FXTabItem.new(@tab, tab_name, nil)
|
113
|
+
frame = FXVerticalFrame.new(@tab, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_RAISED)
|
114
|
+
editor = yield(frame) if block_given?
|
115
|
+
|
116
|
+
@editors[tab_name.to_sym] = {
|
117
|
+
:editor => editor,
|
118
|
+
:tab_item => tab_item
|
119
|
+
}
|
120
|
+
editor.subscribe(:hotkey_ctrl_enter){ notify(:hotkey_ctrl_enter) }
|
121
|
+
editor.subscribe(:error) { |msg| notify(:error, msg) }
|
122
|
+
|
123
|
+
end
|
124
|
+
|
125
|
+
def notify(event, *args)
|
126
|
+
if @event_dispatcher_listeners[event]
|
127
|
+
@event_dispatcher_listeners[event].each do |m|
|
128
|
+
m.call(*args) if m.respond_to? :call
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# .
|
2
2
|
# request_editor.rb
|
3
3
|
#
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2013 by siberas, http://www.siberas.de
|
5
5
|
#
|
6
6
|
# This file is part of WATOBO (Web Application Tool Box)
|
7
7
|
# http://watobo.sourceforge.com
|
@@ -19,7 +19,8 @@
|
|
19
19
|
# along with WATOBO; if not, write to the Free Software
|
20
20
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
21
21
|
# .
|
22
|
-
|
22
|
+
# @private
|
23
|
+
module Watobo#:nodoc: all
|
23
24
|
module Gui
|
24
25
|
class SimpleTextView < FXVerticalFrame
|
25
26
|
|
@@ -177,7 +178,10 @@ module Watobo
|
|
177
178
|
@text = normalizeText(text)
|
178
179
|
|
179
180
|
showText(@text)
|
181
|
+
true
|
180
182
|
end
|
183
|
+
|
184
|
+
alias_method :setRequest, :setText
|
181
185
|
|
182
186
|
def filter(pattern)
|
183
187
|
#dummy = @textbox.to_s.split(/\n/)
|
@@ -401,13 +405,13 @@ module Watobo
|
|
401
405
|
text = @textbox.extractText(pos,len)
|
402
406
|
rptxt = case event.code
|
403
407
|
when KEY_u
|
404
|
-
CGI::escape(text)
|
408
|
+
CGI::escape(text)
|
405
409
|
when KEY_b
|
406
|
-
Base64.
|
410
|
+
Base64.strict_encode64(text)
|
407
411
|
when KEY_U
|
408
|
-
CGI::unescape(text)
|
412
|
+
CGI::unescape(text)
|
409
413
|
when KEY_B
|
410
|
-
Base64.decode64(text)
|
414
|
+
Base64.decode64(text)
|
411
415
|
else
|
412
416
|
text
|
413
417
|
end
|
@@ -432,8 +436,9 @@ module Watobo
|
|
432
436
|
def parseRequest
|
433
437
|
begin
|
434
438
|
return @textbox.to_request
|
435
|
-
rescue SyntaxError, LocalJumpError, NameError
|
436
|
-
|
439
|
+
rescue SyntaxError, LocalJumpError, NameError => bang
|
440
|
+
puts bang
|
441
|
+
puts bang.backtrace
|
437
442
|
# puts bang.backtrace if $DEBUG
|
438
443
|
notify(:error, "#{$!}")
|
439
444
|
rescue => bang
|
@@ -476,6 +481,6 @@ module Watobo
|
|
476
481
|
end
|
477
482
|
end
|
478
483
|
|
479
|
-
# -> module Watobo::Gui
|
484
|
+
# -> # module Watobo::Gui
|
480
485
|
end
|
481
486
|
end
|