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.
- data/bin/watobo_gui.rb +39 -0
- data/certificates/cert.pem +19 -0
- data/certificates/privkey.pem +15 -0
- data/certificates/watobo_dh.key +5 -0
- data/config/datastore.yml +5 -0
- data/config/forwarding_proxy.yml +12 -0
- data/config/general.yml +4 -0
- data/config/gui.yml +23 -0
- data/config/interceptor.yml +16 -0
- data/config/scan_policy.yml +13 -0
- data/config/scanner.yml +34 -0
- data/icons/Add.ico +0 -0
- data/icons/Add_24x24.ico +0 -0
- data/icons/Bandwidth.ico +0 -0
- data/icons/Bandwidth_24x24.ico +0 -0
- data/icons/Mr. Bomb.ico +0 -0
- data/icons/Mr. Bomb_16x16.ico +0 -0
- data/icons/Mr. Bomb_24x24.ico +0 -0
- data/icons/Orange Ball.ico +0 -0
- data/icons/Orange Ball_16x16.ico +0 -0
- data/icons/Orange Ball_24x24.ico +0 -0
- data/icons/Pause.ico +0 -0
- data/icons/Play.ico +0 -0
- data/icons/Play_24x24.ico +0 -0
- data/icons/Red Ball.ico +0 -0
- data/icons/Red Ball_16x16.ico +0 -0
- data/icons/Red Ball_24x24.ico +0 -0
- data/icons/Run.ico +0 -0
- data/icons/Stop.ico +0 -0
- data/icons/Stop_24x24.ico +0 -0
- data/icons/Terminal.ico +0 -0
- data/icons/Transfer.ico +0 -0
- data/icons/Transfer_16x16.ico +0 -0
- data/icons/User.ico +0 -0
- data/icons/User_16x16.ico +0 -0
- data/icons/User_24x24.ico +0 -0
- data/icons/Web Browser.ico +0 -0
- data/icons/Web Browser_16x16.ico +0 -0
- data/icons/Write Document.ico +0 -0
- data/icons/Yellow Ball.ico +0 -0
- data/icons/Yellow Ball_16x16.ico +0 -0
- data/icons/Yellow Ball_24x24.ico +0 -0
- data/icons/advanced.ico +0 -0
- data/icons/advanced_16x16.ico +0 -0
- data/icons/advanced_24x24.ico +0 -0
- data/icons/applications.ico +0 -0
- data/icons/applications_16x16.ico +0 -0
- data/icons/applications_24x24.ico +0 -0
- data/icons/browser_16x16.ico +0 -0
- data/icons/browser_24x24.ico +0 -0
- data/icons/burn.ico +0 -0
- data/icons/burn_16x16.ico +0 -0
- data/icons/burn_24x24.ico +0 -0
- data/icons/calculator.ico +0 -0
- data/icons/calculator_24x24.ico +0 -0
- data/icons/cb_checked.ico +0 -0
- data/icons/cb_checked_orange.ico +0 -0
- data/icons/cb_unchecked.ico +0 -0
- data/icons/coin_24x24.ico +0 -0
- data/icons/conversation.ico +0 -0
- data/icons/conversation_24x24.ico +0 -0
- data/icons/engine.ico +0 -0
- data/icons/filter.ico +0 -0
- data/icons/folder.ico +0 -0
- data/icons/folder_16x16.ico +0 -0
- data/icons/fuzzer_16x16.ico +0 -0
- data/icons/fuzzer_24x24.ico +0 -0
- data/icons/go-down_16x16.png +0 -0
- data/icons/go-up_16x16.png +0 -0
- data/icons/help.ico +0 -0
- data/icons/help_16x16.ico +0 -0
- data/icons/help_24x24.ico +0 -0
- data/icons/iChat.ico +0 -0
- data/icons/iChat_16x16.ico +0 -0
- data/icons/iChat_24x24.ico +0 -0
- data/icons/icons.txt +3 -0
- data/icons/info.ico +0 -0
- data/icons/info_16x16.ico +0 -0
- data/icons/info_24x24.ico +0 -0
- data/icons/interceptor_24x24.ico +0 -0
- data/icons/lock.ico +0 -0
- data/icons/lock_12x12.ico +0 -0
- data/icons/lock_16x16.ico +0 -0
- data/icons/monitor.ico +0 -0
- data/icons/plugin.ico +0 -0
- data/icons/plugin_24x24.ico +0 -0
- data/icons/scan_16x16.png +0 -0
- data/icons/send.ico +0 -0
- data/icons/server.ico +0 -0
- data/icons/server_16x16.ico +0 -0
- data/icons/siberas_logo_x24.gif +0 -0
- data/icons/tag_blue_32x32.ico +0 -0
- data/icons/watobo-48x48.png +0 -0
- data/icons/watobo-logo.png +0 -0
- data/icons/watobo.ico +0 -0
- data/lib/watobo/adapters/data_store.rb +38 -0
- data/lib/watobo/adapters/file/file_store.rb +211 -0
- data/lib/watobo/adapters/session_store.rb +27 -0
- data/lib/watobo/adapters.rb +26 -0
- data/lib/watobo/config.rb +143 -0
- data/lib/watobo/constants.rb +92 -0
- data/lib/watobo/core/active_check.rb +404 -0
- data/lib/watobo/core/cookie.rb +69 -0
- data/lib/watobo/core/fuzz_gen.rb +160 -0
- data/lib/watobo/core/http_socket.rb +142 -0
- data/lib/watobo/core/interceptor.rb +729 -0
- data/lib/watobo/core/passive_check.rb +141 -0
- data/lib/watobo/core/project.rb +1058 -0
- data/lib/watobo/core/scanner.rb +396 -0
- data/lib/watobo/core/session.rb +1320 -0
- data/lib/watobo/core/simple_ca.rb +393 -0
- data/lib/watobo/core.rb +34 -0
- data/lib/watobo/defaults.rb +40 -0
- data/lib/watobo/external/diff/lcs/array.rb +42 -0
- data/lib/watobo/external/diff/lcs/block.rb +72 -0
- data/lib/watobo/external/diff/lcs/callbacks.rb +343 -0
- data/lib/watobo/external/diff/lcs/change.rb +190 -0
- data/lib/watobo/external/diff/lcs/hunk.rb +279 -0
- data/lib/watobo/external/diff/lcs/ldiff.rb +247 -0
- data/lib/watobo/external/diff/lcs/string.rb +40 -0
- data/lib/watobo/external/diff/lcs.rb +1124 -0
- data/lib/watobo/external/ntlm/ntlm.rb +797 -0
- data/lib/watobo/externals.rb +28 -0
- data/lib/watobo/framework/create_project.rb +55 -0
- data/lib/watobo/framework/init.rb +149 -0
- data/lib/watobo/framework/init_modules.rb +116 -0
- data/lib/watobo/framework/license_text.rb +50 -0
- data/lib/watobo/framework.rb +26 -0
- data/lib/watobo/gui/about_watobo.rb +68 -0
- data/lib/watobo/gui/browser_preview.rb +460 -0
- data/lib/watobo/gui/certificate_dialog.rb +132 -0
- data/lib/watobo/gui/chat_diff.rb +415 -0
- data/lib/watobo/gui/chatviewer_frame.rb +427 -0
- data/lib/watobo/gui/checkboxtree.rb +221 -0
- data/lib/watobo/gui/checks_policy_frame.rb +123 -0
- data/lib/watobo/gui/client_cert_dialog.rb +227 -0
- data/lib/watobo/gui/confirm_scan_dialog.rb +67 -0
- data/lib/watobo/gui/conversation_table.rb +386 -0
- data/lib/watobo/gui/conversation_table_ctrl.rb +175 -0
- data/lib/watobo/gui/csrf_token_dialog.rb +446 -0
- data/lib/watobo/gui/dashboard.rb +341 -0
- data/lib/watobo/gui/define_scope_frame.rb +380 -0
- data/lib/watobo/gui/edit_comment.rb +70 -0
- data/lib/watobo/gui/edit_scope_dialog.rb +69 -0
- data/lib/watobo/gui/finding_info.rb +212 -0
- data/lib/watobo/gui/findings_tree.rb +459 -0
- data/lib/watobo/gui/full_scan_dialog.rb +269 -0
- data/lib/watobo/gui/fuzzer_gui.rb +1522 -0
- data/lib/watobo/gui/hex_viewer.rb +106 -0
- data/lib/watobo/gui/interceptor_gui.rb +994 -0
- data/lib/watobo/gui/interceptor_settings_dialog.rb +201 -0
- data/lib/watobo/gui/log_viewer.rb +97 -0
- data/lib/watobo/gui/login_wizzard.rb +301 -0
- data/lib/watobo/gui/main_window.rb +1815 -0
- data/lib/watobo/gui/manual_request_editor.rb +1105 -0
- data/lib/watobo/gui/master_pw_dialog.rb +142 -0
- data/lib/watobo/gui/password_policy_dialog.rb +98 -0
- data/lib/watobo/gui/plugin/base.rb +82 -0
- data/lib/watobo/gui/plugin_board.rb +95 -0
- data/lib/watobo/gui/preferences_dialog.rb +116 -0
- data/lib/watobo/gui/progress_window.rb +102 -0
- data/lib/watobo/gui/project_wizzard.rb +369 -0
- data/lib/watobo/gui/proxy_dialog.rb +550 -0
- data/lib/watobo/gui/quick_scan_dialog.rb +242 -0
- data/lib/watobo/gui/request_editor.rb +480 -0
- data/lib/watobo/gui/save_chat_dialog.rb +158 -0
- data/lib/watobo/gui/scanner_settings_dialog.rb +360 -0
- data/lib/watobo/gui/select_chat_dialog.rb +169 -0
- data/lib/watobo/gui/session_management_dialog.rb +688 -0
- data/lib/watobo/gui/sites_tree.rb +347 -0
- data/lib/watobo/gui/status_bar.rb +88 -0
- data/lib/watobo/gui/table_editor.rb +445 -0
- data/lib/watobo/gui/tagless_viewer.rb +62 -0
- data/lib/watobo/gui/templates/plugin.rb +80 -0
- data/lib/watobo/gui/templates/plugin2.rb +103 -0
- data/lib/watobo/gui/text_viewer.rb +247 -0
- data/lib/watobo/gui/transcoder_window.rb +215 -0
- data/lib/watobo/gui/utils/gui_utils.rb +129 -0
- data/lib/watobo/gui/utils/init_icons.rb +106 -0
- data/lib/watobo/gui/utils/load_icons.rb +54 -0
- data/lib/watobo/gui/utils/load_plugins.rb +94 -0
- data/lib/watobo/gui/utils/master_password.rb +90 -0
- data/lib/watobo/gui/utils/save_default_settings.rb +99 -0
- data/lib/watobo/gui/utils/save_project_settings.rb +21 -0
- data/lib/watobo/gui/utils/save_proxy_settings.rb +45 -0
- data/lib/watobo/gui/utils/save_session_settings.rb +21 -0
- data/lib/watobo/gui/utils/session_history.rb +134 -0
- data/lib/watobo/gui/workspace_dialog.rb +89 -0
- data/lib/watobo/gui/www_auth_dialog.rb +348 -0
- data/lib/watobo/gui/xml_viewer_frame.rb +114 -0
- data/lib/watobo/gui.rb +139 -0
- data/lib/watobo/mixins/httpparser.rb +664 -0
- data/lib/watobo/mixins/request_parser.rb +210 -0
- data/lib/watobo/mixins/shapers.rb +345 -0
- data/lib/watobo/mixins/transcoders.rb +88 -0
- data/lib/watobo/mixins.rb +32 -0
- data/lib/watobo/utils/check_regex.rb +36 -0
- data/lib/watobo/utils/copy_object.rb +29 -0
- data/lib/watobo/utils/crypto.rb +74 -0
- data/lib/watobo/utils/expand_range.rb +45 -0
- data/lib/watobo/utils/file_management.rb +73 -0
- data/lib/watobo/utils/load_chat.rb +219 -0
- data/lib/watobo/utils/load_icon.rb +47 -0
- data/lib/watobo/utils/print_debug.rb +34 -0
- data/lib/watobo/utils/response_hash.rb +143 -0
- data/lib/watobo/utils/secure_eval.rb +57 -0
- data/lib/watobo/utils/text2request.rb +96 -0
- data/lib/watobo/utils.rb +32 -0
- data/lib/watobo.rb +76 -0
- data/modules/active/Apache/mod_status.rb +123 -0
- data/modules/active/Flash/crossdomain.rb +102 -0
- data/modules/active/directories/dirwalker.rb +89 -0
- data/modules/active/discovery/fileextensions.rb +151 -0
- data/modules/active/discovery/http_methods.rb +135 -0
- data/modules/active/domino/domino_db.lst +164 -0
- data/modules/active/domino/domino_db.rb +128 -0
- data/modules/active/fileinclusion/lfi_simple.rb +134 -0
- data/modules/active/jboss/jboss_basic.rb +119 -0
- data/modules/active/sap/business_objects.rb +73 -0
- data/modules/active/sap/its_commands.rb +101 -0
- data/modules/active/sap/its_service_parameter.rb +105 -0
- data/modules/active/sap/its_services.rb +103 -0
- data/modules/active/sap/its_xss.rb +98 -0
- data/modules/active/sqlinjection/sql_boolean.rb +262 -0
- data/modules/active/sqlinjection/sqli_simple.rb +205 -0
- data/modules/active/xss/xss_simple.rb +179 -0
- data/modules/passive/cookie_options.rb +97 -0
- data/modules/passive/cookie_xss.rb +85 -0
- data/modules/passive/detect_code.rb +89 -0
- data/modules/passive/detect_fileupload.rb +80 -0
- data/modules/passive/detect_infrastructure.rb +98 -0
- data/modules/passive/detect_one_time_tokens.rb +86 -0
- data/modules/passive/dirindexing.rb +81 -0
- data/modules/passive/disclosure_emails.rb +82 -0
- data/modules/passive/disclosure_ipaddr.rb +87 -0
- data/modules/passive/filename_as_parameter.rb +85 -0
- data/modules/passive/form_spotter.rb +75 -0
- data/modules/passive/hotspots.rb +86 -0
- data/modules/passive/in_script_parameter.rb +92 -0
- data/modules/passive/multiple_server_headers.rb +98 -0
- data/modules/passive/possible_login.rb +134 -0
- data/modules/passive/redirect_url.rb +88 -0
- data/modules/passive/redirectionz.rb +96 -0
- data/modules/passive/xss_dom.rb +91 -0
- data/plugins/catalog/catalog.ico +0 -0
- data/plugins/catalog/catalog.rb +726 -0
- data/plugins/catalog/db_tests +6483 -0
- data/plugins/catalog/db_variables +29 -0
- data/plugins/filefinder/dbs/hbci.db +12 -0
- data/plugins/filefinder/filefinder.rb +602 -0
- data/plugins/sslchecker/cli/sslchecker_cli.rb +21 -0
- data/plugins/sslchecker/gui/cipher_table.rb +260 -0
- data/plugins/sslchecker/gui/gui.rb +245 -0
- data/plugins/sslchecker/gui/sslchecker.rb +26 -0
- data/plugins/sslchecker/icons/green_16x16.ico +0 -0
- data/plugins/sslchecker/icons/grey_16x16.ico +0 -0
- data/plugins/sslchecker/icons/red_16x16.ico +0 -0
- data/plugins/sslchecker/icons/sslchecker.ico +0 -0
- data/plugins/sslchecker/lib/check.rb +117 -0
- metadata +317 -0
|
@@ -0,0 +1,1815 @@
|
|
|
1
|
+
# .
|
|
2
|
+
# main_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
|
+
####################################################################################################################
|
|
25
|
+
# M A I N A P P L I C A T I O N W I N D O W
|
|
26
|
+
#
|
|
27
|
+
class MainWindow < FXMainWindow
|
|
28
|
+
|
|
29
|
+
include Watobo
|
|
30
|
+
include Watobo::Gui
|
|
31
|
+
include Watobo::Constants
|
|
32
|
+
include Watobo::Gui::Icons
|
|
33
|
+
|
|
34
|
+
attr :interceptor
|
|
35
|
+
attr :default_settings
|
|
36
|
+
attr :watobo_base
|
|
37
|
+
attr :active_project
|
|
38
|
+
attr :iproxy
|
|
39
|
+
|
|
40
|
+
def open_manual_request_editor(chat)
|
|
41
|
+
begin
|
|
42
|
+
mrtk = ManualRequestEditor.new(FXApp.instance, @active_project, chat)
|
|
43
|
+
|
|
44
|
+
mrtk.create
|
|
45
|
+
|
|
46
|
+
mrtk.subscribe(:show_browser_preview) { |request, response|
|
|
47
|
+
openBrowser(request, response)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
mrtk.subscribe(:new_chat) { |c|
|
|
51
|
+
@active_project.addChat(c)
|
|
52
|
+
}
|
|
53
|
+
mrtk.show(Fox::PLACEMENT_SCREEN)
|
|
54
|
+
rescue => bang
|
|
55
|
+
puts "!!! could not open manual request"
|
|
56
|
+
puts bang
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
private
|
|
61
|
+
|
|
62
|
+
def add_queue_timer(ms)
|
|
63
|
+
@update_timer = FXApp.instance.addTimeout( ms, :repeat => true) {
|
|
64
|
+
@finding_lock.synchronize do
|
|
65
|
+
@finding_queue.each do |f|
|
|
66
|
+
addFinding(f)
|
|
67
|
+
end
|
|
68
|
+
@finding_queue.clear
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
@chat_lock.synchronize do
|
|
72
|
+
@chat_queue.each do |c|
|
|
73
|
+
addChat(c)
|
|
74
|
+
end
|
|
75
|
+
@chat_queue.clear
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
@status_lock.synchronize do
|
|
79
|
+
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
#def loadDefaultS
|
|
87
|
+
def saveDefaultSettings_UNUSED(update_settings={})
|
|
88
|
+
|
|
89
|
+
=begin
|
|
90
|
+
settings= Hash.new
|
|
91
|
+
[:password_policy, :history, :interceptor, :forwarding_proxy].each do |k|
|
|
92
|
+
settings[k] = @settings[k]
|
|
93
|
+
settings[k] = update_settings[k] if update_settings.has_key?(k)
|
|
94
|
+
end
|
|
95
|
+
# clean up few settings
|
|
96
|
+
settings[:forwarding_proxy].delete :name
|
|
97
|
+
|
|
98
|
+
settings[:general] = {
|
|
99
|
+
:working_directory => @settings[:general][:working_directory],
|
|
100
|
+
:workspace_path => @settings[:general][:workspace_path]
|
|
101
|
+
}
|
|
102
|
+
# puts YAML.dump(settings[:forwarding_proxy])
|
|
103
|
+
# check for proxy credentials
|
|
104
|
+
proxy_has_credentials = false
|
|
105
|
+
|
|
106
|
+
settings[:forwarding_proxy].each_key do |p|
|
|
107
|
+
next if p == :default_proxy
|
|
108
|
+
proxy = settings[:forwarding_proxy][p]
|
|
109
|
+
|
|
110
|
+
if proxy.has_key? :credentials
|
|
111
|
+
unless proxy[:password] == ''
|
|
112
|
+
# puts " - proxy #{p} has password #{proxy_list[p][:credentials][:password]}"
|
|
113
|
+
proxy_has_credentials = true
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if proxy_has_credentials == true
|
|
119
|
+
if @settings[:password_policy][:save_passwords] == true
|
|
120
|
+
if @settings[:password_policy][:save_without_master] == false
|
|
121
|
+
if @settings[:master_password].empty?
|
|
122
|
+
puts "* need master password for proxy"
|
|
123
|
+
dlg = MasterPWDialog.new(self)
|
|
124
|
+
if dlg.execute != 0
|
|
125
|
+
@settings[:master_password] = dlg.masterPassword
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
unless @settings[:master_password].empty?
|
|
129
|
+
settings[:forwarding_proxy].each_key do |p|
|
|
130
|
+
#creds = settings[:forwarding_proxy][p][:credentials]
|
|
131
|
+
#pass = "$$WPE$$" + creds[:password]
|
|
132
|
+
pass = settings[:forwarding_proxy][p][:password]
|
|
133
|
+
unless pass.empty?
|
|
134
|
+
creds[:password] = Crypto.encryptPassword(pass, @settings[:master_password])
|
|
135
|
+
creds[:encrypted] = true
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
else
|
|
139
|
+
cleanCredentials(settings)
|
|
140
|
+
FXMessageBox.information(self,MBOX_OK,"No MasterPassword", "Could not encrypt proxy passwords. No Passwords have been saved!")
|
|
141
|
+
end
|
|
142
|
+
else
|
|
143
|
+
puts "* saving passwords without protection!!!!"
|
|
144
|
+
end
|
|
145
|
+
else
|
|
146
|
+
cleanCredentials(settings)
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# puts "=== DEFAULT SETTINGS PASSWORD POLICY"
|
|
151
|
+
# puts YAML.dump(settings)
|
|
152
|
+
Watobo::Utils.save_settings(@default_settings_file, settings )
|
|
153
|
+
=end
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
def saveSessionSettings(project=nil)
|
|
157
|
+
return
|
|
158
|
+
puts "- saveSessionSettings -"
|
|
159
|
+
ss = YAML.load(YAML.dump(project.settings))
|
|
160
|
+
unless project.nil?
|
|
161
|
+
puts "* saving session settings to #{project.sessionSettingsFile}"
|
|
162
|
+
settings = Hash.new
|
|
163
|
+
[:logout_signatures, :non_unique_parms, :login_chat_ids, :excluded_chats, :project_name, :session_name, :csrf_request_ids ].each do |k|
|
|
164
|
+
settings[k] = Hash.new
|
|
165
|
+
settings[k] = ss[k] if ss.has_key?(k)
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
Watobo::Utils.save_settings(project.sessionSettingsFile, settings)
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
def saveProjectSettings(project=nil)
|
|
173
|
+
return
|
|
174
|
+
unless project.nil?
|
|
175
|
+
ps = YAML.load(YAML.dump(project.scan_settings))
|
|
176
|
+
settings = { :scanner => Hash.new }
|
|
177
|
+
[:policy, :scope, :www_auth ].each do |k|
|
|
178
|
+
settings[:scanner][k] = Hash.new
|
|
179
|
+
settings[:scanner][k].update ps[k] if ps.has_key?(k)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
settings[:scanner][:custom_error_patterns] = ps[:custom_error_patterns]
|
|
183
|
+
settings[:scanner][:csrf_patterns] = ps[:csrf_patterns] unless ps[:csrf_patterns].nil?
|
|
184
|
+
|
|
185
|
+
# remove proxy list because they are stored in the default settings
|
|
186
|
+
settings[:forwarding_proxy] = project.forward_proxy_settings
|
|
187
|
+
|
|
188
|
+
settings[:project_name] = project.project_name
|
|
189
|
+
# puts "==== WWW AUTH ==="
|
|
190
|
+
# puts YAML.dump( settings[:www_auth] )
|
|
191
|
+
|
|
192
|
+
# puts "=== PASSWORD POLICY ==="
|
|
193
|
+
# puts YAML.dump(@settings[:password_policy])
|
|
194
|
+
#if master_password_required?
|
|
195
|
+
password_set = false
|
|
196
|
+
settings[:www_auth].each_key do |p|
|
|
197
|
+
if settings[:www_auth][p].has_key? :password
|
|
198
|
+
password_set = true unless settings[:www_auth][p][:password] == ''
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
if @settings[:password_policy][:save_passwords] == true
|
|
202
|
+
unless settings[:www_auth].empty?
|
|
203
|
+
if @settings[:password_policy][:save_without_master] == false
|
|
204
|
+
if password_set and @settings[:master_password].empty?
|
|
205
|
+
puts "* need master password for server auth encryption"
|
|
206
|
+
dlg = MasterPWDialog.new(self)
|
|
207
|
+
if dlg.execute != 0
|
|
208
|
+
@settings[:master_password] = dlg.masterPassword
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
unless @settings[:master_password].empty?
|
|
212
|
+
settings[:www_auth].each_key do |p|
|
|
213
|
+
creds = settings[:www_auth][p]
|
|
214
|
+
#pass = "$$WPE$$" + creds[:password]
|
|
215
|
+
pass = creds[:password]
|
|
216
|
+
if pass != ''
|
|
217
|
+
creds[:password] = Crypto.encryptPassword(pass, @settings[:master_password])
|
|
218
|
+
creds[:encrypted] = true
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
else
|
|
222
|
+
cleanCredentials(settings)
|
|
223
|
+
FXMessageBox.information(self,MBOX_OK,"No MasterPassword", "Could not encrypt www_auth passwords. No Passwords have been saved!")
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
else
|
|
227
|
+
puts "* saving passwords without protection!!!!"
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
else
|
|
231
|
+
cleanCredentials(settings)
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# puts "* saving www_auth settings ..."
|
|
235
|
+
# puts YAML.dump( settings[:www_auth])
|
|
236
|
+
Watobo::Utils.save_settings(project.projectSettingsFile, settings)
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
def update_conversation_table(project)
|
|
241
|
+
@chatTable.showConversation(project.chats)
|
|
242
|
+
@chatTable.apply_filter()
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
#
|
|
246
|
+
# SHOW CHAT
|
|
247
|
+
#
|
|
248
|
+
def showChat(chat)
|
|
249
|
+
@last_chat = chat
|
|
250
|
+
@mre_button.enabled = true
|
|
251
|
+
@fuzz_button.enabled = true
|
|
252
|
+
@bv_button.enabled = true
|
|
253
|
+
|
|
254
|
+
@request_viewer.setText(chat.request)
|
|
255
|
+
@last_request = chat.request
|
|
256
|
+
@response_viewer.setText(chat.response)
|
|
257
|
+
@last_response = chat.response
|
|
258
|
+
@switcher.current=0
|
|
259
|
+
@lastViewed = chat
|
|
260
|
+
src = case chat.source
|
|
261
|
+
when CHAT_SOURCE_INTERCEPT
|
|
262
|
+
"Interceptor"
|
|
263
|
+
when CHAT_SOURCE_PROXY
|
|
264
|
+
"Proxy"
|
|
265
|
+
when CHAT_SOURCE_MANUAL
|
|
266
|
+
"Manual"
|
|
267
|
+
when CHAT_SOURCE_FUZZER
|
|
268
|
+
"Fuzzer"
|
|
269
|
+
end
|
|
270
|
+
@quickViewTitle.text = "Chat-ID: #{chat.id} (#{src})"
|
|
271
|
+
@quickViewSubTitle.text = ""
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
#
|
|
275
|
+
# SHOW VULN
|
|
276
|
+
#
|
|
277
|
+
def showVulnerability(vuln)
|
|
278
|
+
@mre_button.enabled = true
|
|
279
|
+
@fuzz_button.enabled = true
|
|
280
|
+
@bv_button.enabled = true
|
|
281
|
+
|
|
282
|
+
@chatTable.killSelection()
|
|
283
|
+
@request_viewer.setText(vuln.request)
|
|
284
|
+
@last_request = vuln.request
|
|
285
|
+
@response_viewer.setText(vuln.response)
|
|
286
|
+
@last_response = vuln.response
|
|
287
|
+
|
|
288
|
+
@lastViewed = vuln
|
|
289
|
+
if vuln.details[:check_pattern] then
|
|
290
|
+
|
|
291
|
+
pattern = vuln.details[:check_pattern].strip
|
|
292
|
+
|
|
293
|
+
@request_viewer.highlight(pattern)
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
if vuln.details[:proof_pattern] then
|
|
297
|
+
pattern = vuln.details[:proof_pattern].strip
|
|
298
|
+
@response_viewer.highlight(pattern)
|
|
299
|
+
end
|
|
300
|
+
@switcher.current = 0
|
|
301
|
+
|
|
302
|
+
@quickViewTitle.text = "Finding: #{vuln.details[:class]}"
|
|
303
|
+
chat_id = "unknown"
|
|
304
|
+
chat_id = vuln.details[:chat_id] if vuln.details.has_key? :chat_id
|
|
305
|
+
info_text = "[Module: #{vuln.details[:module].gsub(/watobo::modules::/i,'')}] [Chat-ID: #{chat_id}]"
|
|
306
|
+
@quickViewSubTitle.text = info_text
|
|
307
|
+
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
def addFinding(finding)
|
|
311
|
+
@findings_tree.addFinding(finding)
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
def openSessionManagement(sender, sel, item)
|
|
315
|
+
smdlg = SessionManagementDialog.new(self, @active_project)
|
|
316
|
+
if smdlg.execute != 0 then
|
|
317
|
+
ids = smdlg.getLoginScriptIds()
|
|
318
|
+
sidpatterns = smdlg.getSidPatterns()
|
|
319
|
+
logout_signatures = smdlg.getLogoutSignatures()
|
|
320
|
+
if @active_project
|
|
321
|
+
@active_project.setLoginChatIds(ids)
|
|
322
|
+
@active_project.setSidPatterns(sidpatterns)
|
|
323
|
+
@active_project.setLogoutSignatures(logout_signatures)
|
|
324
|
+
end
|
|
325
|
+
# save settings
|
|
326
|
+
saveProjectSettings(@active_project)
|
|
327
|
+
saveSessionSettings(@active_project)
|
|
328
|
+
end
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
def openPreferencesDialog(sender, sel, ptr)
|
|
332
|
+
=begin
|
|
333
|
+
prefdlg = PreferencesDialog.new(self, @settings)
|
|
334
|
+
if prefdlg.execute != 0
|
|
335
|
+
ip = @settings[:interceptor]
|
|
336
|
+
if ip[:intercept_port] != prefdlg.settings[:intercept_port] then
|
|
337
|
+
FXMessageBox.information(self,MBOX_OK,"Intercept Port Changed", "Please restart WATOBO!")
|
|
338
|
+
end
|
|
339
|
+
@settings.update(prefdlg.settings)
|
|
340
|
+
puts prefdlg.settings
|
|
341
|
+
|
|
342
|
+
update_status_bar()
|
|
343
|
+
if @active_project then
|
|
344
|
+
@active_project.settings.update(@settings)
|
|
345
|
+
@active_project.saveProjectSettings()
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
end
|
|
349
|
+
=end
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
def openCADialog(sender, sel, item)
|
|
353
|
+
cadlg = CertificateDialog.new(self, @active_project)
|
|
354
|
+
if cadlg.execute != 0
|
|
355
|
+
|
|
356
|
+
end
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
def openWwwAuthDialog()
|
|
360
|
+
if @active_project.nil?
|
|
361
|
+
FXMessageBox.information(self,MBOX_OK,"No Project Defined", "Create Project First")
|
|
362
|
+
else
|
|
363
|
+
auth_settings = {}
|
|
364
|
+
w3adlg = Watobo::Gui::WwwAuthDialog.new(self, @active_project, Watobo::Conf::General.dump )
|
|
365
|
+
if w3adlg.execute != 0
|
|
366
|
+
#puts "* New WWW-Authentication"
|
|
367
|
+
#puts @active_project.getWwwAuthentication().to_yaml
|
|
368
|
+
Watobo::Conf::General.save_passwords = w3adlg.savePasswords?
|
|
369
|
+
saveProjectSettings(@active_project)
|
|
370
|
+
save_default_settings(@active_project)
|
|
371
|
+
@iproxy.www_auth = @active_project.settings[:www_auth]
|
|
372
|
+
end
|
|
373
|
+
puts "* new www_auth settings"
|
|
374
|
+
# puts YAML.dump(@active_project.settings[:www_auth])
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
def open_client_cert_dialog()
|
|
380
|
+
if @active_project.nil?
|
|
381
|
+
FXMessageBox.information(self,MBOX_OK,"No Project Defined", "Create Project First")
|
|
382
|
+
else
|
|
383
|
+
ccdlg = Watobo::Gui::ClientCertDialog.new(self, @active_project )
|
|
384
|
+
if ccdlg.execute != 0
|
|
385
|
+
#puts "* New WWW-Authentication"
|
|
386
|
+
#puts @active_project.getWwwAuthentication().to_yaml
|
|
387
|
+
@settings[:password_policy][:save_passwords] = ccdlg.savePasswords?
|
|
388
|
+
puts "* got client certificate settings"
|
|
389
|
+
puts ccdlg.client_certificates.to_yaml
|
|
390
|
+
@active_project.client_certificates = ccdlg.client_certificates
|
|
391
|
+
@iproxy.client_certificates = ccdlg.client_certificates
|
|
392
|
+
saveProjectSettings(@active_project)
|
|
393
|
+
# Watobo::Gui.save_default_settings(@active_project)
|
|
394
|
+
|
|
395
|
+
end
|
|
396
|
+
# puts YAML.dump(@active_project.settings[:www_auth])
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
def openPWPolicyDialog()
|
|
402
|
+
if @active_project.nil?
|
|
403
|
+
FXMessageBox.information(self,MBOX_OK,"No Project Defined", "Create Project First")
|
|
404
|
+
else
|
|
405
|
+
auth_settings = {}
|
|
406
|
+
dlg = Watobo::Gui::PasswordPolicyDialog.new(self, @settings[:password_policy] )
|
|
407
|
+
if dlg.execute != 0
|
|
408
|
+
@settings[:password_policy] = dlg.passwordPolicy
|
|
409
|
+
Watobo::Gui.save_default_settings(@active_project)
|
|
410
|
+
#puts "* New WWW-Authentication"
|
|
411
|
+
#puts @active_project.getWwwAuthentication().to_yaml
|
|
412
|
+
#@settings[:password_policy][:save_passwords] = w3adlg.savePasswords?
|
|
413
|
+
saveProjectSettings(@active_project)
|
|
414
|
+
#@iproxy.www_auth = @active_project.settings[:www_auth]
|
|
415
|
+
end
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
def openFuzzer(chat)
|
|
421
|
+
begin
|
|
422
|
+
fuzzer = FuzzerGui.new(FXApp.instance, @active_project, chat)
|
|
423
|
+
fuzzer.create
|
|
424
|
+
fuzzer.show(Fox::PLACEMENT_SCREEN)
|
|
425
|
+
rescue => bang
|
|
426
|
+
puts "!!! could not open fuzzer"
|
|
427
|
+
puts bang
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
def addChat(chat)
|
|
432
|
+
# addChatToTable(chat) if chatIsFiltered?(chat) == false
|
|
433
|
+
@chatTable.addChat(chat) #if chatIsFiltered?(chat) == false
|
|
434
|
+
@sites_tree.addChat(chat)
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
def showPassiveCheckStatus
|
|
438
|
+
@switcher.current=2
|
|
439
|
+
@dashboard.tabBook.current = 1
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
def showActiveCheckStatus
|
|
443
|
+
@switcher.current=2
|
|
444
|
+
@dashboard.tabBook.current = 2
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
def showDashboard(sender, sel, ptr)
|
|
448
|
+
#@switcher.current=2
|
|
449
|
+
begin
|
|
450
|
+
@switcher.setCurrent(2, true)
|
|
451
|
+
rescue
|
|
452
|
+
puts "no dashboard available yet!"
|
|
453
|
+
end
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
def showLogs(sender, sel, ptr)
|
|
457
|
+
@switcher.current=1
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
def showConversation(sender=nil, sel=nil, item=nil)
|
|
461
|
+
@switcher.current=0
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
def openBrowser(request, response)
|
|
465
|
+
begin
|
|
466
|
+
@browserView.show(request, response)
|
|
467
|
+
rescue => bang
|
|
468
|
+
puts "!!! PREVIEW PROBLEM !!"
|
|
469
|
+
puts bang
|
|
470
|
+
case bang
|
|
471
|
+
when /JSSH_CONNECT_ERROR/i
|
|
472
|
+
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.")
|
|
473
|
+
else
|
|
474
|
+
FXMessageBox.information(self, MBOX_OK, "Proxy Settings", "Your Browser does not use WATOBO (127.0.0.1:#{@iproxy.port}) as its proxy.\nSo you can't use the Browser-View feature.\nPlease change your proxy settings and try it again!")
|
|
475
|
+
end
|
|
476
|
+
end
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
def update_history(project)
|
|
480
|
+
# @settings[:history].unshift session_file if not @settings[:history].include?(session_file)
|
|
481
|
+
# @settings[:history].pop if @settings[:history].length > 5
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
def updateTreeLists()
|
|
485
|
+
@findings_tree.refresh_tree()
|
|
486
|
+
@sites_tree.refresh_tree()
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
def openTranscoder(text2transcode)
|
|
490
|
+
transcoder = TranscoderWindow.new(FXApp.instance, text2transcode)
|
|
491
|
+
transcoder.create
|
|
492
|
+
transcoder.show(Fox::PLACEMENT_SCREEN)
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
def showFindingDetails(finding)
|
|
496
|
+
#p "* show finding details"
|
|
497
|
+
@finding_info.showInfo(finding)
|
|
498
|
+
@switcher.setCurrent(3, true)
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
def onShowPlugins(sender, sel, item)
|
|
502
|
+
begin
|
|
503
|
+
@switcher.setCurrent(4, true)
|
|
504
|
+
@pluginboard.updateBoard()
|
|
505
|
+
rescue => bang
|
|
506
|
+
puts bang
|
|
507
|
+
puts bang.backtrace if $DEBUG
|
|
508
|
+
end
|
|
509
|
+
end
|
|
510
|
+
|
|
511
|
+
def useSmallIcons()
|
|
512
|
+
unless @active_project.nil?
|
|
513
|
+
@findings_tree.useSmallIcons()
|
|
514
|
+
@sites_tree.useSmallIcons()
|
|
515
|
+
# @chatTable.setNewFont( "helvetica", GUI_SMALL_FONT_SIZE)
|
|
516
|
+
@chatTable.setNewFont("Segoe UI", GUI_SMALL_FONT_SIZE)
|
|
517
|
+
@request_viewer.setFontSize(GUI_SMALL_FONT_SIZE)
|
|
518
|
+
@response_viewer.setFontSize(GUI_SMALL_FONT_SIZE)
|
|
519
|
+
else
|
|
520
|
+
end
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
def useRegularIcons()
|
|
524
|
+
unless @active_project.nil?
|
|
525
|
+
@findings_tree.useRegularIcons()
|
|
526
|
+
@sites_tree.useRegularIcons()
|
|
527
|
+
@chatTable.setNewFont("Segoe UI", GUI_REGULAR_FONT_SIZE)
|
|
528
|
+
#@chatTable.setNewFont("helvetica", GUI_REGULAR_FONT_SIZE)
|
|
529
|
+
@request_viewer.setFontSize(GUI_REGULAR_FONT_SIZE)
|
|
530
|
+
@response_viewer.setFontSize(GUI_REGULAR_FONT_SIZE)
|
|
531
|
+
else
|
|
532
|
+
end
|
|
533
|
+
end
|
|
534
|
+
|
|
535
|
+
def onOpenTranscoder(sender, sel, item)
|
|
536
|
+
|
|
537
|
+
openTranscoder(nil)
|
|
538
|
+
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
def refreshViewers()
|
|
542
|
+
@findings_tree.refresh_tree()
|
|
543
|
+
@sites_tree.refresh_tree()
|
|
544
|
+
#@chatTable.clearItems()
|
|
545
|
+
end
|
|
546
|
+
|
|
547
|
+
def onOpenInterceptor(sender, sel, ptr)
|
|
548
|
+
if @active_project then
|
|
549
|
+
interceptor = Watobo::Gui::InterceptorUI.new(self, @iproxy, :opts => DECOR_ALL)
|
|
550
|
+
iproxy.target = interceptor
|
|
551
|
+
puts "* Interceptor created"
|
|
552
|
+
#@active_project.interceptor = interceptor
|
|
553
|
+
interceptor.create
|
|
554
|
+
interceptor.show(Fox::PLACEMENT_SCREEN)
|
|
555
|
+
getApp().runModalWhileShown(interceptor)
|
|
556
|
+
interceptor.releaseAll()
|
|
557
|
+
puts "* Interceptor closed"
|
|
558
|
+
iproxy.target = nil
|
|
559
|
+
#if interceptor.execute != 0 then
|
|
560
|
+
# puts "interceptor finished"
|
|
561
|
+
#end
|
|
562
|
+
else
|
|
563
|
+
|
|
564
|
+
FXMessageBox.information(self,MBOX_OK,"No Project Defined", "Create Project First")
|
|
565
|
+
end
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
def update_status_bar(project)
|
|
569
|
+
@statusBar.projectName = project.projectName
|
|
570
|
+
@statusBar.sessionName = project.sessionName
|
|
571
|
+
@statusBar.portNumber = Watobo::Conf::Interceptor.port.to_s
|
|
572
|
+
@statusBar.forwardingProxy = "-"
|
|
573
|
+
proxy = project.getCurrentProxy()
|
|
574
|
+
unless proxy.nil?
|
|
575
|
+
@statusBar.forwardingProxy = "#{proxy[:name]} (#{proxy[:host]}:#{proxy[:port]})"
|
|
576
|
+
end
|
|
577
|
+
@statusBar.statusInfoText = "Ready"
|
|
578
|
+
@scan_button.enable
|
|
579
|
+
@dashboard.updateProjectInfo(project)
|
|
580
|
+
end
|
|
581
|
+
|
|
582
|
+
def setupProgressWindow(title, numTotal)
|
|
583
|
+
@progressWindow = Watobo::Gui::ProgressWindow.new(self, title, numTotal)
|
|
584
|
+
|
|
585
|
+
@progressWindow.create
|
|
586
|
+
@progressWindow.show(PLACEMENT_SCREEN)
|
|
587
|
+
# getApp().runModalWhileShown(@progressWindow)
|
|
588
|
+
return @progressWindow
|
|
589
|
+
|
|
590
|
+
end
|
|
591
|
+
|
|
592
|
+
def closeProgressWindow
|
|
593
|
+
# getApp().stopModal()
|
|
594
|
+
@progressWindow.finished
|
|
595
|
+
end
|
|
596
|
+
|
|
597
|
+
def disableFileMenu
|
|
598
|
+
@file_new_menu.enabled = false
|
|
599
|
+
@file_history.disable
|
|
600
|
+
@new_project_button.disable
|
|
601
|
+
end
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
def closeProject()
|
|
606
|
+
@active_project = nil
|
|
607
|
+
@findings_tree.clearItems()
|
|
608
|
+
@sites_tree.clearItems()
|
|
609
|
+
@chatTable.clearItems()
|
|
610
|
+
@request_viewer.setText('')
|
|
611
|
+
@response_viewer.setText('')
|
|
612
|
+
@lastViewed = nil
|
|
613
|
+
@last_request = nil
|
|
614
|
+
@last_response = nil
|
|
615
|
+
@iproxy.stop if @iproxy
|
|
616
|
+
|
|
617
|
+
end
|
|
618
|
+
|
|
619
|
+
#
|
|
620
|
+
# onNewProject
|
|
621
|
+
#
|
|
622
|
+
def onNewProject(sender,sel,ptr)
|
|
623
|
+
|
|
624
|
+
if @active_project then
|
|
625
|
+
response = FXMessageBox.question(self, MBOX_YES_NO, "New Project", "This will close the actual project!\nAre you sure?")
|
|
626
|
+
return 0 if not response == MBOX_CLICKED_YES
|
|
627
|
+
# clear old project
|
|
628
|
+
closeProject()
|
|
629
|
+
# stop interceptor
|
|
630
|
+
end
|
|
631
|
+
|
|
632
|
+
puts "* Open Project Wizzard (#{Watobo::Conf::General.workspace_path})" if $DEBUG
|
|
633
|
+
newProjectWizzard = Watobo::Gui::NewProjectWizzard.new(self, Watobo::Conf::General.workspace_path )
|
|
634
|
+
if newProjectWizzard.execute != 0
|
|
635
|
+
# prepare project settings
|
|
636
|
+
new_project_settings = {
|
|
637
|
+
:project_path => newProjectWizzard.selected_project_path,
|
|
638
|
+
:session_path => newProjectWizzard.selected_session_path,
|
|
639
|
+
:project_name => newProjectWizzard.project_name,
|
|
640
|
+
:session_name => newProjectWizzard.session_name
|
|
641
|
+
}
|
|
642
|
+
# @settings[:general][:workspace_path] = newProjectWizzard.workspace_dir
|
|
643
|
+
Watobo.workspace_path = newProjectWizzard.workspace_dir
|
|
644
|
+
|
|
645
|
+
project = Watobo.create_project(:project_name => newProjectWizzard.project_name, :session_name => newProjectWizzard.session_name)
|
|
646
|
+
|
|
647
|
+
startProject(project)
|
|
648
|
+
|
|
649
|
+
Watobo::Gui.history.add_entry(:project_name => new_project_settings[:project_name], :session_name => new_project_settings[:session_name])
|
|
650
|
+
Watobo::Gui.save_default_settings project
|
|
651
|
+
puts Watobo::Gui.active_project.class
|
|
652
|
+
end
|
|
653
|
+
|
|
654
|
+
end
|
|
655
|
+
|
|
656
|
+
def startProject(project)
|
|
657
|
+
|
|
658
|
+
return false unless project.is_a? Project
|
|
659
|
+
|
|
660
|
+
puts "DEBUG: starting project" if $DEBUG
|
|
661
|
+
@active_project = project
|
|
662
|
+
|
|
663
|
+
subscribeProject(@active_project)
|
|
664
|
+
|
|
665
|
+
@active_project.subscribe(:update_progress){ |up|
|
|
666
|
+
begin
|
|
667
|
+
@progress_window.update_progress(up)
|
|
668
|
+
rescue => bang
|
|
669
|
+
puts bang
|
|
670
|
+
end
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
@progress_window.title = "Start Project"
|
|
674
|
+
@progress_window.show(PLACEMENT_OWNER)
|
|
675
|
+
@chatTable.hide
|
|
676
|
+
@sites_tree.hide
|
|
677
|
+
@findings_tree.hide
|
|
678
|
+
#TODO: Disable Menu
|
|
679
|
+
|
|
680
|
+
Thread.new{
|
|
681
|
+
begin
|
|
682
|
+
print "\n* setting up project ..."
|
|
683
|
+
@active_project.setupProject()
|
|
684
|
+
print "[OK]\n"
|
|
685
|
+
|
|
686
|
+
#puts "= SETTINGS ="
|
|
687
|
+
#puts @settings.to_yaml
|
|
688
|
+
@iproxy = Watobo::InterceptProxy.new()
|
|
689
|
+
@iproxy.subscribe(:new_interception) { |chat|
|
|
690
|
+
Thread.new(chat) { |c|
|
|
691
|
+
@active_project.addChat(c)
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
@iproxy.run()
|
|
695
|
+
puts "DEBUG: Proxy running" if $DEBUG
|
|
696
|
+
# puts "* set www_auth for interceptor"
|
|
697
|
+
# puts YAML.dump(@active_project.settings[:www_auth])
|
|
698
|
+
@iproxy.www_auth = @active_project.settings[:www_auth]
|
|
699
|
+
|
|
700
|
+
@browserView = BrowserPreview.new(@iproxy)
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
Watobo::Gui.clear_plugins
|
|
704
|
+
Watobo::Gui::Utils.load_plugins(@active_project)
|
|
705
|
+
# saveProjectSettings(@active_project)
|
|
706
|
+
# saveSessionSettings(@active_project)
|
|
707
|
+
|
|
708
|
+
@sites_tree.project = @active_project
|
|
709
|
+
@findings_tree.project = @active_project
|
|
710
|
+
Watobo::Gui.active_project = @active_project
|
|
711
|
+
puts "* finished, closing progress window" if $DEBUG
|
|
712
|
+
|
|
713
|
+
rescue => bang
|
|
714
|
+
# puts "!!! Could not create project"
|
|
715
|
+
puts bang
|
|
716
|
+
puts bang.backtrace if $DEBUG
|
|
717
|
+
puts "!!! Could not create project :("
|
|
718
|
+
ensure
|
|
719
|
+
puts "* stop modal mode" if $DEBUG
|
|
720
|
+
getApp.stopModal
|
|
721
|
+
|
|
722
|
+
end
|
|
723
|
+
|
|
724
|
+
}
|
|
725
|
+
getApp().runModal
|
|
726
|
+
# puts "* finished modal mode"
|
|
727
|
+
update_conversation_table(@active_project)
|
|
728
|
+
|
|
729
|
+
update_status_bar(@active_project)
|
|
730
|
+
@progress_window.hide
|
|
731
|
+
@chatTable.show
|
|
732
|
+
@sites_tree.show
|
|
733
|
+
@findings_tree.show
|
|
734
|
+
end
|
|
735
|
+
|
|
736
|
+
def decryptPassword(enc_pw=nil, dlg_titel="Encrypted Password")
|
|
737
|
+
bad_pass_count = 0
|
|
738
|
+
dlg_canceled = false
|
|
739
|
+
dec_pw = nil
|
|
740
|
+
while bad_pass_count < 3 and dlg_canceled == false and dec_pw.nil?
|
|
741
|
+
if @settings[:master_password].empty?
|
|
742
|
+
note = ""
|
|
743
|
+
message = case bad_pass_count
|
|
744
|
+
when 1
|
|
745
|
+
"Bad Password!!!\n"
|
|
746
|
+
when 2
|
|
747
|
+
"Wrong Password Again? Next time WATOBO will continue without loading stored passwords.\n"
|
|
748
|
+
else
|
|
749
|
+
"Please provide the master-password to decrypt passwords.\n"
|
|
750
|
+
end
|
|
751
|
+
message << "If you hit 'cancel' the passwords will be deleted!\nYou can disable master-password in the settings menu.\nThe latter is not recommended!"
|
|
752
|
+
dlg = MasterPWDialog.new(self, dlg_titel, :info => message, :retype => false)
|
|
753
|
+
if dlg.execute != 0
|
|
754
|
+
master_pass = dlg.master_password
|
|
755
|
+
begin
|
|
756
|
+
dec_pw = Crypto.decryptPassword(enc_pw, master_pass)
|
|
757
|
+
@settings[:master_password] = master_pass
|
|
758
|
+
rescue => bang
|
|
759
|
+
puts "! wrong password"
|
|
760
|
+
@settings[:master_password] = ''
|
|
761
|
+
bad_pass_count += 1
|
|
762
|
+
#FXMessageBox.information(self,MBOX_OK,"Wrong Password!", "Could not decrypt proxy passwords. Check proxy settings!")
|
|
763
|
+
end
|
|
764
|
+
else
|
|
765
|
+
dlg_canceled = true
|
|
766
|
+
@settings[:master_password] = ''
|
|
767
|
+
end
|
|
768
|
+
else
|
|
769
|
+
begin
|
|
770
|
+
dec_pw = Crypto.decryptPassword(enc_pw, @settings[:master_password])
|
|
771
|
+
# @settings[:master_password] = master_pass
|
|
772
|
+
rescue => bang
|
|
773
|
+
@settings[:master_password] = ''
|
|
774
|
+
#FXMessageBox.information(self,MBOX_OK,"Wrong Password!", "Could not decrypt proxy passwords. Check proxy settings!")
|
|
775
|
+
end
|
|
776
|
+
end
|
|
777
|
+
end
|
|
778
|
+
dec_pw
|
|
779
|
+
end
|
|
780
|
+
|
|
781
|
+
def decryptCredentials(settings)
|
|
782
|
+
# now check credentials
|
|
783
|
+
decrypt_failed = false
|
|
784
|
+
|
|
785
|
+
# puts "=== Check Credentials ==="
|
|
786
|
+
if settings.has_key? :forwarding_proxy
|
|
787
|
+
|
|
788
|
+
settings[:forwarding_proxy].each_key do |k|
|
|
789
|
+
next if k == :default_proxy
|
|
790
|
+
proxy = settings[:forwarding_proxy][k]
|
|
791
|
+
proxy[:password] = '' unless proxy.has_key? :password
|
|
792
|
+
proxy[:encrypted] = false unless proxy.has_key? :encrypted
|
|
793
|
+
if proxy[:password] != '' and proxy[:encrypted] == true
|
|
794
|
+
unless decrypt_failed
|
|
795
|
+
# puts "* decrypting password for proxy #{proxies[k][:host]}"
|
|
796
|
+
dp = decryptPassword(proxy[:password], "Decrypt Proxy Passwords")
|
|
797
|
+
unless dp.nil?
|
|
798
|
+
proxy[:password] = dp
|
|
799
|
+
proxy[:encrypted] = false
|
|
800
|
+
else
|
|
801
|
+
proxy[:password] = ''
|
|
802
|
+
proxy[:encrypted] = false
|
|
803
|
+
decrypt_failed = true
|
|
804
|
+
FXMessageBox.information(self,MBOX_OK,"Wrong Master Password!", "Could not decrypt passwords. Please reconfigure proxy passwords!")
|
|
805
|
+
end
|
|
806
|
+
else
|
|
807
|
+
proxy[:password] = ''
|
|
808
|
+
proxy[:encrypted] = false
|
|
809
|
+
end
|
|
810
|
+
end
|
|
811
|
+
end
|
|
812
|
+
end
|
|
813
|
+
|
|
814
|
+
unless settings[:www_auth].nil?
|
|
815
|
+
|
|
816
|
+
settings[:www_auth].each_key do |wa|
|
|
817
|
+
|
|
818
|
+
if settings[:www_auth][wa][:encrypted] == true
|
|
819
|
+
creds = settings[:www_auth][wa]
|
|
820
|
+
unless decrypt_failed
|
|
821
|
+
dp = decryptPassword(creds[:password], "Decrypt Server Password")
|
|
822
|
+
unless dp.nil?
|
|
823
|
+
creds[:password] = dp
|
|
824
|
+
creds[:encrypted] = false
|
|
825
|
+
else
|
|
826
|
+
creds[:password] = ''
|
|
827
|
+
creds[:encrypted] = false
|
|
828
|
+
decrypt_failed = true
|
|
829
|
+
FXMessageBox.information(self,MBOX_OK,"Wrong Master Password!", "Could not decrypt passwords. Please reconfigure server passwords!")
|
|
830
|
+
end
|
|
831
|
+
else
|
|
832
|
+
creds[:password] = ''
|
|
833
|
+
creds[:encrypted] = false
|
|
834
|
+
end
|
|
835
|
+
|
|
836
|
+
end
|
|
837
|
+
end
|
|
838
|
+
end
|
|
839
|
+
|
|
840
|
+
end
|
|
841
|
+
|
|
842
|
+
def openSession( prefs = {} )
|
|
843
|
+
# puts "= Loading Session ="
|
|
844
|
+
# session_file = File.join( Watobo.workspace_path, prefs[:project_name], prefs[:session_name] )
|
|
845
|
+
# puts "SessionFile: #{session_file}"
|
|
846
|
+
if @active_project then
|
|
847
|
+
response = FXMessageBox.question(self, MBOX_YES_NO, "New Project", "This will close the actual project!\nAre you sure?")
|
|
848
|
+
return false if not response == MBOX_CLICKED_YES
|
|
849
|
+
# clear old project
|
|
850
|
+
closeProject()
|
|
851
|
+
# stop interceptor
|
|
852
|
+
end
|
|
853
|
+
|
|
854
|
+
session_settings = {}
|
|
855
|
+
|
|
856
|
+
# if File.exists?(session_file) then
|
|
857
|
+
# session_settings = Watobo::Utils.loadSettings(session_file)
|
|
858
|
+
#updateistory(session_file)
|
|
859
|
+
|
|
860
|
+
# else
|
|
861
|
+
# puts "!!! Session file does not exist (#{session_file})."
|
|
862
|
+
# return false
|
|
863
|
+
# end
|
|
864
|
+
|
|
865
|
+
return false unless prefs.has_key? :project_name
|
|
866
|
+
return false unless prefs.has_key? :session_name
|
|
867
|
+
|
|
868
|
+
project = Watobo.create_project(
|
|
869
|
+
:project_name => prefs[:project_name],
|
|
870
|
+
:session_name => prefs[:session_name]
|
|
871
|
+
)
|
|
872
|
+
|
|
873
|
+
puts "* starting project"
|
|
874
|
+
startProject(project)
|
|
875
|
+
=begin
|
|
876
|
+
project_file = File.expand_path(File.join(File.dirname(session_file), "..", session_settings[:project_name] + ".wps"))
|
|
877
|
+
if File.exists?(project_file) then
|
|
878
|
+
project_settings = Watobo::Utils.loadSettings(project_file)
|
|
879
|
+
if not project_settings.is_a? Hash then
|
|
880
|
+
project_settings = Hash.new
|
|
881
|
+
end
|
|
882
|
+
new_project_settings = Hash.new
|
|
883
|
+
new_project_settings.update(@settings)
|
|
884
|
+
new_project_settings.update(project_settings)
|
|
885
|
+
new_project_settings.update(session_settings)
|
|
886
|
+
new_project_settings[:workspace_path] = File.join(File.dirname(project_file), "..")
|
|
887
|
+
|
|
888
|
+
# need to restore forwarding proxy list
|
|
889
|
+
# new_project_settings[:forwarding_proxy] = @forward_proxy_settings
|
|
890
|
+
|
|
891
|
+
decryptCredentials(new_project_settings)
|
|
892
|
+
# puts "* project settings"
|
|
893
|
+
# puts new_project_settings[:www_auth].to_yaml
|
|
894
|
+
project = Watobo::Project.new(new_project_settings)
|
|
895
|
+
|
|
896
|
+
if project
|
|
897
|
+
@projects[project] = {
|
|
898
|
+
:session_file => session_file,
|
|
899
|
+
:project_file => project_file
|
|
900
|
+
}
|
|
901
|
+
startProject(project)
|
|
902
|
+
Watobo::Gui.save_default_settings(@active_project)
|
|
903
|
+
end
|
|
904
|
+
|
|
905
|
+
return true
|
|
906
|
+
else
|
|
907
|
+
puts "!!! No project file available (#{project_file})."
|
|
908
|
+
return false
|
|
909
|
+
end
|
|
910
|
+
=end
|
|
911
|
+
end
|
|
912
|
+
|
|
913
|
+
def setActiveProject(project)
|
|
914
|
+
@active_project = project
|
|
915
|
+
end
|
|
916
|
+
|
|
917
|
+
def openScannerSettingsDialog(sender,sel,ptr)
|
|
918
|
+
if @active_project then
|
|
919
|
+
settings = @active_project.getScanPreferences()
|
|
920
|
+
# puts settings.to_yaml
|
|
921
|
+
dlg = Watobo::Gui::ScannerSettingsDialog.new(self, settings, LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
|
922
|
+
if dlg.execute != 0 then
|
|
923
|
+
# puts dlg.scanner_settings.to_yaml
|
|
924
|
+
@active_project.updateSettings(YAML.load(YAML.dump(dlg.scanner_settings)))
|
|
925
|
+
saveProjectSettings(@active_project)
|
|
926
|
+
|
|
927
|
+
end
|
|
928
|
+
else
|
|
929
|
+
FXMessageBox.information(self,MBOX_OK,"No Project Defined", "Create Project First!")
|
|
930
|
+
end
|
|
931
|
+
end
|
|
932
|
+
|
|
933
|
+
def openInterceptorSettingsDialog(sender,sel,ptr)
|
|
934
|
+
dlg = Watobo::Gui::InterceptorSettingsDialog.new(self)
|
|
935
|
+
if dlg.execute != 0 then
|
|
936
|
+
puts dlg.interceptor_settings.to_yaml
|
|
937
|
+
Watobo::Conf::Interceptor.set dlg.interceptor_settings
|
|
938
|
+
#@settings[:interceptor].update YAML.load(YAML.dump(dlg.interceptor_settings))
|
|
939
|
+
#@active_project.updateSettings(YAML.load(YAML.dump(dlg.scanner_settings)))
|
|
940
|
+
FXMessageBox.information(self, MBOX_OK, "Restart required!", "You must restart WATOBO in order your changes take effect.")
|
|
941
|
+
Watobo::Conf::Interceptor.save
|
|
942
|
+
#Watobo::Gui.save_default_settings(@settings[:interceptor])
|
|
943
|
+
end
|
|
944
|
+
end
|
|
945
|
+
|
|
946
|
+
def openScopeDialog(sender,sel,ptr)
|
|
947
|
+
dlg = Watobo::Gui::EditScopeDialog.new(self, @active_project, LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
|
948
|
+
if dlg.execute != 0 then
|
|
949
|
+
@active_project.scope = YAML.load(YAML.dump(dlg.scope))
|
|
950
|
+
saveProjectSettings(@active_project)
|
|
951
|
+
refreshViewers()
|
|
952
|
+
end
|
|
953
|
+
end
|
|
954
|
+
|
|
955
|
+
def startFullScan(sender,sel,ptr)
|
|
956
|
+
if @scan_button.icon == ICON_STOP
|
|
957
|
+
@scanner.cancel() if @scanner
|
|
958
|
+
@scan_button.icon = ICON_START
|
|
959
|
+
@scan_running = false
|
|
960
|
+
else
|
|
961
|
+
dlg = Watobo::Gui::FullScanDialog.new(self, @active_project, LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
|
962
|
+
if dlg.execute != 0 then
|
|
963
|
+
|
|
964
|
+
@scan_running = true
|
|
965
|
+
@scan_button.icon = ICON_STOP
|
|
966
|
+
#@pause_scan_button.enable
|
|
967
|
+
@active_project.setScope(dlg.scope)
|
|
968
|
+
|
|
969
|
+
# saveProjectSettings(@active_project)
|
|
970
|
+
# saveSessionSettings(@active_project)
|
|
971
|
+
|
|
972
|
+
#@active_project.scanLogDirectory = dlg.scan_prefs[:scanlog_dir] unless dlg.scan_prefs[:scanlog_dir] == ''
|
|
973
|
+
|
|
974
|
+
# chats = @active_project.getChats(dlg.scope)
|
|
975
|
+
dlg_modules = dlg.activeModules().map{ |m| m.class.to_s}
|
|
976
|
+
# we only need array of selected class names
|
|
977
|
+
# scan_modules = dlg.selectedModules().map{ |m| m.class.to_s }
|
|
978
|
+
acc = @active_project.active_checks.select do |ac|
|
|
979
|
+
dlg_modules.include? ac.class.to_s
|
|
980
|
+
end
|
|
981
|
+
|
|
982
|
+
in_scope_chats = @active_project.chatsInScope()
|
|
983
|
+
# puts "Chats to scan:"
|
|
984
|
+
# puts in_scope_chats.length
|
|
985
|
+
# p
|
|
986
|
+
|
|
987
|
+
confirm_dlg = Watobo::Gui::ConfirmScanDialog.new(self, in_scope_chats, @active_project.getScanPreferences())
|
|
988
|
+
if confirm_dlg.execute == 0
|
|
989
|
+
@scan_button.icon = ICON_START
|
|
990
|
+
@scan_running = false
|
|
991
|
+
return 0
|
|
992
|
+
end
|
|
993
|
+
|
|
994
|
+
scan_prefs = @active_project.getScanPreferences()
|
|
995
|
+
=begin
|
|
996
|
+
scan_prefs[:scanlog_dir] = dlg.scan_prefs[:scanlog_dir]
|
|
997
|
+
if File.exist?(scan_prefs[:scanlog_dir]) then
|
|
998
|
+
new_dir = File.join(scan_prefs[:scanlog_dir], "scan-" + Time.now.to_f.to_s + "_full")
|
|
999
|
+
Dir.mkdir(new_dir)
|
|
1000
|
+
scan_prefs[:scanlog_dir] = new_dir
|
|
1001
|
+
end
|
|
1002
|
+
=end
|
|
1003
|
+
|
|
1004
|
+
#scan_prefs[:data_store] = @active_project.datastore
|
|
1005
|
+
scan_prefs[:scan_name] = "scan_" + Time.now.to_i.to_s + "_full"
|
|
1006
|
+
|
|
1007
|
+
@scanner = Watobo::Scanner2.new(in_scope_chats, acc , @active_project.passive_checks, scan_prefs)
|
|
1008
|
+
|
|
1009
|
+
@scanner.subscribe(:progress) { |check|
|
|
1010
|
+
@dashboard.progress(check)
|
|
1011
|
+
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
@scanner.subscribe(:module_finished) { |mod|
|
|
1015
|
+
|
|
1016
|
+
@dashboard.module_finished(mod)
|
|
1017
|
+
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
@scanner.subscribe(:logger){ |level, message|
|
|
1021
|
+
|
|
1022
|
+
@log_viewer.log(level, message)
|
|
1023
|
+
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
@scanner.subscribe(:new_finding) { |finding|
|
|
1028
|
+
begin
|
|
1029
|
+
@active_project.addFinding(finding)
|
|
1030
|
+
rescue => bang
|
|
1031
|
+
puts bang
|
|
1032
|
+
puts bang.backtrace if $DEBUG
|
|
1033
|
+
end
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
@dashboard.setupScanProgressFrame(@scanner.numChecksPerModule)
|
|
1038
|
+
|
|
1039
|
+
@dashboard.setScanStatus("Running")
|
|
1040
|
+
@statusBar.setStatusInfo(:text => "Full Scan Running", :color => 'red')
|
|
1041
|
+
Thread.new {
|
|
1042
|
+
begin
|
|
1043
|
+
@scanner.run(:run_passive_checks => false, :update_sids => true, :update_session => true)
|
|
1044
|
+
# logger("scan finished")
|
|
1045
|
+
# @dashboard.setScanStatus("Finished")
|
|
1046
|
+
# @statusBar.statusInfoText = "Ready."
|
|
1047
|
+
# @scan_button.icon = ICON_START
|
|
1048
|
+
@scan_running = false
|
|
1049
|
+
rescue => bang
|
|
1050
|
+
puts bang
|
|
1051
|
+
end
|
|
1052
|
+
}
|
|
1053
|
+
end
|
|
1054
|
+
end
|
|
1055
|
+
end
|
|
1056
|
+
|
|
1057
|
+
def pauseScan(sender, sel, ptr)
|
|
1058
|
+
begin
|
|
1059
|
+
if @scanner.running?
|
|
1060
|
+
@scanner.stop
|
|
1061
|
+
@dashboard.setScanStatus("Scan Paused")
|
|
1062
|
+
@statusBar.statusInfoText = "Scan Paused"
|
|
1063
|
+
else
|
|
1064
|
+
@scanner.continue
|
|
1065
|
+
@dashboard.setScanStatus("Scan Running")
|
|
1066
|
+
@statusBar.statusInfoText = "Full Scan Running"
|
|
1067
|
+
end
|
|
1068
|
+
rescue => bang
|
|
1069
|
+
puts "!!!ERROR: Could not pause scanner"
|
|
1070
|
+
puts bang
|
|
1071
|
+
end
|
|
1072
|
+
end
|
|
1073
|
+
|
|
1074
|
+
#
|
|
1075
|
+
# new_event
|
|
1076
|
+
#
|
|
1077
|
+
def logger_UNUSED(message)
|
|
1078
|
+
@log_viewer.log(LOG_INFO, message)
|
|
1079
|
+
end
|
|
1080
|
+
|
|
1081
|
+
def initialize(app)
|
|
1082
|
+
# Invoke base class initialize first
|
|
1083
|
+
super(app, "WATOBO by siberas (Version: #{Watobo.version})", :opts => DECOR_ALL, :width => 1000, :height => 600)
|
|
1084
|
+
#FXToolTip.new(app)
|
|
1085
|
+
#app.disableThreads
|
|
1086
|
+
|
|
1087
|
+
self.icon = ICON_WATOBO
|
|
1088
|
+
self.show(PLACEMENT_MAXIMIZED)
|
|
1089
|
+
self.connect(SEL_CLOSE, method(:onClose))
|
|
1090
|
+
|
|
1091
|
+
@projects = Hash.new
|
|
1092
|
+
|
|
1093
|
+
@scanner = nil
|
|
1094
|
+
@iproxy = nil
|
|
1095
|
+
@browserView = nil
|
|
1096
|
+
|
|
1097
|
+
@scan_running = false
|
|
1098
|
+
|
|
1099
|
+
@lastViewed = nil # last viewed/selected item (chat/finding)
|
|
1100
|
+
@last_request = nil
|
|
1101
|
+
@last_response = nil
|
|
1102
|
+
|
|
1103
|
+
@progress_window = Watobo::Gui::ProgressWindow.new(self)
|
|
1104
|
+
@settings = {}
|
|
1105
|
+
|
|
1106
|
+
# array for gui plugins. will be filled after project creation.
|
|
1107
|
+
@plugins = []
|
|
1108
|
+
@app = app
|
|
1109
|
+
@progressWindow = nil # reserved for simple progress Window
|
|
1110
|
+
@switcher = nil
|
|
1111
|
+
@interceptor = nil
|
|
1112
|
+
|
|
1113
|
+
@table_filter = FXDataTarget.new("")
|
|
1114
|
+
@active_project = nil
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
@finding_lock = Mutex.new
|
|
1118
|
+
@chat_lock = Mutex.new
|
|
1119
|
+
@status_lock = Mutex.new
|
|
1120
|
+
|
|
1121
|
+
@finding_queue = []
|
|
1122
|
+
@chat_queue = []
|
|
1123
|
+
|
|
1124
|
+
# setup clipboard
|
|
1125
|
+
@clipboard_text = ""
|
|
1126
|
+
self.connect(SEL_CLIPBOARD_REQUEST) do
|
|
1127
|
+
# setDNDData(FROM_CLIPBOARD, FXWindow.stringType, Fox.fxencodeStringData(@clipboard_text))
|
|
1128
|
+
setDNDData(FROM_CLIPBOARD, FXWindow.stringType, @clipboard_text + "\x00" )
|
|
1129
|
+
end
|
|
1130
|
+
|
|
1131
|
+
menu_bar = FXMenuBar.new(self, :opts => LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
|
|
1132
|
+
|
|
1133
|
+
file_menu_pane = FXMenuPane.new(self)
|
|
1134
|
+
FXMenuTitle.new(menu_bar, "File" , :popupMenu => file_menu_pane)
|
|
1135
|
+
@file_new_menu = FXMenuCommand.new(file_menu_pane, "New/Open" )
|
|
1136
|
+
@file_new_menu.connect(SEL_COMMAND, method(:onNewProject))
|
|
1137
|
+
|
|
1138
|
+
exit_menu = FXMenuCommand.new(file_menu_pane, "Exit" )
|
|
1139
|
+
#FXMenuCommand.new(file_menu_pane, "Exit", nil, getApp(), FXApp::ID_QUIT)
|
|
1140
|
+
exit_menu.connect(SEL_COMMAND, method(:onExit))
|
|
1141
|
+
|
|
1142
|
+
FXMenuSeparator.new(file_menu_pane)
|
|
1143
|
+
|
|
1144
|
+
submenu = FXMenuPane.new(self) do |session_menu|
|
|
1145
|
+
Watobo::Gui.history.entries.sort_by{ |id, he| he[:last_used] }.reverse.each do |i,h|
|
|
1146
|
+
hname = h[:project_name] + " - " + h[:session_name] + " (#{Time.at(h[:last_used]).strftime("%Y-%m-%d %H:%M")})"
|
|
1147
|
+
history = FXMenuCommand.new(session_menu, hname )
|
|
1148
|
+
history.connect(SEL_COMMAND) do |sender, sel, item|
|
|
1149
|
+
# puts "open session #{h}"
|
|
1150
|
+
# puts "!!!ERROR Could not start session #{h}" if !openSession(h)
|
|
1151
|
+
if openSession(:project_name => h[:project_name], :session_name => h[:session_name])
|
|
1152
|
+
Watobo::Gui.history.update_usage( :project_name => h[:project_name], :session_name => h[:session_name])
|
|
1153
|
+
end
|
|
1154
|
+
|
|
1155
|
+
end
|
|
1156
|
+
end
|
|
1157
|
+
end
|
|
1158
|
+
@file_history = FXMenuCascade.new(file_menu_pane, "Recent Sessions", nil, submenu)
|
|
1159
|
+
#load history file
|
|
1160
|
+
|
|
1161
|
+
# file_open_command = FXMenuCommand.new(file_menu_pane, "Open..." )
|
|
1162
|
+
# file_save_command = FXMenuCommand.new(file_menu_pane, "Save" )
|
|
1163
|
+
# file_save_as_command = FXMenuCommand.new(file_menu_pane, "Save As..." )
|
|
1164
|
+
|
|
1165
|
+
settings_menu_pane = FXMenuPane.new(self)
|
|
1166
|
+
FXMenuTitle.new(menu_bar, "Settings" , :popupMenu => settings_menu_pane)
|
|
1167
|
+
menu_proxy = FXMenuCommand.new(settings_menu_pane, "Forwarding Proxy..." )
|
|
1168
|
+
menu_session = FXMenuCommand.new(settings_menu_pane, "Session Management..." )
|
|
1169
|
+
# @active_project ? menu_session.enable : menu_session.disable
|
|
1170
|
+
|
|
1171
|
+
menu_ca = FXMenuCommand.new(settings_menu_pane, "Create Certificate..." )
|
|
1172
|
+
menu_ca.connect(SEL_COMMAND, method(:openCADialog))
|
|
1173
|
+
|
|
1174
|
+
menu_preferences = FXMenuCommand.new(settings_menu_pane, "Target Scope..." )
|
|
1175
|
+
menu_preferences.connect(SEL_COMMAND, method(:openScopeDialog))
|
|
1176
|
+
|
|
1177
|
+
menu_preferences = FXMenuCommand.new(settings_menu_pane, "Scanner..." )
|
|
1178
|
+
menu_preferences.connect(SEL_COMMAND, method(:openScannerSettingsDialog))
|
|
1179
|
+
|
|
1180
|
+
menu_preferences = FXMenuCommand.new(settings_menu_pane, "Interceptor..." )
|
|
1181
|
+
menu_preferences.connect(SEL_COMMAND, method(:openInterceptorSettingsDialog))
|
|
1182
|
+
|
|
1183
|
+
www_auth_prefs = FXMenuCommand.new(settings_menu_pane, "WWW-Auth..." )
|
|
1184
|
+
www_auth_prefs.connect(SEL_COMMAND) { openWwwAuthDialog() }
|
|
1185
|
+
|
|
1186
|
+
client_cert_prefs = FXMenuCommand.new(settings_menu_pane, "Client Certificates..." )
|
|
1187
|
+
client_cert_prefs.connect(SEL_COMMAND) { open_client_cert_dialog() }
|
|
1188
|
+
|
|
1189
|
+
pp_prefs = FXMenuCommand.new(settings_menu_pane, "Password Policy..." )
|
|
1190
|
+
pp_prefs.connect(SEL_COMMAND) { openPWPolicyDialog() }
|
|
1191
|
+
# intercept_enable = FXMenuCheck.new(settings_menu_pane, "Enable Interception")
|
|
1192
|
+
|
|
1193
|
+
# file_menu_title = FXMenuTitle.new(menu_bar, "Settings" , :popupMenu => settings_menu_pane)
|
|
1194
|
+
|
|
1195
|
+
menu_proxy.connect(SEL_COMMAND, method(:onMenuProxy))
|
|
1196
|
+
menu_session.connect(SEL_COMMAND, method(:openSessionManagement))
|
|
1197
|
+
|
|
1198
|
+
tools_menu_pane = FXMenuPane.new(self)
|
|
1199
|
+
FXMenuTitle.new(menu_bar, "Tools" , :popupMenu => tools_menu_pane)
|
|
1200
|
+
transcoder = FXMenuCommand.new(tools_menu_pane, "Transcoder")
|
|
1201
|
+
interceptor = FXMenuCommand.new(tools_menu_pane, "Interceptor")
|
|
1202
|
+
transcoder.connect(SEL_COMMAND, method(:onOpenTranscoder))
|
|
1203
|
+
interceptor.connect(SEL_COMMAND, method(:onOpenInterceptor))
|
|
1204
|
+
|
|
1205
|
+
view_menu_pane = FXMenuPane.new(self)
|
|
1206
|
+
FXMenuTitle.new(menu_bar, "View" , :popupMenu => view_menu_pane)
|
|
1207
|
+
view_logs_command = FXMenuCommand.new(view_menu_pane, "Logs" )
|
|
1208
|
+
view_dashboard_command = FXMenuCommand.new(view_menu_pane, "Dashboard" )
|
|
1209
|
+
view_findings_command = FXMenuCommand.new(view_menu_pane, "Chat-Table")
|
|
1210
|
+
|
|
1211
|
+
view_dashboard_command.connect(SEL_COMMAND, method(:showDashboard))
|
|
1212
|
+
view_logs_command.connect(SEL_COMMAND, method(:showLogs))
|
|
1213
|
+
view_findings_command.connect(SEL_COMMAND, method(:showConversation))
|
|
1214
|
+
|
|
1215
|
+
window_menu_pane = FXMenuPane.new(self)
|
|
1216
|
+
FXMenuTitle.new(menu_bar, "Window" , :popupMenu => window_menu_pane)
|
|
1217
|
+
use_small_icons = FXMenuCheck.new(window_menu_pane, "Small Icons/Text" )
|
|
1218
|
+
use_small_icons.connect(SEL_COMMAND) {
|
|
1219
|
+
if use_small_icons.checked?
|
|
1220
|
+
useSmallIcons()
|
|
1221
|
+
else
|
|
1222
|
+
useRegularIcons()
|
|
1223
|
+
end
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
help_menu_pane = FXMenuPane.new(self)
|
|
1227
|
+
FXMenuTitle.new(menu_bar, "Help" , :popupMenu => help_menu_pane)
|
|
1228
|
+
# menu_lic = FXMenuCommand.new(help_menu_pane, "License" )
|
|
1229
|
+
menu_about = FXMenuCommand.new(help_menu_pane, "About" )
|
|
1230
|
+
menu_about.connect(SEL_COMMAND) {
|
|
1231
|
+
#FXMessageBox.information(self,MBOX_OK,"About", "WATOBO Version 0.9.1!")
|
|
1232
|
+
aboutDlg = AboutWatobo.new(self)
|
|
1233
|
+
aboutDlg.create
|
|
1234
|
+
aboutDlg.show(Fox::PLACEMENT_SCREEN)
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
# top_dock_frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|FRAME_SUNKEN, :padding => 0)
|
|
1238
|
+
# tool_bar_shell = FXToolBarShell.new(self)
|
|
1239
|
+
# top_dock_site = FXDockSite.new(top_dock_frame, :opts => LAYOUT_FILL_X|LAYOUT_SIDE_TOP)
|
|
1240
|
+
# bottom_dock_site = FXDockSite.new(self, :opts => LAYOUT_FILL_X|LAYOUT_SIDE_BOTTOM)
|
|
1241
|
+
|
|
1242
|
+
# project_bar = FXToolBar.new(top_dock_site, tool_bar_shell, PACK_UNIFORM_WIDTH)
|
|
1243
|
+
# FXToolBarGrip.new(project_bar, :opts => TOOLBARGRIP_SINGLE)
|
|
1244
|
+
top_bar = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X|FRAME_SUNKEN, :padding => 0)
|
|
1245
|
+
project_bar = FXHorizontalFrame.new(top_bar, :opts => LAYOUT_FILL_X|PACK_UNIFORM_WIDTH|FRAME_NONE, :padding => 2)
|
|
1246
|
+
@new_project_button = FXButton.new(project_bar, "\tNew Project\tNew Project." , :icon => ICON_ADD_PROJECT, :padding => 0)
|
|
1247
|
+
@new_project_button.connect(SEL_COMMAND, method(:onNewProject))
|
|
1248
|
+
|
|
1249
|
+
@scan_button = FXButton.new(project_bar, "\tStart Scan\tStart Scan." ,:opts => FRAME_RAISED|FRAME_THICK, :icon => ICON_START, :padding => 0)
|
|
1250
|
+
@scan_button.disable
|
|
1251
|
+
# @start_scan_button.tipText = "Start Scan"
|
|
1252
|
+
@scan_button.connect(SEL_COMMAND, method(:startFullScan))
|
|
1253
|
+
|
|
1254
|
+
#@pause_scan_button = FXButton.new(project_bar, "\tPause Scan\tPause Scan." ,:icon => ICON_PAUSE)
|
|
1255
|
+
#@pause_scan_button.disable
|
|
1256
|
+
# @start_scan_button.tipText = "Start Scan"
|
|
1257
|
+
#@pause_scan_button.connect(SEL_COMMAND, method(:pauseScan))
|
|
1258
|
+
|
|
1259
|
+
# views_bar = FXToolBar.new(top_dock_site, tool_bar_shell, :opts => PACK_UNIFORM_WIDTH, :height => 20)
|
|
1260
|
+
# FXToolBarGrip.new(views_bar, :opts => TOOLBARGRIP_SINGLE)
|
|
1261
|
+
|
|
1262
|
+
#@create_report_button = FXButton.new(views_bar,"\tReport\tCreate Report." , :icon => @reportIcon)
|
|
1263
|
+
#@create_report_button.disable
|
|
1264
|
+
views_bar = project_bar
|
|
1265
|
+
@show_dashboard_button = FXButton.new(views_bar, "\tShow Dashboard\tShow Dashboard.", :icon => ICON_DASHBOARD, :padding => 0)
|
|
1266
|
+
@show_dashboard_button.connect(SEL_COMMAND, method(:showDashboard))
|
|
1267
|
+
# @create_report_button.disable
|
|
1268
|
+
@show_conversation_button = FXButton.new(views_bar, "\tShow Conversation\tShow Conversation.", :icon => ICON_CONVERSATION, :padding => 0)
|
|
1269
|
+
@show_conversation_button.connect(SEL_COMMAND, method(:showConversation))
|
|
1270
|
+
|
|
1271
|
+
# tools_bar = FXToolBar.new(top_dock_site, tool_bar_shell, :opts => PACK_UNIFORM_WIDTH)
|
|
1272
|
+
# FXToolBarGrip.new(tools_bar, :opts => TOOLBARGRIP_SINGLE)
|
|
1273
|
+
tools_bar = project_bar
|
|
1274
|
+
@open_transcoder_button = FXButton.new(tools_bar, "\tOpen Transcoder\tOpen Transcoder.", :icon => ICON_TRANSCODER, :padding => 0)
|
|
1275
|
+
@open_transcoder_button.connect(SEL_COMMAND, method(:onOpenTranscoder))
|
|
1276
|
+
|
|
1277
|
+
@btn_show_plugin = FXButton.new(tools_bar, "\tShow Plugins\tShow Plugins.", :icon => ICON_PLUGIN, :padding => 0)
|
|
1278
|
+
@btn_show_plugin.connect(SEL_COMMAND, method(:onShowPlugins))
|
|
1279
|
+
|
|
1280
|
+
@open_interceptor_button = FXButton.new(tools_bar, "\tOpen Interceptor\tOpen Interceptor.", :icon => ICON_INTERCEPTOR, :padding => 0)
|
|
1281
|
+
@open_interceptor_button.connect(SEL_COMMAND, method(:onOpenInterceptor))
|
|
1282
|
+
# dummy button for siberas logo
|
|
1283
|
+
FXButton.new(top_bar, nil, :icon => Watobo::Gui::Icons::SIBERAS_ICON, :opts => FRAME_NONE|LAYOUT_SIDE_RIGHT)
|
|
1284
|
+
|
|
1285
|
+
@statusBar = StatusBar.new(self, :opts => LAYOUT_FILL_X|LAYOUT_SIDE_BOTTOM, :padding => 0)
|
|
1286
|
+
|
|
1287
|
+
splitter = FXSplitter.new(self, :opts => LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y|SPLITTER_TRACKING)
|
|
1288
|
+
|
|
1289
|
+
frame = FXVerticalFrame.new(splitter, :opts => LAYOUT_FILL_Y|LAYOUT_FIX_WIDTH|FRAME_SUNKEN, :padding => 0, :width => 200)
|
|
1290
|
+
|
|
1291
|
+
@treeTabbook = FXTabBook.new(frame, nil, 0, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_RIGHT)
|
|
1292
|
+
|
|
1293
|
+
ftab = FXTabItem.new(@treeTabbook, "Findings", nil)
|
|
1294
|
+
ftab.setFont(FXFont.new(getApp(), "helvetica", 12, FONTWEIGHT_BOLD, FONTSLANT_ITALIC, FONTENCODING_DEFAULT))
|
|
1295
|
+
tab_frame = FXVerticalFrame.new(@treeTabbook, :opts => LAYOUT_FIX_WIDTH|LAYOUT_FILL_Y|FRAME_RAISED, :width => 100)
|
|
1296
|
+
frame = FXVerticalFrame.new(tab_frame, :opts => LAYOUT_FILL_Y|LAYOUT_FILL_X|FRAME_SUNKEN, :padding => 0)
|
|
1297
|
+
@findings_tree = Watobo::Gui::FindingsTree.new(frame, self, nil)
|
|
1298
|
+
stab = FXTabItem.new(@treeTabbook, " Sites ", nil)
|
|
1299
|
+
stab.setFont(FXFont.new(getApp(), "helvetica", 12, FONTWEIGHT_BOLD, FONTSLANT_ITALIC, FONTENCODING_DEFAULT))
|
|
1300
|
+
tab_frame = FXVerticalFrame.new(@treeTabbook, :opts => LAYOUT_FIX_WIDTH|LAYOUT_FILL_Y|FRAME_RAISED, :width => 100)
|
|
1301
|
+
frame = FXVerticalFrame.new(tab_frame, :opts => LAYOUT_FILL_Y|LAYOUT_FILL_X|FRAME_SUNKEN, :padding => 0)
|
|
1302
|
+
@sites_tree = Watobo::Gui::SitesTree.new(frame, self, nil)
|
|
1303
|
+
|
|
1304
|
+
# @treeTabbook.connect(SEL_COMMAND) { |sender, sel, item|
|
|
1305
|
+
# case item
|
|
1306
|
+
# when 0
|
|
1307
|
+
# if @active_project
|
|
1308
|
+
# @active_project.settings.delete(:site_filter)
|
|
1309
|
+
# updateRequestTable(@active_project)
|
|
1310
|
+
#end
|
|
1311
|
+
# end
|
|
1312
|
+
# }
|
|
1313
|
+
subscribeFindingsTree()
|
|
1314
|
+
subscribeSitesTree()
|
|
1315
|
+
#
|
|
1316
|
+
# S W I T C H E R
|
|
1317
|
+
#
|
|
1318
|
+
|
|
1319
|
+
@switcher = FXSwitcher.new(splitter,LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
|
|
1320
|
+
|
|
1321
|
+
# R E Q U E S T I N F O
|
|
1322
|
+
requestInfo = FXVerticalFrame.new(@switcher, :opts => LAYOUT_FILL_X|LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
|
|
1323
|
+
request_splitter = FXSplitter.new(requestInfo, :opts => LAYOUT_SIDE_TOP|SPLITTER_HORIZONTAL|LAYOUT_FILL_Y|LAYOUT_FILL_X|SPLITTER_TRACKING|SPLITTER_REVERSED)
|
|
1324
|
+
|
|
1325
|
+
#conversation_frame = FXVerticalFrame.new(request_splitter, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN)
|
|
1326
|
+
|
|
1327
|
+
# filterFrame =FXVerticalFrame.new(conversation_frame, LAYOUT_FILL_X)
|
|
1328
|
+
#
|
|
1329
|
+
# C H A T F I L T E R C O N T R O L L E R
|
|
1330
|
+
@conversation_table_ctrl = ConversationTableCtrl.new(request_splitter, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN)
|
|
1331
|
+
|
|
1332
|
+
#==============================================================================================#
|
|
1333
|
+
# Chat-Table
|
|
1334
|
+
#==============================================================================================#
|
|
1335
|
+
#@chatTable = ConversationTable.new(conversation_frame,
|
|
1336
|
+
@chatTable = ConversationTable.new(@conversation_table_ctrl )
|
|
1337
|
+
@conversation_table_ctrl.table= @chatTable
|
|
1338
|
+
|
|
1339
|
+
@chatTable.autoscroll = true
|
|
1340
|
+
|
|
1341
|
+
@chatTable.connect(SEL_COMMAND) do |sender, sel, item|
|
|
1342
|
+
@findings_tree.killSelection()
|
|
1343
|
+
@sites_tree.killSelection()
|
|
1344
|
+
onTableClick(sender,sel,item)
|
|
1345
|
+
end
|
|
1346
|
+
|
|
1347
|
+
@chatTable.connect(SEL_DOUBLECLICKED) do |sender, sel, data|
|
|
1348
|
+
@findings_tree.killSelection()
|
|
1349
|
+
@sites_tree.killSelection()
|
|
1350
|
+
row = sender.getCurrentRow
|
|
1351
|
+
if row >= 0 then
|
|
1352
|
+
@chatTable.selectRow(row, false)
|
|
1353
|
+
chatid = @chatTable.getRowText(row).to_i
|
|
1354
|
+
chat = @active_project.getChat(chatid)
|
|
1355
|
+
open_manual_request_editor(chat)
|
|
1356
|
+
end
|
|
1357
|
+
end
|
|
1358
|
+
|
|
1359
|
+
@chatTable.connect(SEL_RIGHTBUTTONRELEASE) do |sender, sel, event|
|
|
1360
|
+
@findings_tree.killSelection()
|
|
1361
|
+
@sites_tree.killSelection()
|
|
1362
|
+
unless event.moved?
|
|
1363
|
+
# row = sender.getCurrentRow
|
|
1364
|
+
ypos = event.click_y
|
|
1365
|
+
row = @chatTable.rowAtY(ypos)
|
|
1366
|
+
# puts "right click on row #{row} of #{@chatTable.numRows}"
|
|
1367
|
+
if row >= 0 and row < @chatTable.numRows then
|
|
1368
|
+
|
|
1369
|
+
@chatTable.selectRow(row, false)
|
|
1370
|
+
chatid = @chatTable.getRowText(row).to_i
|
|
1371
|
+
chat = @active_project.getChat(chatid)
|
|
1372
|
+
|
|
1373
|
+
showChat(chat)
|
|
1374
|
+
|
|
1375
|
+
FXMenuPane.new(self) do |menu_pane|
|
|
1376
|
+
|
|
1377
|
+
# SEND TO SUBMENU
|
|
1378
|
+
submenu = FXMenuPane.new(self) do |sendto_menu|
|
|
1379
|
+
|
|
1380
|
+
target = FXMenuCommand.new(sendto_menu, "Fuzzer..." )
|
|
1381
|
+
target.connect(SEL_COMMAND) {
|
|
1382
|
+
openFuzzer(chat)
|
|
1383
|
+
}
|
|
1384
|
+
target = FXMenuCommand.new(sendto_menu, "Manual Request..." )
|
|
1385
|
+
target.connect(SEL_COMMAND) {
|
|
1386
|
+
open_manual_request_editor(chat)
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
end
|
|
1390
|
+
FXMenuCascade.new(menu_pane, "Send to", nil, submenu)
|
|
1391
|
+
|
|
1392
|
+
# EXCLUDE SUBMENU
|
|
1393
|
+
exclude_submenu = FXMenuPane.new(self) do |sub|
|
|
1394
|
+
chat = @active_project.getChat(chatid)
|
|
1395
|
+
|
|
1396
|
+
target = FXMenuCheck.new(sub, "Chat (#{chatid})" )
|
|
1397
|
+
|
|
1398
|
+
target.check = @active_project.scan_settings[:excluded_chats].include?(chatid) ? true : false
|
|
1399
|
+
|
|
1400
|
+
target.connect(SEL_COMMAND) {
|
|
1401
|
+
if target.checked?()
|
|
1402
|
+
@active_project.scan_settings[:excluded_chats].push chatid
|
|
1403
|
+
else
|
|
1404
|
+
@active_project.scan_settings[:excluded_chats].delete(chatid)
|
|
1405
|
+
end
|
|
1406
|
+
|
|
1407
|
+
}
|
|
1408
|
+
# target = FXMenuCommand.new(sub, "Path" )
|
|
1409
|
+
# target.connect(SEL_COMMAND) {
|
|
1410
|
+
# ...
|
|
1411
|
+
# }
|
|
1412
|
+
|
|
1413
|
+
end
|
|
1414
|
+
FXMenuCascade.new(menu_pane, "Exclude from Scan", nil, exclude_submenu)
|
|
1415
|
+
|
|
1416
|
+
# COPY SUBMENU
|
|
1417
|
+
copy_submenu = FXMenuPane.new(self) do |sub|
|
|
1418
|
+
chat = @active_project.getChat(chatid)
|
|
1419
|
+
url = @active_project.getChat(chatid).request.url
|
|
1420
|
+
# puts url
|
|
1421
|
+
url_string = "URL: #{url.slice(0,35)}"
|
|
1422
|
+
url_string += "..." if url.length > 36
|
|
1423
|
+
|
|
1424
|
+
target = FXMenuCommand.new(sub, url_string )
|
|
1425
|
+
target.connect(SEL_COMMAND) {
|
|
1426
|
+
types = [ FXWindow.stringType ]
|
|
1427
|
+
if acquireClipboard(types)
|
|
1428
|
+
puts
|
|
1429
|
+
@clipboard_text = url
|
|
1430
|
+
end
|
|
1431
|
+
|
|
1432
|
+
}
|
|
1433
|
+
target = FXMenuCommand.new(sub, "Site: #{@active_project.getChat(chatid).request.site}" )
|
|
1434
|
+
target.connect(SEL_COMMAND) {
|
|
1435
|
+
site = @active_project.getChat(chatid).request.site
|
|
1436
|
+
|
|
1437
|
+
types = [ FXWindow.stringType ]
|
|
1438
|
+
if acquireClipboard(types)
|
|
1439
|
+
@clipboard_text = site
|
|
1440
|
+
end
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
end
|
|
1444
|
+
FXMenuCascade.new(menu_pane, "Copy", nil, copy_submenu)
|
|
1445
|
+
|
|
1446
|
+
addToLogin = FXMenuCommand.new(menu_pane, "Add to Login-Script" )
|
|
1447
|
+
addToLogin.connect(SEL_COMMAND) {
|
|
1448
|
+
@active_project.add_login_chat_id(chatid)
|
|
1449
|
+
saveSessionSettings(@active_project)
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
target = FXMenuCheck.new(menu_pane, "Mark as tested" )
|
|
1453
|
+
target.check = chat.tested?
|
|
1454
|
+
target.connect(SEL_COMMAND) {
|
|
1455
|
+
chat.tested = target.checked?()
|
|
1456
|
+
Watobo::Utils.saveChat(chat, chat.file)
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
FXMenuCommand.new(menu_pane, "Edit comment.." ).connect(SEL_COMMAND) {
|
|
1460
|
+
# puts row
|
|
1461
|
+
|
|
1462
|
+
dlg = Watobo::Gui::EditCommentDialog.new(self, chat)
|
|
1463
|
+
if dlg.execute != 0 then
|
|
1464
|
+
chat.comment = dlg.comment
|
|
1465
|
+
@chatTable.updateComment(row, dlg.comment)
|
|
1466
|
+
Watobo::Utils.saveChat(chat, chat.file)
|
|
1467
|
+
end
|
|
1468
|
+
}
|
|
1469
|
+
# copyRequest = FXMenuCommand.new(menu_pane, "copy Request(#{chatid})" )
|
|
1470
|
+
# copyResponse = FXMenuCommand.new(menu_pane, "copy Response(#{chatid})" )
|
|
1471
|
+
|
|
1472
|
+
# info = FXMenuCommand.new(menu_pane, "Details..." )
|
|
1473
|
+
#info.connect(SEL_COMMAND) { display_info_for(item) }
|
|
1474
|
+
|
|
1475
|
+
menu_pane.create
|
|
1476
|
+
menu_pane.popup(nil, event.root_x, event.root_y)
|
|
1477
|
+
app.runModalWhileShown(menu_pane)
|
|
1478
|
+
|
|
1479
|
+
end
|
|
1480
|
+
|
|
1481
|
+
end
|
|
1482
|
+
|
|
1483
|
+
end
|
|
1484
|
+
|
|
1485
|
+
end
|
|
1486
|
+
|
|
1487
|
+
#===================================================================
|
|
1488
|
+
# CHAT VIEWER
|
|
1489
|
+
#===================================================================
|
|
1490
|
+
chat_outer_frame = FXVerticalFrame.new(request_splitter, :opts => LAYOUT_FILL_Y|LAYOUT_FILL_X|FRAME_SUNKEN|LAYOUT_MIN_WIDTH, :padding => 0, :width=>400)
|
|
1491
|
+
chat_frame = chat_outer_frame
|
|
1492
|
+
# chat_frame = FXVerticalFrame.new(chat_outer_frame, :opts => LAYOUT_FILL_X|FRAME_SUNKEN, :padding => 0)
|
|
1493
|
+
#view_menu = FXVerticalFrame.new(chat_frame, :opts => LAYOUT_FILL_X, :padding => 0)
|
|
1494
|
+
#frame = FXHorizontalFrame.new(view_menu, :opts => LAYOUT_FILL_X)
|
|
1495
|
+
#cvlabel = FXLabel.new(frame, "View: ")
|
|
1496
|
+
# cvlabel.setFont(FXFont.new(getApp(), "helvetica", 12, FONTWEIGHT_BOLD, FONTSLANT_ITALIC, FONTENCODING_DEFAULT))
|
|
1497
|
+
|
|
1498
|
+
@quickViewTitle = FXLabel.new(chat_frame, " -N/A- ")
|
|
1499
|
+
@quickViewTitle.setFont(FXFont.new(getApp(), "helvetica", 12, FONTWEIGHT_BOLD, FONTSLANT_ITALIC, FONTENCODING_DEFAULT))
|
|
1500
|
+
@quickViewSubTitle = FXLabel.new(chat_frame, "")
|
|
1501
|
+
|
|
1502
|
+
frame = FXHorizontalFrame.new(chat_frame, :opts => LAYOUT_CENTER_X|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH, :padding => 0)
|
|
1503
|
+
@mre_button = FXButton.new(frame, "Manual Request", ICON_MANUAL_REQUEST_SMALL, nil, 0, :opts => BUTTON_NORMAL|LAYOUT_RIGHT|LAYOUT_FILL_X)
|
|
1504
|
+
@mre_button.connect(SEL_COMMAND) {
|
|
1505
|
+
open_manual_request_editor(@lastViewed) if @lastViewed
|
|
1506
|
+
}
|
|
1507
|
+
@mre_button.enabled = false
|
|
1508
|
+
|
|
1509
|
+
@fuzz_button = FXButton.new(frame, "Fuzzer", ICON_FUZZER_SMALL, nil, 0, :opts => BUTTON_NORMAL|LAYOUT_RIGHT|LAYOUT_FILL_X)
|
|
1510
|
+
@fuzz_button.connect(SEL_COMMAND) {
|
|
1511
|
+
openFuzzer(@lastViewed) if @lastViewed
|
|
1512
|
+
}
|
|
1513
|
+
@fuzz_button.enabled = false
|
|
1514
|
+
@bv_button = FXButton.new(frame, "Browser-View", ICON_BROWSER_SMALL, nil, 0, :opts => BUTTON_NORMAL|LAYOUT_RIGHT|LAYOUT_FILL_X)
|
|
1515
|
+
@bv_button.connect(SEL_COMMAND) {
|
|
1516
|
+
begin
|
|
1517
|
+
if @lastViewed and @browserView then
|
|
1518
|
+
openBrowser(@lastViewed.request, @lastViewed.response)
|
|
1519
|
+
end
|
|
1520
|
+
rescue => bang
|
|
1521
|
+
puts bang
|
|
1522
|
+
|
|
1523
|
+
end
|
|
1524
|
+
}
|
|
1525
|
+
@bv_button.enabled = false
|
|
1526
|
+
|
|
1527
|
+
# FXHorizontalSeparator.new(chat_frame, :opts => SEPARATOR_GROOVE|LAYOUT_FILL_X)
|
|
1528
|
+
# FXLabel.new(view_menu, "Source:")
|
|
1529
|
+
@chat_frame_splitter = FXSplitter.new(chat_outer_frame, :opts => LAYOUT_SIDE_TOP|SPLITTER_VERTICAL|LAYOUT_FILL_Y|LAYOUT_FILL_X|SPLITTER_TRACKING)
|
|
1530
|
+
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)
|
|
1531
|
+
#chat_frame = FXVerticalFrame.new(chat_frame_splitter, :opts => LAYOUT_FILL_X|FRAME_SUNKEN|LAYOUT_MIN_WIDTH, :padding => 0, :width=>400)
|
|
1532
|
+
title_frame = FXHorizontalFrame.new(chat_frame, :opts => LAYOUT_FILL_X)
|
|
1533
|
+
FXLabel.new(title_frame, "Request:")
|
|
1534
|
+
|
|
1535
|
+
@request_viewer = Watobo::Gui::RequestViewer.new(chat_frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
|
|
1536
|
+
# @request_viewer = Watobo::Gui::ChatViewer.new(chat_frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
|
|
1537
|
+
# @request_viewer.highlight_style = 1
|
|
1538
|
+
|
|
1539
|
+
# FXHorizontalSeparator.new(chat_frame, :opts => SEPARATOR_GROOVE|LAYOUT_FILL_X)
|
|
1540
|
+
chat_frame = FXVerticalFrame.new(@chat_frame_splitter, :opts => LAYOUT_FILL_X|FRAME_SUNKEN|LAYOUT_MIN_WIDTH, :padding => 0, :width=>400)
|
|
1541
|
+
title_frame = FXHorizontalFrame.new(chat_frame, :opts => LAYOUT_FILL_X)
|
|
1542
|
+
FXLabel.new(title_frame, "Response:")
|
|
1543
|
+
|
|
1544
|
+
@save_response_btn = FXButton.new(title_frame, "Save", nil, nil, 0, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT)
|
|
1545
|
+
@save_response_btn.connect(SEL_COMMAND){ save_response }
|
|
1546
|
+
#fxViewButton = FXButton.new(title_frame, "View", nil, nil, 0, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT)
|
|
1547
|
+
#fxViewButton.connect(SEL_COMMAND, method(:onViewResponse))
|
|
1548
|
+
|
|
1549
|
+
# @response_viewer = Watobo::Gui::ChatViewer.new(chat_frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
|
|
1550
|
+
@response_viewer = Watobo::Gui::ResponseViewer.new(chat_frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
|
|
1551
|
+
# @response_viewer.highlight_style = 2
|
|
1552
|
+
|
|
1553
|
+
#===================================================================
|
|
1554
|
+
# L O G I N F O
|
|
1555
|
+
#===================================================================
|
|
1556
|
+
logFrame = FXVerticalFrame.new(@switcher, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN)
|
|
1557
|
+
FXLabel.new(logFrame, "Eventlist:", :opts => LAYOUT_FILL_X)
|
|
1558
|
+
@log_viewer = LogViewer.new(logFrame, :opts => FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
|
1559
|
+
|
|
1560
|
+
# DASHBOARD#
|
|
1561
|
+
@dashboard = Dashboard.new(@switcher)
|
|
1562
|
+
|
|
1563
|
+
# FINDING INFORMATION
|
|
1564
|
+
frame = FXVerticalFrame.new(@switcher, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_GROOVE)
|
|
1565
|
+
@finding_info = FindingInfo.new(frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
|
1566
|
+
|
|
1567
|
+
# PLUGIN-BOARD
|
|
1568
|
+
@pluginboard = PluginBoard.new(@switcher)
|
|
1569
|
+
|
|
1570
|
+
# if @foption_nopix.checked? then @doctype_TableFilter.concat(@fext_pix);end
|
|
1571
|
+
# if @foption_nodocs.checked? then @doctype_TableFilter.concat(@fext_docs);end
|
|
1572
|
+
# if @foption_nojs.checked? then @doctype_TableFilter.concat(@fext_javascript);end
|
|
1573
|
+
# if @foption_nocss.checked? then @doctype_TableFilter.concat(@fext_style);end
|
|
1574
|
+
|
|
1575
|
+
add_queue_timer(50)
|
|
1576
|
+
end
|
|
1577
|
+
|
|
1578
|
+
def create
|
|
1579
|
+
super
|
|
1580
|
+
# adjust splitters
|
|
1581
|
+
frame_height = (@chat_frame_splitter.getSplit(1) + @chat_frame_splitter.getSplit(0)) / 2
|
|
1582
|
+
@chat_frame_splitter.setSplit(0, frame_height)
|
|
1583
|
+
@chat_frame_splitter.setSplit(1, frame_height )
|
|
1584
|
+
end
|
|
1585
|
+
# !!!
|
|
1586
|
+
# TODO: FXRUBY-Bug???
|
|
1587
|
+
# If splash screen is shown app will crash on close :(
|
|
1588
|
+
# !!!
|
|
1589
|
+
# def create
|
|
1590
|
+
# super
|
|
1591
|
+
# splash = FXSplashWindow.new(interface, ICON_SPLASH, SPLASH_SHAPED|SPLASH_DESTROY|SPLASH_OWNS_ICON, 2000)
|
|
1592
|
+
#splash = FXSplashWindow.new(@app, ICON_SPLASH, SPLASH_SIMPLE, 2000)
|
|
1593
|
+
# splash.execute
|
|
1594
|
+
# splash.create()
|
|
1595
|
+
#splash.show(PLACEMENT_SCREEN)
|
|
1596
|
+
# show(PLACEMENT_SCREEN)
|
|
1597
|
+
#show(PLACEMENT_MAXIMIZED)
|
|
1598
|
+
|
|
1599
|
+
# end
|
|
1600
|
+
private
|
|
1601
|
+
|
|
1602
|
+
def save_response
|
|
1603
|
+
unless @last_chat.nil?
|
|
1604
|
+
dlg = SaveChatDialog.new(self, @last_chat)
|
|
1605
|
+
if dlg.execute != 0
|
|
1606
|
+
FXMessageBox.information(self,MBOX_OK,"Response Saved", "The response has been saved to #{dlg.filename}!")
|
|
1607
|
+
|
|
1608
|
+
end
|
|
1609
|
+
else
|
|
1610
|
+
puts "NO CHAT SELECTED!"
|
|
1611
|
+
end
|
|
1612
|
+
end
|
|
1613
|
+
|
|
1614
|
+
def subscribeProject(project)
|
|
1615
|
+
|
|
1616
|
+
project.subscribe(:new_chat){ |c|
|
|
1617
|
+
# Thread.new { addChat(c)}
|
|
1618
|
+
@chat_lock.synchronize do
|
|
1619
|
+
@chat_queue << c
|
|
1620
|
+
end
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
project.subscribe(:new_finding){ |f|
|
|
1624
|
+
# Thread.new { addFinding(f) }
|
|
1625
|
+
@finding_lock.synchronize do
|
|
1626
|
+
@finding_queue << f
|
|
1627
|
+
end
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
project.subscribe(:settings_changed){
|
|
1631
|
+
saveProjectSettings(project)
|
|
1632
|
+
saveSessionSettings(project)
|
|
1633
|
+
}
|
|
1634
|
+
end
|
|
1635
|
+
|
|
1636
|
+
def subscribeSitesTree()
|
|
1637
|
+
@sites_tree.subscribe(:add_site_to_scope){ |site|
|
|
1638
|
+
@active_project.addToScope(site)
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
@sites_tree.subscribe(:show_conversation){ |chat_list|
|
|
1642
|
+
showConversation()
|
|
1643
|
+
@chatTable.showConversation(chat_list)
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
@sites_tree.subscribe(:show_chat){ |chat|
|
|
1647
|
+
showChat(chat)
|
|
1648
|
+
}
|
|
1649
|
+
end
|
|
1650
|
+
|
|
1651
|
+
def subscribeFindingsTree()
|
|
1652
|
+
@findings_tree.subscribe(:add_site_to_scope){ |site|
|
|
1653
|
+
@active_project.addToScope(site)
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
@findings_tree.subscribe(:delete_domain_filter){ |df|
|
|
1657
|
+
@active_project.settings[:domain_filters].delete(df)
|
|
1658
|
+
# puts "Delete Domain-Filter #{df}"
|
|
1659
|
+
updateTreeLists()
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
@findings_tree.subscribe(:delete_all_domain_filters) {
|
|
1663
|
+
@active_project.settings[:domain_filters].clear
|
|
1664
|
+
updateTreeLists()
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
@findings_tree.subscribe(:vuln_click){ |v| showVulnerability(v) }
|
|
1668
|
+
|
|
1669
|
+
@findings_tree.subscribe(:finding_click){ |v| showFindingDetails(v) }
|
|
1670
|
+
|
|
1671
|
+
@findings_tree.subscribe(:show_finding_details){ |v| showFindingDetails(v) }
|
|
1672
|
+
|
|
1673
|
+
@findings_tree.subscribe(:open_manual_request){ |v| open_manual_request_editor(v) }
|
|
1674
|
+
|
|
1675
|
+
@findings_tree.subscribe(:purge_findings){ |f| purge_findings(f) }
|
|
1676
|
+
|
|
1677
|
+
@findings_tree.subscribe(:set_false_positive){ |f| set_false_positive(f) }
|
|
1678
|
+
|
|
1679
|
+
@findings_tree.subscribe(:unset_false_positive){ |f| unset_false_positive(f) }
|
|
1680
|
+
|
|
1681
|
+
end
|
|
1682
|
+
|
|
1683
|
+
def onClose(sender, sel, event)
|
|
1684
|
+
# puts "! #{Thread.list.length} Threads running"
|
|
1685
|
+
response = FXMessageBox.question(self, MBOX_YES_NO, "Finished?", "Are you sure?")
|
|
1686
|
+
if response == MBOX_CLICKED_YES
|
|
1687
|
+
return 0
|
|
1688
|
+
else
|
|
1689
|
+
return 1
|
|
1690
|
+
end
|
|
1691
|
+
end
|
|
1692
|
+
|
|
1693
|
+
def loadProjectSettings(filename=nil)
|
|
1694
|
+
settings = nil
|
|
1695
|
+
if filename then
|
|
1696
|
+
begin
|
|
1697
|
+
settings = Hash.new
|
|
1698
|
+
settings = Watobo::Utils.loadSettings(filename)
|
|
1699
|
+
# puts settings.to_yaml
|
|
1700
|
+
rescue => bang
|
|
1701
|
+
puts "!!!ERROR: could not update project settings"
|
|
1702
|
+
puts bang
|
|
1703
|
+
return false
|
|
1704
|
+
end
|
|
1705
|
+
end
|
|
1706
|
+
return settings
|
|
1707
|
+
end
|
|
1708
|
+
|
|
1709
|
+
def loadSessionSettings(filename=nil)
|
|
1710
|
+
settings = {}
|
|
1711
|
+
return settings if filename.nil?
|
|
1712
|
+
if File.exist?(filename) then
|
|
1713
|
+
begin
|
|
1714
|
+
settings = Watobo::Utils.loadSettings(filename)
|
|
1715
|
+
rescue => bang
|
|
1716
|
+
puts "!!!ERROR: could not load session settings"
|
|
1717
|
+
puts bang
|
|
1718
|
+
return false
|
|
1719
|
+
end
|
|
1720
|
+
else
|
|
1721
|
+
puts "! SessionSettings file #{filename} does not exist!"
|
|
1722
|
+
end
|
|
1723
|
+
return settings
|
|
1724
|
+
end
|
|
1725
|
+
|
|
1726
|
+
def onExit(sender, sel, item)
|
|
1727
|
+
response = FXMessageBox.question(self, MBOX_YES_NO, "Finished?", "Are you sure?")
|
|
1728
|
+
if response == MBOX_CLICKED_YES
|
|
1729
|
+
getApp().exit(0)
|
|
1730
|
+
end
|
|
1731
|
+
end
|
|
1732
|
+
|
|
1733
|
+
def onApplyFilterClick(sender,sel,item)
|
|
1734
|
+
applyFilter()
|
|
1735
|
+
|
|
1736
|
+
end
|
|
1737
|
+
|
|
1738
|
+
def onClear(sender, sel, item)
|
|
1739
|
+
@table_filter.value =""
|
|
1740
|
+
@tableFilterFX.handle(self, FXSEL(SEL_UPDATE, 0), nil)
|
|
1741
|
+
end
|
|
1742
|
+
|
|
1743
|
+
def onTableClick(sender,sel,item)
|
|
1744
|
+
begin
|
|
1745
|
+
getApp().beginWaitCursor()
|
|
1746
|
+
# purge viewers
|
|
1747
|
+
@request_viewer.setText('')
|
|
1748
|
+
@response_viewer.setText('')
|
|
1749
|
+
row = item.row
|
|
1750
|
+
|
|
1751
|
+
chatid = @chatTable.getRowText(row).to_i
|
|
1752
|
+
@chatTable.selectRow(row, false)
|
|
1753
|
+
# @logText.appendText("selected ID: (#{chatid})\n")
|
|
1754
|
+
@active_project.chats.each do |chat|
|
|
1755
|
+
if chat.id == chatid then
|
|
1756
|
+
showChat(chat)
|
|
1757
|
+
end
|
|
1758
|
+
end
|
|
1759
|
+
rescue => bang
|
|
1760
|
+
puts "!!!ERROR: onTableClick"
|
|
1761
|
+
puts bang
|
|
1762
|
+
puts "!!!"
|
|
1763
|
+
ensure
|
|
1764
|
+
getApp().endWaitCursor()
|
|
1765
|
+
end
|
|
1766
|
+
end
|
|
1767
|
+
|
|
1768
|
+
def onMenuProxy(sender,sel,item)
|
|
1769
|
+
if @active_project
|
|
1770
|
+
# puts @active_project.settings.to_yaml
|
|
1771
|
+
# puts @settings[:password_policy].to_yaml
|
|
1772
|
+
proxy_dialog = Watobo::Gui::ProxyDialog.new(self, @active_project.forward_proxy_settings, Watobo::Conf::Gui.dump )
|
|
1773
|
+
if proxy_dialog.execute != 0 then
|
|
1774
|
+
proxy_prefs = proxy_dialog.getProxyPrefs
|
|
1775
|
+
Watobo::Conf::ForwardingProxy.set proxy_prefs
|
|
1776
|
+
@active_project.setProxyOptions(YAML.load(YAML.dump(proxy_prefs)))
|
|
1777
|
+
puts "* current proxy:\n> #{@active_project.getCurrentProxy()}" if $DEBUG
|
|
1778
|
+
|
|
1779
|
+
Watobo::Gui.save_default_settings(@active_project)
|
|
1780
|
+
|
|
1781
|
+
saveProjectSettings(@active_project)
|
|
1782
|
+
|
|
1783
|
+
update_status_bar(@active_project)
|
|
1784
|
+
#puts "* current proxy:\n> #{@active_project.getCurrentProxy().to_yaml}"
|
|
1785
|
+
#puts @settings[:password_policy].to_yaml
|
|
1786
|
+
end
|
|
1787
|
+
else
|
|
1788
|
+
FXMessageBox.information(self,MBOX_OK,"No Project Defined", "Create Project First")
|
|
1789
|
+
end
|
|
1790
|
+
end
|
|
1791
|
+
|
|
1792
|
+
def purge_findings(findings)
|
|
1793
|
+
return false if @active_project.nil?
|
|
1794
|
+
findings.each do |f|
|
|
1795
|
+
@active_project.delete_finding(f)
|
|
1796
|
+
end
|
|
1797
|
+
end
|
|
1798
|
+
|
|
1799
|
+
def set_false_positive(findings)
|
|
1800
|
+
return false if @active_project.nil?
|
|
1801
|
+
findings.each do |f|
|
|
1802
|
+
@active_project.set_false_positive(f)
|
|
1803
|
+
end
|
|
1804
|
+
end
|
|
1805
|
+
|
|
1806
|
+
def unset_false_positive(findings)
|
|
1807
|
+
return false if @active_project.nil?
|
|
1808
|
+
findings.each do |f|
|
|
1809
|
+
@active_project.unset_false_positive(f)
|
|
1810
|
+
end
|
|
1811
|
+
end
|
|
1812
|
+
end # Class End
|
|
1813
|
+
|
|
1814
|
+
end
|
|
1815
|
+
end
|