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,29 @@
|
|
1
|
+
#VERSION,2.004
|
2
|
+
# $Id: db_variables 660 2011-06-14 13:19:52Z sullo $
|
3
|
+
#######################################################################
|
4
|
+
# Source: http://cirt.net
|
5
|
+
# This file may only be distributed and used with the full Nikto package.
|
6
|
+
# This file may not be used with any software product without written permission from CIRT, Inc.
|
7
|
+
# (c) 2007 CIRT, Inc., All Rights Reserved.
|
8
|
+
#
|
9
|
+
# NOTE: By sending any database updates to CIRT, Inc., it is assumed that you
|
10
|
+
# grant CIRT, Inc., the unlimited, non-exclusive right to reuse, modify and relicense the changes.
|
11
|
+
#######################################################################
|
12
|
+
# Notes:
|
13
|
+
# Variables which will be used as replacements for values in the scan_database.db and user_scan_database.db files.
|
14
|
+
# Any values to be replaced must start with the @ character, such as: @CGIDIRS.
|
15
|
+
#
|
16
|
+
# User defined variables should be set in config.txt as this file may be over-written during updates.
|
17
|
+
#######################################################################
|
18
|
+
@CGIDIRS=/cgi.cgi/ /webcgi/ /cgi-914/ /cgi-915/ /bin/ /cgi/ /mpcgi/ /cgi-bin/ /ows-bin/ /cgi-sys/ /cgi-local/ /htbin/ /cgibin/ /cgis/ /scripts/ /cgi-win/ /fcgi-bin/ /cgi-exe/ /cgi-home/ /cgi-perl/ /scgi-bin/
|
19
|
+
@NUKE=/ /postnuke/ /postnuke/html/ /modules/ /phpBB/ /forum/
|
20
|
+
@MUTATEDIRS=/....../ /members/ /porn/ /restricted/ /xxx/
|
21
|
+
@MUTATEFILES=xxx.htm xxx.html porn.htm porn.html
|
22
|
+
@ADMIN=/admin/ /adm/ /administrator/
|
23
|
+
@USERS=adm bin daemon ftp guest listen lp mysql noaccess nobody nobody4 nuucp operator root smmsp smtp sshd sys test unknown uucp web www
|
24
|
+
@PASSWORDDIRS=/ /admin/ /clients/ /pass/ /password/ /passwords/ /store/ /users/ /access/ /members/ /private/ /ccbill/ /dmr/ /mastergate/ /dmr/ /epoch/ /netbilling/ /webcash/ /wwwjoin/ /etc/security/
|
25
|
+
@PASSWORDFILES=admins clients pass password passwords passwd passwd.adjunct store users .htpasswd .passwd
|
26
|
+
@PHPMYADMIN=/3rdparty/phpMyAdmin/ /phpMyAdmin/ /3rdparty/phpmyadmin/ /phpmyadmin/ /pma/
|
27
|
+
@HTTPFOUND=200 301 302 403
|
28
|
+
@FCKEDITOR=/FCKeditor/ /Script/fckeditor/ /sites/all/modules/fckeditor/fckeditor/ /modules/fckeditor/fckeditor/ /class/fckeditor/ /inc/fckeditor/ /sites/all/libraries/fckeditor/
|
29
|
+
@CRYSTALREPORTS=/ /CrystalReports/ /crystal/ /businessobjects/ /crystal/enterprise10/ /crystal/Enterprise10/ePortfolio/en/
|
@@ -0,0 +1,602 @@
|
|
1
|
+
# .
|
2
|
+
# filefinder.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 Plugin
|
24
|
+
module Filefinder
|
25
|
+
|
26
|
+
class Check < Watobo::ActiveCheck
|
27
|
+
attr_accessor :db_file
|
28
|
+
attr_accessor :path
|
29
|
+
attr_accessor :append_slash
|
30
|
+
|
31
|
+
|
32
|
+
def add_extension(ext)
|
33
|
+
ext.gsub!(/^\.+/,"")
|
34
|
+
@extensions << ext
|
35
|
+
end
|
36
|
+
|
37
|
+
def set_extensions(extensions)
|
38
|
+
@extensions = extensions if extensions.is_a? Array
|
39
|
+
@extensions << nil
|
40
|
+
end
|
41
|
+
|
42
|
+
def initialize(project, file, prefs)
|
43
|
+
super(project, prefs)
|
44
|
+
|
45
|
+
@info.update(
|
46
|
+
:check_name => 'File Finder', # name of check which briefly describes functionality, will be used for tree and progress views
|
47
|
+
:description => "Test list of file names.", # description of checkfunction
|
48
|
+
:author => "Andreas Schmidt", # author of check
|
49
|
+
:version => "1.0" # check version
|
50
|
+
)
|
51
|
+
|
52
|
+
@finding.update(
|
53
|
+
:threat => 'Hidden files may reveal sensitive information or can enhance the attack surface.', # thread of vulnerability, e.g. loss of information
|
54
|
+
:class => "Hidden-File", # vulnerability class, e.g. Stored XSS, SQL-Injection, ...
|
55
|
+
:type => FINDING_TYPE_VULN, # FINDING_TYPE_HINT, FINDING_TYPE_INFO, FINDING_TYPE_VULN
|
56
|
+
:rating => VULN_RATING_LOW
|
57
|
+
)
|
58
|
+
@path = nil
|
59
|
+
@db_file = file
|
60
|
+
@prefs = prefs
|
61
|
+
@extensions = [ nil ]
|
62
|
+
@append_slash = false
|
63
|
+
end
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
def reset()
|
68
|
+
# @catalog_checks.clear
|
69
|
+
end
|
70
|
+
|
71
|
+
def generateChecks(chat)
|
72
|
+
begin
|
73
|
+
puts "* generating checks for #{@db_file} ..."
|
74
|
+
content = [ @db_file ]
|
75
|
+
content = File.open(@db_file) if File.exist?(@db_file)
|
76
|
+
|
77
|
+
content.each do |uri|
|
78
|
+
# puts "+ #{uri}"
|
79
|
+
@extensions.each do |ext|
|
80
|
+
# puts " + #{ext}"
|
81
|
+
next if uri.strip =~ /^#/
|
82
|
+
# cleanup dir
|
83
|
+
uri.strip!
|
84
|
+
uri.gsub!(/^\/+/,'')
|
85
|
+
uri.gsub!(/\/$/,'')
|
86
|
+
|
87
|
+
checker = proc {
|
88
|
+
test_request = nil
|
89
|
+
test_response = nil
|
90
|
+
# !!! ATTENTION !!!
|
91
|
+
# MAKE COPY BEFORE MODIFIYING REQUEST
|
92
|
+
test = chat.copyRequest
|
93
|
+
new_uri = "#{uri}"
|
94
|
+
unless ext.nil? or ext.empty?
|
95
|
+
new_uri << ".#{ext}"
|
96
|
+
end
|
97
|
+
new_uri << "/" if @append_slash == true
|
98
|
+
puts ">> #{new_uri}"
|
99
|
+
test.replaceFileExt(new_uri)
|
100
|
+
# puts test.url
|
101
|
+
status, test_request, test_response = fileExists?(test, @prefs)
|
102
|
+
|
103
|
+
|
104
|
+
if status == true
|
105
|
+
addFinding( test_request, test_response,
|
106
|
+
:test_item => new_uri,
|
107
|
+
# :proof_pattern => "#{Regexp.quote(uri)}",
|
108
|
+
:check_pattern => "#{Regexp.quote(new_uri)}",
|
109
|
+
:chat => chat,
|
110
|
+
:threat => "depends on the file ;)",
|
111
|
+
:title => "[#{new_uri}]"
|
112
|
+
|
113
|
+
)
|
114
|
+
|
115
|
+
end
|
116
|
+
|
117
|
+
# notify(:db_finished)
|
118
|
+
[ test_request, test_response ]
|
119
|
+
}
|
120
|
+
yield checker
|
121
|
+
end
|
122
|
+
end
|
123
|
+
rescue => bang
|
124
|
+
puts "!error in module #{Module.nesting[0].name}"
|
125
|
+
puts bang
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
class Filefinder < Watobo::Template::Plugin
|
131
|
+
|
132
|
+
include Watobo::Constants
|
133
|
+
|
134
|
+
def updateView()
|
135
|
+
#@project = project
|
136
|
+
@sites_combo.clearItems()
|
137
|
+
@dir_combo.clearItems()
|
138
|
+
@dir_combo.disable
|
139
|
+
|
140
|
+
if @project then
|
141
|
+
@sites_combo.appendItem("no site selected", nil)
|
142
|
+
@project.listSites(:in_scope => @scope_only_cb.checked? ).each do |site|
|
143
|
+
#puts "Site: #{site}"
|
144
|
+
@sites_combo.appendItem(site.slice(0..35), site)
|
145
|
+
end
|
146
|
+
@sites_combo.setCurrentItem(0) if @sites_combo.numItems > 0
|
147
|
+
ci = @sites_combo.currentItem
|
148
|
+
site = ( ci >= 0 ) ? @sites_combo.getItemData(ci) : nil
|
149
|
+
|
150
|
+
if site
|
151
|
+
@dir_combo.enable
|
152
|
+
@project.listDirs(@site) do |dir|
|
153
|
+
@dir_combo.appendItem(dir.slice(0..35), dir)
|
154
|
+
end
|
155
|
+
@dir_combo.setCurrentItem(0, true) if @dir_combo.numItems > 0
|
156
|
+
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
end
|
161
|
+
|
162
|
+
def onClose
|
163
|
+
|
164
|
+
end
|
165
|
+
|
166
|
+
|
167
|
+
def initialize(owner, project)
|
168
|
+
super(owner, "File Finder", project, :opts => DECOR_ALL, :width=>800, :height=>400)
|
169
|
+
load_icon(__FILE__)
|
170
|
+
|
171
|
+
self.connect(SEL_CLOSE, method(:onClose))
|
172
|
+
|
173
|
+
@event_dispatcher_listeners = Hash.new
|
174
|
+
@scanner = nil
|
175
|
+
@plugin_name = "File-Finder"
|
176
|
+
@project = project
|
177
|
+
@path = Dir.getwd
|
178
|
+
|
179
|
+
|
180
|
+
@site = nil
|
181
|
+
@dir = nil
|
182
|
+
|
183
|
+
begin
|
184
|
+
hs_green = FXHiliteStyle.new
|
185
|
+
hs_green.normalForeColor = FXRGBA(255,255,255,255) #FXColor::Red
|
186
|
+
hs_green.normalBackColor = FXRGBA(0,255,0,1) # FXColor::White
|
187
|
+
hs_green.style = FXText::STYLE_BOLD
|
188
|
+
|
189
|
+
hs_red = FXHiliteStyle.new
|
190
|
+
hs_red.normalForeColor = FXRGBA(255,255,255,255) # FXColor::Red
|
191
|
+
hs_red.normalBackColor = FXRGBA(255,0,0,1) # FXColor::White
|
192
|
+
hs_red.style = FXText::STYLE_BOLD
|
193
|
+
|
194
|
+
|
195
|
+
path = Dir.getwd
|
196
|
+
|
197
|
+
mr_splitter = FXSplitter.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y|SPLITTER_VERTICAL|SPLITTER_REVERSED|SPLITTER_TRACKING)
|
198
|
+
# top = FXHorizontalFrame.new(mr_splitter, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_SIDE_BOTTOM)
|
199
|
+
top_frame = FXVerticalFrame.new(mr_splitter, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y||LAYOUT_FIX_HEIGHT|LAYOUT_BOTTOM,:height => 500)
|
200
|
+
top_splitter = FXSplitter.new(top_frame, LAYOUT_FILL_X|SPLITTER_HORIZONTAL|LAYOUT_FILL_Y|SPLITTER_TRACKING)
|
201
|
+
log_frame = FXVerticalFrame.new(mr_splitter, :opts => LAYOUT_FILL_X|LAYOUT_SIDE_BOTTOM,:height => 100)
|
202
|
+
|
203
|
+
|
204
|
+
@settings_frame = FXVerticalFrame.new(top_splitter, :opts => LAYOUT_FILL_Y)
|
205
|
+
|
206
|
+
result_frame = FXVerticalFrame.new(top_splitter, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
207
|
+
@requestCombo = FXComboBox.new(result_frame, 5, nil, 0,
|
208
|
+
COMBOBOX_STATIC|FRAME_SUNKEN|FRAME_THICK|LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
|
209
|
+
#@filterCombo.width =200
|
210
|
+
|
211
|
+
@requestCombo.numVisible = 0
|
212
|
+
@requestCombo.numColumns = 50
|
213
|
+
@requestCombo.editable = false
|
214
|
+
@requestCombo.connect(SEL_COMMAND, method(:onSelectRequest))
|
215
|
+
|
216
|
+
log_text_frame = FXVerticalFrame.new(result_frame, LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN|FRAME_THICK, :padding=>0)
|
217
|
+
@request_editor = RequestEditor.new(log_text_frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
218
|
+
|
219
|
+
@scope_only_cb = FXCheckButton.new(@settings_frame, "target scope only", nil, 0, ICON_BEFORE_TEXT|LAYOUT_SIDE_LEFT)
|
220
|
+
@scope_only_cb.setCheck(false)
|
221
|
+
@scope_only_cb.connect(SEL_COMMAND) { updateView() }
|
222
|
+
|
223
|
+
FXLabel.new(@settings_frame, "Select Site:")
|
224
|
+
@sites_combo = FXComboBox.new(@settings_frame, 5, nil, 0,
|
225
|
+
COMBOBOX_STATIC|FRAME_SUNKEN|FRAME_THICK|LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
|
226
|
+
#@filterCombo.width =200
|
227
|
+
|
228
|
+
@sites_combo.numVisible = 20
|
229
|
+
@sites_combo.numColumns = 35
|
230
|
+
@sites_combo.editable = false
|
231
|
+
@sites_combo.connect(SEL_COMMAND, method(:onSiteSelect))
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
FXLabel.new(@settings_frame, "Root Directory:")
|
236
|
+
@dir_combo = FXComboBox.new(@settings_frame, 5, nil, 0,
|
237
|
+
COMBOBOX_STATIC|FRAME_SUNKEN|FRAME_THICK|LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
|
238
|
+
@dir_combo.numVisible = 20
|
239
|
+
@dir_combo.numColumns = 35
|
240
|
+
@dir_combo.editable = false
|
241
|
+
@dir_combo.connect(SEL_COMMAND, method(:onDirSelect))
|
242
|
+
|
243
|
+
@test_all_dirs = FXCheckButton.new(@settings_frame, "test all sub-directories", nil, 0, ICON_BEFORE_TEXT|LAYOUT_SIDE_LEFT)
|
244
|
+
@test_all_dirs.setCheck(false)
|
245
|
+
|
246
|
+
|
247
|
+
@dbfile_dt = FXDataTarget.new('')
|
248
|
+
@dbfile_dt.value = ''
|
249
|
+
@db_path = File.expand_path(File.dirname(__FILE__))
|
250
|
+
@dbfile_label = FXLabel.new(@settings_frame, "Enter name of file or db-filename:" )
|
251
|
+
dbfile_frame = FXHorizontalFrame.new(@settings_frame,:opts => LAYOUT_FILL_X|LAYOUT_SIDE_TOP)
|
252
|
+
@dbfile_text = FXTextField.new(dbfile_frame, 20,
|
253
|
+
:target => @dbfile_dt, :selector => FXDataTarget::ID_VALUE,
|
254
|
+
:opts => TEXTFIELD_NORMAL|LAYOUT_FILL_COLUMN)
|
255
|
+
@dbfile_text.handle(self, FXSEL(SEL_UPDATE, 0), nil)
|
256
|
+
@dbfile_btn = FXButton.new(dbfile_frame, "Change")
|
257
|
+
@dbfile_btn.connect(SEL_COMMAND, method(:selectDBFile))
|
258
|
+
|
259
|
+
|
260
|
+
@fmode_dt = FXDataTarget.new(0)
|
261
|
+
group_box = FXGroupBox.new(@settings_frame, "Mode", LAYOUT_SIDE_TOP|FRAME_GROOVE|LAYOUT_FILL_X, 0, 0, 0, 0)
|
262
|
+
mode_frame = FXVerticalFrame.new(group_box, :opts => LAYOUT_FILL_X)
|
263
|
+
|
264
|
+
@append_extensions_cb = FXCheckButton.new(mode_frame, "append extensions", nil, 0, ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|LAYOUT_RIGHT|LAYOUT_FILL_Y)
|
265
|
+
@append_slash_cb = FXCheckButton.new(mode_frame, "append /", nil, 0, ICON_BEFORE_TEXT|LAYOUT_SIDE_TOP|LAYOUT_RIGHT|LAYOUT_FILL_Y)
|
266
|
+
# group_box = FXGroupBox.new(self, "Collection",LAYOUT_SIDE_TOP|FRAME_GROOVE|LAYOUT_FILL_X|LAYOUT_FILL_Y, 0, 0, 0, 0)
|
267
|
+
# frame = FXVerticalFrame.new(group_box, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN|FRAME_GROOVE)
|
268
|
+
# @collectionList = FXList.new(frame, :opts => LIST_EXTENDEDSELECT|LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
269
|
+
#@fmode_dt.connect(SEL_COMMAND) {
|
270
|
+
# @file_rb.handle(self, FXSEL(SEL_UPDATE, 0), nil)
|
271
|
+
# @dir_rb.handle(self, FXSEL(SEL_UPDATE, 0), nil)
|
272
|
+
#}
|
273
|
+
#@dbfile_text.enabled = false
|
274
|
+
#@dbfile_label.enabled = false
|
275
|
+
#@dbfile_btn.disable
|
276
|
+
# @use_ssl = FXCheckButton.new(@settings_frame, "use SSL", nil, 0, ICON_BEFORE_TEXT|LAYOUT_SIDE_LEFT)
|
277
|
+
|
278
|
+
|
279
|
+
# @run_passive_checks = FXCheckButton.new(@settings_frame, "run passive checks", nil, 0, ICON_BEFORE_TEXT|LAYOUT_SIDE_LEFT)
|
280
|
+
# @run_passive_checks.setCheck(false)
|
281
|
+
|
282
|
+
|
283
|
+
@pbar = FXProgressBar.new(@settings_frame, nil, 0, LAYOUT_FILL_X|FRAME_SUNKEN|FRAME_THICK|PROGRESSBAR_HORIZONTAL)
|
284
|
+
@pbar.progress = 0
|
285
|
+
@pbar.total = 0
|
286
|
+
@pbar.barColor=0
|
287
|
+
@pbar.barColor = 'grey' #FXRGB(255,0,0)
|
288
|
+
|
289
|
+
@speed = FXLabel.new(@settings_frame, "Requests per second: 0")
|
290
|
+
|
291
|
+
@start_button = FXButton.new(@settings_frame, "start")
|
292
|
+
@start_button.connect(SEL_COMMAND, method(:start))
|
293
|
+
@start_button.disable
|
294
|
+
|
295
|
+
|
296
|
+
gbox = FXGroupBox.new(@settings_frame, "Extensions", LAYOUT_SIDE_LEFT|FRAME_GROOVE|LAYOUT_FILL_X|LAYOUT_FILL_Y, 0, 0, 0, 150)
|
297
|
+
gbframe = FXVerticalFrame.new(gbox, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
|
298
|
+
@extensions_text = FXText.new(gbframe, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|TEXT_WORDWRAP)
|
299
|
+
ext = "bak;php;asp;aspx;tgz;tar.gz;gz;tmp;temp;old;_"
|
300
|
+
# fxtext.backColor = fxtext.parent.backColor
|
301
|
+
# fxtext.disable
|
302
|
+
# text = "FileFinder allows you to search easily for specific files, e.g. files you have uploaded.\nIf you want to search for multiple files you can also use a db-file, "
|
303
|
+
# text << "which is a plain text file - each filename on one line."
|
304
|
+
|
305
|
+
@extensions_text.setText(ext)
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
log_frame_header = FXHorizontalFrame.new(log_frame, :opts => LAYOUT_FILL_X)
|
310
|
+
FXLabel.new(log_frame_header, "Logs:" )
|
311
|
+
|
312
|
+
|
313
|
+
#log_text_frame = FXHorizontalFrame.new(bottom_frame, :opts => LAYOUT_FILL_X|FRAME_SUNKEN|LAYOUT_BOTTOM)
|
314
|
+
log_text_frame = FXVerticalFrame.new(log_frame, LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN|FRAME_THICK, :padding=>0)
|
315
|
+
@log_viewer = LogViewer.new(log_text_frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
|
316
|
+
|
317
|
+
updateView()
|
318
|
+
rescue => bang
|
319
|
+
puts bang
|
320
|
+
puts bang.backtrace if $DEBUG
|
321
|
+
end
|
322
|
+
end
|
323
|
+
|
324
|
+
def create
|
325
|
+
@log_viewer.purge
|
326
|
+
@request_editor.setText('')
|
327
|
+
@requestCombo.clearItems()
|
328
|
+
@start_button.text = "Start"
|
329
|
+
super # Create the windows
|
330
|
+
show(PLACEMENT_SCREEN) # Make the main window appear
|
331
|
+
disableOptions()
|
332
|
+
end
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
private
|
337
|
+
|
338
|
+
def onSelectRequest(sender, sel, item)
|
339
|
+
begin
|
340
|
+
chat = @requestCombo.getItemData(@requestCombo.currentItem)
|
341
|
+
updateRequestEditor(chat)
|
342
|
+
rescue => bang
|
343
|
+
puts "could not update request"
|
344
|
+
puts bang
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
348
|
+
def updateRequestCombo(chat_list)
|
349
|
+
@requestCombo.clearItems()
|
350
|
+
chat_list.each do |chat|
|
351
|
+
text = "[#{chat.id}] #{chat.request.url}"
|
352
|
+
@requestCombo.appendItem(text.slice(0..60), chat)
|
353
|
+
end
|
354
|
+
if @requestCombo.numItems > 0 then
|
355
|
+
if @requestCombo.numItems < 10 then
|
356
|
+
@requestCombo.numVisible = @requestCombo.numItems
|
357
|
+
else
|
358
|
+
@requestCombo.numVisible = 10
|
359
|
+
end
|
360
|
+
@requestCombo.setCurrentItem(0, true)
|
361
|
+
chat = @requestCombo.getItemData(0)
|
362
|
+
end
|
363
|
+
|
364
|
+
end
|
365
|
+
|
366
|
+
def updateRequestEditor(chat=nil)
|
367
|
+
@request_editor.setText('')
|
368
|
+
return if chat.nil?
|
369
|
+
#chat = createChat(site, dir)
|
370
|
+
#@request_box.setText(chat)
|
371
|
+
request = chat.copyRequest
|
372
|
+
# request.replaceFileExt('')
|
373
|
+
@request_editor.setText(request.join.gsub(/\r/,""))
|
374
|
+
end
|
375
|
+
|
376
|
+
def createChat()
|
377
|
+
request = @request_editor.parseRequest()
|
378
|
+
chat = Watobo::Chat.new(request, [], :id => 0)
|
379
|
+
end
|
380
|
+
|
381
|
+
def onSiteSelect(sender, sel, item)
|
382
|
+
ci = @sites_combo.currentItem
|
383
|
+
@request_editor.setText('')
|
384
|
+
@requestCombo.clearItems()
|
385
|
+
|
386
|
+
@dir_combo.clearItems()
|
387
|
+
@dir = ""
|
388
|
+
|
389
|
+
if ci > 0 then
|
390
|
+
@site = @sites_combo.getItemData(ci)
|
391
|
+
if @site
|
392
|
+
@dir_combo.appendItem("/", nil)
|
393
|
+
|
394
|
+
chats = @project.findChats(@site, :method => "GET")
|
395
|
+
updateRequestCombo(chats)
|
396
|
+
updateRequestEditor(chats.first)
|
397
|
+
if @project then
|
398
|
+
@project.listDirs(@site) do |dir|
|
399
|
+
text = "/" + dir.slice(0..35)
|
400
|
+
text.gsub!(/\/+/, '/')
|
401
|
+
@dir_combo.appendItem(text, dir)
|
402
|
+
end
|
403
|
+
@dir_combo.setCurrentItem(0, true) if @dir_combo.numItems > 0
|
404
|
+
end
|
405
|
+
end
|
406
|
+
enableOptions()
|
407
|
+
@dir_combo.enable
|
408
|
+
@start_button.enable
|
409
|
+
else
|
410
|
+
@site = nil
|
411
|
+
@request_editor.setText('')
|
412
|
+
disableOptions()
|
413
|
+
@start_button.disable
|
414
|
+
end
|
415
|
+
end
|
416
|
+
|
417
|
+
def disableOptions()
|
418
|
+
# @use_ssl.setCheck(false)
|
419
|
+
# @use_ssl.disable
|
420
|
+
@test_all_dirs.setCheck(false)
|
421
|
+
@test_all_dirs.disable
|
422
|
+
# @run_passive_checks.setCheck(false)
|
423
|
+
@dir_combo.disable
|
424
|
+
#@run_passive_checks.disable
|
425
|
+
@request_editor.enabled = false
|
426
|
+
@request_editor.backColor = FXColor::LightGrey
|
427
|
+
end
|
428
|
+
|
429
|
+
def enableOptions()
|
430
|
+
# @use_ssl.enable
|
431
|
+
@test_all_dirs.enable
|
432
|
+
@dir_combo.enable
|
433
|
+
@request_editor.enabled = true
|
434
|
+
@request_editor.backColor = FXColor::White
|
435
|
+
#@run_passive_checks.enable
|
436
|
+
end
|
437
|
+
|
438
|
+
def onDirSelect(sender, sel, item)
|
439
|
+
|
440
|
+
|
441
|
+
ci = @dir_combo.currentItem
|
442
|
+
|
443
|
+
if ci > 0 then
|
444
|
+
@dir = @dir_combo.getItemData(ci)
|
445
|
+
else
|
446
|
+
@dir = ""
|
447
|
+
end
|
448
|
+
chats = @project.findChats(@site, :method => "GET", :dir => @dir)
|
449
|
+
updateRequestCombo(chats)
|
450
|
+
updateRequestEditor(chats.first)
|
451
|
+
end
|
452
|
+
|
453
|
+
|
454
|
+
def selectDBFile(sender, sel, item)
|
455
|
+
filename = FXFileDialog.getOpenFilename(self, "Save file", @db_path, "All Files (*)")
|
456
|
+
if filename != ""
|
457
|
+
@dbfile_dt.value = filename
|
458
|
+
@dbfile_text.handle(self, FXSEL(SEL_UPDATE, 0), nil)
|
459
|
+
end
|
460
|
+
end
|
461
|
+
|
462
|
+
|
463
|
+
def hide()
|
464
|
+
|
465
|
+
#puts "* #{self.class} closed"
|
466
|
+
@scanner.cancel() if @scanner
|
467
|
+
|
468
|
+
self.destroy
|
469
|
+
|
470
|
+
end
|
471
|
+
|
472
|
+
def start(sender, sel, item)
|
473
|
+
if @start_button.text =~ /cancel/i then
|
474
|
+
@scanner.cancel()
|
475
|
+
@start_button.text = "Start"
|
476
|
+
@pbar.progress = 0
|
477
|
+
return
|
478
|
+
end
|
479
|
+
@start_button.text = "Cancel"
|
480
|
+
chatlist = []
|
481
|
+
checklist = []
|
482
|
+
@check = Check.new(@project, @dbfile_dt.value, @project.getScanPreferences())
|
483
|
+
|
484
|
+
if @append_extensions_cb.checked?
|
485
|
+
extensions = @extensions_text.text.split(/(;|\n)/).select {|x| x !~ /(\n|;)/ }
|
486
|
+
@check.set_extensions(extensions)
|
487
|
+
end
|
488
|
+
|
489
|
+
@check.append_slash = @append_slash_cb.checked?
|
490
|
+
|
491
|
+
@check.subscribe(:new_finding) { |f|
|
492
|
+
Thread.new { @project.addFinding(f) }
|
493
|
+
}
|
494
|
+
|
495
|
+
@check.path = @path
|
496
|
+
|
497
|
+
checklist.push @check
|
498
|
+
@check.resetCounters()
|
499
|
+
|
500
|
+
@log_viewer.log(LOG_INFO, "Starting ...")
|
501
|
+
puts "Site: #{@site}"
|
502
|
+
|
503
|
+
@progress_window = Watobo::Gui::ProgressWindow.new(self)
|
504
|
+
|
505
|
+
|
506
|
+
@progress_window.show(PLACEMENT_SCREEN)
|
507
|
+
t = Thread.new{
|
508
|
+
begin
|
509
|
+
c=1
|
510
|
+
if @test_all_dirs.checked? then
|
511
|
+
c = 0
|
512
|
+
@project.listDirs(@site, :base_dir => @dir, :include_subdirs => @test_all_dirs.checked?) { c += 1 }
|
513
|
+
@progress_window.update_progress( :title => "File Finder Plugin", :total => c, :job => @dir)
|
514
|
+
@project.listDirs(@site, :base_dir => @dir, :include_subdirs => @test_all_dirs.checked?) do |dir|
|
515
|
+
m = "running checks on #{dir}"
|
516
|
+
@log_viewer.log(LOG_INFO,m)
|
517
|
+
chat = createChat()
|
518
|
+
|
519
|
+
chat.request.replaceFileExt('')
|
520
|
+
chat.request.setDir(dir)
|
521
|
+
chatlist.push chat
|
522
|
+
# @check.getCheckCount(chat)
|
523
|
+
@check.updateCounters(chat)
|
524
|
+
@progress_window.update_progress(:increment => 1)
|
525
|
+
end
|
526
|
+
else
|
527
|
+
notify(:update_progress, :total => c, :job => @dir)
|
528
|
+
m = "running checks on #{@dir}"
|
529
|
+
@log_viewer.log(LOG_INFO,m)
|
530
|
+
chat = createChat()
|
531
|
+
chatlist.push chat
|
532
|
+
@check.updateCounters(chat)
|
533
|
+
@progress_window.update_progress(:increment => 1)
|
534
|
+
end
|
535
|
+
rescue => bang
|
536
|
+
puts bang
|
537
|
+
puts bang.backtrace if $DEBUG
|
538
|
+
ensure
|
539
|
+
@progress_window.hide
|
540
|
+
end
|
541
|
+
}
|
542
|
+
|
543
|
+
|
544
|
+
t.join
|
545
|
+
|
546
|
+
# puts @project
|
547
|
+
# puts @project.getScanPreferences().to_yaml
|
548
|
+
# puts
|
549
|
+
@scanner = Watobo::Scanner2.new(chatlist, checklist, @project.passive_checks, @project.getScanPreferences())
|
550
|
+
@pbar.total = @check.numChecks
|
551
|
+
@pbar.progress = 0
|
552
|
+
@pbar.barColor = 'red'
|
553
|
+
|
554
|
+
speed = 0
|
555
|
+
lasttime = 0
|
556
|
+
@scanner.subscribe(:progress) { |m|
|
557
|
+
time = Time.now.to_i
|
558
|
+
if time == lasttime then
|
559
|
+
speed += 1
|
560
|
+
else
|
561
|
+
@speed.text = "Requests per second: #{speed}"
|
562
|
+
speed = 1
|
563
|
+
lasttime = time
|
564
|
+
end
|
565
|
+
@pbar.increment(1)
|
566
|
+
}
|
567
|
+
|
568
|
+
|
569
|
+
|
570
|
+
m= "Total Requests: #{@check.numChecks}"
|
571
|
+
@log_viewer.log(LOG_INFO,m)
|
572
|
+
|
573
|
+
Thread.new {
|
574
|
+
begin
|
575
|
+
m = "start scanning..."
|
576
|
+
@log_viewer.log(LOG_INFO,m)
|
577
|
+
scan_prefs = @project.getScanPreferences()
|
578
|
+
scan_prefs[:run_passive_checks] = false
|
579
|
+
@scanner.run(scan_prefs)
|
580
|
+
m = "scanning finished!"
|
581
|
+
@log_viewer.log(LOG_INFO,m)
|
582
|
+
rescue => bang
|
583
|
+
puts bang
|
584
|
+
puts bang.backtrace if $DEBUG
|
585
|
+
end
|
586
|
+
@pbar.progress = 0
|
587
|
+
@pbar.barColor = 'grey'
|
588
|
+
@speed.text = "Requests per second: 0"
|
589
|
+
@start_button.text = "Start"
|
590
|
+
}
|
591
|
+
end
|
592
|
+
|
593
|
+
end
|
594
|
+
end
|
595
|
+
end
|
596
|
+
end
|
597
|
+
|
598
|
+
|
599
|
+
if __FILE__ == $0
|
600
|
+
puts "Running #{__FILE__}"
|
601
|
+
catalog = Watobo::Plugin::Catalog.new(project)
|
602
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# .
|
2
|
+
# sslchecker_cli.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
|
+
# .
|