watobo 0.9.8.677
Sign up to get free protection for your applications and to get access to all the features.
- 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,211 @@
|
|
1
|
+
# .
|
2
|
+
# file_store.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
|
+
class FileSessionStore < SessionStore
|
24
|
+
def num_chats
|
25
|
+
get_file_list(@conversation_path, "*-chat").length
|
26
|
+
end
|
27
|
+
|
28
|
+
def num_findings
|
29
|
+
get_file_list(@findings_path, "*-finding").length
|
30
|
+
end
|
31
|
+
|
32
|
+
def add_finding(finding)
|
33
|
+
finding_file = File.join("#{@findings_path}", "#{finding.id}-finding")
|
34
|
+
if not File.exists?(finding_file) then
|
35
|
+
|
36
|
+
finding_data = {
|
37
|
+
:request => finding.request.map{|x| x.inspect},
|
38
|
+
:response => finding.response.map{|x| x.inspect},
|
39
|
+
:details => Hash.new
|
40
|
+
}
|
41
|
+
finding_data[:details].update(finding.details)
|
42
|
+
|
43
|
+
if not File.exists?(finding_file) then
|
44
|
+
fh = File.new(finding_file, "w+b")
|
45
|
+
fh.print YAML.dump(finding_data)
|
46
|
+
fh.close
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
def delete_finding(finding)
|
53
|
+
finding_file = File.join("#{@findings_path}", "#{finding.id}-finding")
|
54
|
+
File.delete finding_file if File.exist? finding_file
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
def update_finding(finding)
|
59
|
+
finding_file = File.join("#{@findings_path}", "#{finding.id}-finding")
|
60
|
+
finding_data = {
|
61
|
+
:request => finding.request.map{|x| x.inspect},
|
62
|
+
:response => finding.response.map{|x| x.inspect},
|
63
|
+
:details => Hash.new
|
64
|
+
}
|
65
|
+
finding_data[:details].update(finding.details)
|
66
|
+
|
67
|
+
if File.exists?(finding_file) then
|
68
|
+
fh = File.new(finding_file, "w+b")
|
69
|
+
fh.print YAML.dump(finding_data)
|
70
|
+
fh.close
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
# add_scan_log
|
76
|
+
# adds a chat to a specific log store, e.g. if you want to log scan results.
|
77
|
+
# needs a scan_name (STRING) as its destination which will be created
|
78
|
+
# if the scan name does not exist.
|
79
|
+
def add_scan_log(chat, scan_name = nil)
|
80
|
+
begin
|
81
|
+
return false if scan_name.nil?
|
82
|
+
puts ">> scan_name"
|
83
|
+
path = File.join(@scanlog_path, scan_name)
|
84
|
+
|
85
|
+
Dir.mkdir path unless File.exist? path
|
86
|
+
|
87
|
+
log_file = File.join( path, "log_" + Time.now.to_f.to_s)
|
88
|
+
|
89
|
+
chat_data = {
|
90
|
+
:request => chat.request.map{|x| x.inspect},
|
91
|
+
:response => chat.response.map{|x| x.inspect},
|
92
|
+
}
|
93
|
+
puts log_file
|
94
|
+
chat_data.update(chat.settings)
|
95
|
+
File.open(log_file, "w") { |fh|
|
96
|
+
YAML.dump(chat_data, fh)
|
97
|
+
}
|
98
|
+
return true
|
99
|
+
rescue => bang
|
100
|
+
puts bang
|
101
|
+
puts bang.backtrace if $DEBUG
|
102
|
+
end
|
103
|
+
return false
|
104
|
+
end
|
105
|
+
|
106
|
+
def add_chat(chat)
|
107
|
+
chat_file = File.join("#{@conversation_path}", "#{chat.id}-chat")
|
108
|
+
chat_data = {
|
109
|
+
:request => chat.request.map{|x| x.inspect},
|
110
|
+
:response => chat.response.map{|x| x.inspect},
|
111
|
+
}
|
112
|
+
|
113
|
+
chat_data.update(chat.settings)
|
114
|
+
if not File.exists?(chat_file) then
|
115
|
+
File.open(chat_file, "w") { |fh|
|
116
|
+
YAML.dump(chat_data, fh)
|
117
|
+
}
|
118
|
+
chat.file = chat_file
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
def each_chat(&block)
|
123
|
+
get_file_list(@conversation_path, "*-chat").each do |fname|
|
124
|
+
chat = Watobo::Utils.loadChatYAML(fname)
|
125
|
+
next unless chat
|
126
|
+
yield chat if block_given?
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
def each_finding(&block)
|
131
|
+
get_file_list(@findings_path, "*-finding").each do |fname|
|
132
|
+
f = Watobo::Utils.loadFindingYAML(fname)
|
133
|
+
next unless f
|
134
|
+
yield f if block_given?
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
def initialize(project_name, session_name)
|
141
|
+
|
142
|
+
wsp = Watobo.workspace_path
|
143
|
+
return false unless File.exist? wsp
|
144
|
+
puts "* using workspace path: #{wsp}"
|
145
|
+
project_path = File.join(wsp, project_name)
|
146
|
+
unless File.exist? project_path
|
147
|
+
puts "* create project path: #{project_path}"
|
148
|
+
Dir.mkdir(project_path)
|
149
|
+
end
|
150
|
+
session_path = File.join(project_path, session_name)
|
151
|
+
|
152
|
+
unless File.exist? session_path
|
153
|
+
puts "* create session path: #{session_path}"
|
154
|
+
Dir.mkdir(session_path)
|
155
|
+
end
|
156
|
+
sext = Watobo::Conf::General.session_settings_file_ext
|
157
|
+
puts "SEXT: #{sext}"
|
158
|
+
@session_file = File.join(session_path, session_name + sext)
|
159
|
+
@project_file = File.join(project_path, project_name + Watobo::Conf::General.project_settings_file_ext)
|
160
|
+
|
161
|
+
@conversation_path = File.expand_path(File.join(session_path, Watobo::Conf::Datastore.conversations))
|
162
|
+
|
163
|
+
@findings_path = File.expand_path(File.join(session_path, Watobo::Conf::Datastore.findings))
|
164
|
+
@log_path = File.expand_path(File.join(session_path, Watobo::Conf::Datastore.event_logs_dir))
|
165
|
+
@scanlog_path = File.expand_path(File.join(session_path, Watobo::Conf::Datastore.scan_logs_dir))
|
166
|
+
|
167
|
+
[ @conversation_path, @findings_path, @log_path, @scanlog_path ].each do |folder|
|
168
|
+
if not File.exists?(folder) then
|
169
|
+
puts "create path #{folder}"
|
170
|
+
begin
|
171
|
+
Dir.mkdir(folder)
|
172
|
+
rescue SystemCallError => bang
|
173
|
+
puts "!!!ERROR:"
|
174
|
+
puts bang
|
175
|
+
rescue => bang
|
176
|
+
puts "!!!ERROR:"
|
177
|
+
puts bang
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# @chat_files = get_file_list(@conversation_path, "*-chat")
|
183
|
+
# @finding_files = get_file_list(@findings_path, "*-finding")
|
184
|
+
end
|
185
|
+
|
186
|
+
|
187
|
+
def save_session_settings(session_settings)
|
188
|
+
|
189
|
+
end
|
190
|
+
|
191
|
+
def load_session_settings()
|
192
|
+
|
193
|
+
end
|
194
|
+
|
195
|
+
def save_project_settings(project_settings)
|
196
|
+
|
197
|
+
end
|
198
|
+
|
199
|
+
def load_project_settings()
|
200
|
+
|
201
|
+
end
|
202
|
+
|
203
|
+
private
|
204
|
+
|
205
|
+
def get_file_list(path, pattern)
|
206
|
+
Dir["#{path}/#{pattern}"].sort_by{ |x| File.basename(x).sub(/[^0-9]*/,'').to_i }
|
207
|
+
end
|
208
|
+
|
209
|
+
end
|
210
|
+
|
211
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# .
|
2
|
+
# session_store.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
|
+
class SessionStore
|
24
|
+
|
25
|
+
# TODO: Define default methods here
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# .
|
2
|
+
# adapters.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
|
+
%w( data_store session_store ).each do |lib|
|
23
|
+
require "watobo/adapters/#{lib}"
|
24
|
+
end
|
25
|
+
|
26
|
+
require "watobo/adapters/file/file_store"
|
@@ -0,0 +1,143 @@
|
|
1
|
+
# .
|
2
|
+
# config.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 Conf
|
24
|
+
|
25
|
+
@@settings = Hash.new
|
26
|
+
@count = 0
|
27
|
+
@@modules = []
|
28
|
+
def self.each(&b)
|
29
|
+
@@modules.each do |m|
|
30
|
+
yield m if block_given?
|
31
|
+
end
|
32
|
+
@@modules.length
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.add(group, settings)
|
36
|
+
# puts "* create new configuration for #{group}"
|
37
|
+
|
38
|
+
module_eval("module #{group}; @settings = #{settings} end")
|
39
|
+
m = const_get(group)
|
40
|
+
m.module_eval do
|
41
|
+
def self.to_file
|
42
|
+
n = self.to_s.gsub(/(Watobo)?::/, "/").gsub(/([A-Z])([A-Z][a-z])/, '\1_\2').gsub(/([a-z\d])([A-Z])/, '\1_\2').tr("-","_").downcase
|
43
|
+
n << ".yml"
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.update(filename=nil, &b)
|
47
|
+
n = self.to_file
|
48
|
+
file = filename unless filename.nil?
|
49
|
+
file = File.join( Watobo::Conf::General.working_directory, n )
|
50
|
+
if File.exist? file
|
51
|
+
puts " [#{self}] update settings from file #{file}"
|
52
|
+
@settings.update YAML.load_file(file)
|
53
|
+
puts @settings.to_yaml
|
54
|
+
puts self.dump if $DEBUG
|
55
|
+
else
|
56
|
+
puts "! [#{self}] could not update settings from file #{file}" if $DEBUG
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.set(settings)
|
61
|
+
return false unless settings.is_a? Hash
|
62
|
+
@settings = YAML.load(YAML.dump(settings))
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.save(path=nil, &b)
|
66
|
+
|
67
|
+
n = self.to_file
|
68
|
+
p = Conf::General.working_directory
|
69
|
+
unless path.nil?
|
70
|
+
if File.exist? path
|
71
|
+
p = path
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
file = File.join( p, n )
|
76
|
+
|
77
|
+
s = YAML.load(YAML.dump(@settings))
|
78
|
+
s.each_pair do |k,v|
|
79
|
+
yield k,v if block_given?
|
80
|
+
end
|
81
|
+
|
82
|
+
if File.exist?(File.dirname(file))
|
83
|
+
puts "* save config #{self} to: #{file}"
|
84
|
+
puts s.to_yaml
|
85
|
+
File.open(file, "w") { |fh|
|
86
|
+
YAML.dump(s, fh)
|
87
|
+
}
|
88
|
+
else
|
89
|
+
puts "Could not save file to #{File.dirname(file)}"
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
def self.respond_to?(f)
|
94
|
+
# puts "* respond_to?"
|
95
|
+
# puts f
|
96
|
+
return true if @settings.has_key? f.to_sym
|
97
|
+
# puts @settings.to_yaml
|
98
|
+
super
|
99
|
+
end
|
100
|
+
|
101
|
+
def self.dump
|
102
|
+
@settings
|
103
|
+
end
|
104
|
+
|
105
|
+
#@@settings = settings
|
106
|
+
def self.method_missing(name, *args, &block)
|
107
|
+
# puts "* instance method missing (#{name})"
|
108
|
+
if name =~ /(.*)=$/
|
109
|
+
@settings.has_key? $1.to_sym || super
|
110
|
+
@settings[$1.to_sym] = args[0]
|
111
|
+
else
|
112
|
+
# puts @settings[name.to_sym]
|
113
|
+
@settings[name.to_sym]
|
114
|
+
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
def self.included(clazz)
|
119
|
+
puts "* #{self} gets included into #{clazz}"
|
120
|
+
@settings.each_key do |k|
|
121
|
+
puts "* add method for #{k}"
|
122
|
+
|
123
|
+
clazz.class_eval "
|
124
|
+
@@#{k} ||= #{self}.#{k}
|
125
|
+
|
126
|
+
def #{k}=(value)
|
127
|
+
@@#{k} = value
|
128
|
+
end
|
129
|
+
|
130
|
+
def #{k}
|
131
|
+
@@#{k}
|
132
|
+
end
|
133
|
+
"
|
134
|
+
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
end
|
139
|
+
@@modules << m
|
140
|
+
end
|
141
|
+
|
142
|
+
end
|
143
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
# .
|
2
|
+
# constants.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
|
+
$debug_project = false
|
23
|
+
$debug_active_check = false
|
24
|
+
$debug_scanner = false
|
25
|
+
|
26
|
+
|
27
|
+
module Watobo
|
28
|
+
module Constants
|
29
|
+
CHAT_SOURCE_UNDEF = 0x00
|
30
|
+
CHAT_SOURCE_INTERCEPT = 0x01
|
31
|
+
CHAT_SOURCE_PROXY = 0x02
|
32
|
+
CHAT_SOURCE_MANUAL = 0x03
|
33
|
+
CHAT_SOURCE_FUZZER = 0x04
|
34
|
+
CHAT_SOURCE_MANUAL_SCAN = 0x05
|
35
|
+
CHAT_SOURCE_AUTO_SCAN = 0x06
|
36
|
+
|
37
|
+
FINDING_TYPE_UNDEFINED = 0x00
|
38
|
+
FINDING_TYPE_INFO = 0x03
|
39
|
+
FINDING_TYPE_HINT = 0x01
|
40
|
+
FINDING_TYPE_VULN = 0x02
|
41
|
+
|
42
|
+
VULN_RATING_UNDEFINED = 0x00
|
43
|
+
VULN_RATING_INFO = 0x01
|
44
|
+
VULN_RATING_LOW = 0x02
|
45
|
+
VULN_RATING_MEDIUM = 0x03
|
46
|
+
VULN_RATING_HIGH = 0x04
|
47
|
+
VULN_RATING_CRITICAL = 0x05
|
48
|
+
|
49
|
+
# ActiveCheck Groups
|
50
|
+
AC_GROUP_GENERIC = "Generic"
|
51
|
+
AC_GROUP_SQL = "SQL-Injection"
|
52
|
+
AC_GROUP_XSS = "XSS"
|
53
|
+
AC_GROUP_ENUMERATION = "Enumeration"
|
54
|
+
AC_GROUP_FILE_INCLUSION = "File Inclusion"
|
55
|
+
|
56
|
+
AC_GROUP_DOMINO = "Lotus Domino"
|
57
|
+
AC_GROUP_SAP = "SAP"
|
58
|
+
AC_GROUP_TYPO3 = "Typo3"
|
59
|
+
AC_GROUP_JOOMLA = "Joomla"
|
60
|
+
AC_GROUP_JBOSS = "JBoss AS"
|
61
|
+
AC_GROUP_FLASH = "Flash"
|
62
|
+
AC_GROUP_APACHE = "Apache"
|
63
|
+
|
64
|
+
ICON_PATH = "icons"
|
65
|
+
|
66
|
+
FIRST_TIME_FILE = "first_time_file"
|
67
|
+
|
68
|
+
# Transfer Encoding Types
|
69
|
+
TE_NONE = 0x00
|
70
|
+
TE_CHUNKED = 0x01
|
71
|
+
TE_COMPRESS = 0x02
|
72
|
+
TE_GZIP = 0x04
|
73
|
+
TE_DEFLATE = 0x08
|
74
|
+
TE_IDENTITY = 0x10
|
75
|
+
|
76
|
+
# Log Level
|
77
|
+
LOG_INFO = 0x00
|
78
|
+
LOG_DEBUG = 0x01
|
79
|
+
|
80
|
+
# Authentication Types
|
81
|
+
AUTH_TYPE_NONE = 0x00
|
82
|
+
AUTH_TYPE_BASIC = 0x01
|
83
|
+
AUTH_TYPE_DIGEST = 0x02
|
84
|
+
AUTH_TYPE_NTLM = 0x04
|
85
|
+
|
86
|
+
GUI_SMALL_FONT_SIZE = 7
|
87
|
+
GUI_REGULAR_FONT_SIZE = 9
|
88
|
+
|
89
|
+
DEFAULT_PORT_HTTP = 80
|
90
|
+
DEFAULT_PORT_HTTPS = 443
|
91
|
+
end
|
92
|
+
end
|