Class: Watobo::Plugin::Crawler::Gui
- Inherits:
-
Watobo::Plugin2
- Object
- FXDialogBox
- Watobo::Plugin2
- Watobo::Plugin::Crawler::Gui
- Includes:
- Constants
- Defined in:
- plugins/crawler/gui/auth_frame.rb,
plugins/crawler/gui/crawler_gui.rb,
plugins/crawler/gui/hooks_frame.rb,
plugins/crawler/gui/scope_frame.rb,
plugins/crawler/gui/status_frame.rb,
plugins/crawler/gui/settings_tabbook.rb,
plugins/crawler/gui/general_settings_frame.rb
Defined Under Namespace
Classes: AuthFrame, FormFieldsTable, GeneralSettingsFrame, HooksFrame, PasswordMatchError, ScopeFrame, SettingsTabBook, StatusFrame, UsernameError
Constant Summary
Constants included from Constants
Constants::CRAWL_NONE, Constants::CRAWL_PAUSED, Constants::CRAWL_RUNNING
Constants included from Constants
Constants::AC_GROUP_APACHE, Constants::AC_GROUP_DOMINO, Constants::AC_GROUP_ENUMERATION, Constants::AC_GROUP_FILE_INCLUSION, Constants::AC_GROUP_FLASH, Constants::AC_GROUP_GENERIC, Constants::AC_GROUP_JBOSS, Constants::AC_GROUP_JOOMLA, Constants::AC_GROUP_SAP, Constants::AC_GROUP_SQL, Constants::AC_GROUP_TYPO3, Constants::AC_GROUP_XSS, Constants::AUTH_TYPE_BASIC, Constants::AUTH_TYPE_DIGEST, Constants::AUTH_TYPE_NONE, Constants::AUTH_TYPE_NTLM, Constants::CHAT_SOURCE_AUTO_SCAN, Constants::CHAT_SOURCE_FUZZER, Constants::CHAT_SOURCE_INTERCEPT, Constants::CHAT_SOURCE_MANUAL, Constants::CHAT_SOURCE_MANUAL_SCAN, Constants::CHAT_SOURCE_PROXY, Constants::CHAT_SOURCE_UNDEF, Constants::DEFAULT_PORT_HTTP, Constants::DEFAULT_PORT_HTTPS, Constants::FINDING_TYPE_HINT, Constants::FINDING_TYPE_INFO, Constants::FINDING_TYPE_UNDEFINED, Constants::FINDING_TYPE_VULN, Constants::FIRST_TIME_FILE, Constants::GUI_REGULAR_FONT_SIZE, Constants::GUI_SMALL_FONT_SIZE, Constants::ICON_PATH, Constants::LOG_DEBUG, Constants::LOG_INFO, Constants::SCAN_CANCELED, Constants::SCAN_FINISHED, Constants::SCAN_PAUSED, Constants::SCAN_STARTED, Constants::TE_CHUNKED, Constants::TE_COMPRESS, Constants::TE_DEFLATE, Constants::TE_GZIP, Constants::TE_IDENTITY, Constants::TE_NONE, Constants::VULN_RATING_CRITICAL, Constants::VULN_RATING_HIGH, Constants::VULN_RATING_INFO, Constants::VULN_RATING_LOW, Constants::VULN_RATING_MEDIUM, Constants::VULN_RATING_UNDEFINED
Constants included from Gui::Icons
Gui::Icons::ICON_ADD_PROJECT, Gui::Icons::ICON_BROWSER_MEDIUM, Gui::Icons::ICON_BROWSER_SMALL, Gui::Icons::ICON_BTN_DOWN, Gui::Icons::ICON_BTN_UP, Gui::Icons::ICON_CB_CHECKED, Gui::Icons::ICON_CB_CHECKED_ORANGE, Gui::Icons::ICON_CB_UNCHECKED, Gui::Icons::ICON_CONVERSATION, Gui::Icons::ICON_DASHBOARD, Gui::Icons::ICON_DIFFER, Gui::Icons::ICON_FOLDER, Gui::Icons::ICON_FOLDER_SMALL, Gui::Icons::ICON_FUZZER, Gui::Icons::ICON_FUZZER_MEDIUM, Gui::Icons::ICON_FUZZER_SMALL, Gui::Icons::ICON_FUZZ_FILTER, Gui::Icons::ICON_FUZZ_GENERATOR, Gui::Icons::ICON_FUZZ_TAG, Gui::Icons::ICON_HINTS, Gui::Icons::ICON_HINTS_INFO, Gui::Icons::ICON_HINTS_INFO_SMALL, Gui::Icons::ICON_HINTS_SMALL, Gui::Icons::ICON_INFO, Gui::Icons::ICON_INFO_INFO, Gui::Icons::ICON_INFO_INFO_SMALL, Gui::Icons::ICON_INFO_SMALL, Gui::Icons::ICON_INFO_USER, Gui::Icons::ICON_INFO_USER_SMALL, Gui::Icons::ICON_INTERCEPTOR, Gui::Icons::ICON_LOGIN_WIZZARD, Gui::Icons::ICON_MANUAL_REQUEST, Gui::Icons::ICON_MANUAL_REQUEST_MEDIUM, Gui::Icons::ICON_MANUAL_REQUEST_SMALL, Gui::Icons::ICON_PAUSE, Gui::Icons::ICON_PLUGIN, Gui::Icons::ICON_PROJECT, Gui::Icons::ICON_PROJECT_SMALL, Gui::Icons::ICON_REPORT, Gui::Icons::ICON_REQUEST, Gui::Icons::ICON_REQUEST_SMALL, Gui::Icons::ICON_SEND_REQUEST, Gui::Icons::ICON_SITE, Gui::Icons::ICON_SITE_SMALL, Gui::Icons::ICON_START, Gui::Icons::ICON_STOP, Gui::Icons::ICON_TOKEN, Gui::Icons::ICON_TRANSCODER, Gui::Icons::ICON_VULN, Gui::Icons::ICON_VULN_BP, Gui::Icons::ICON_VULN_BP_SMALL, Gui::Icons::ICON_VULN_CRITICAL, Gui::Icons::ICON_VULN_CRITICAL_SMALL, Gui::Icons::ICON_VULN_HIGH, Gui::Icons::ICON_VULN_HIGH_SMALL, Gui::Icons::ICON_VULN_LOW, Gui::Icons::ICON_VULN_LOW_SMALL, Gui::Icons::ICON_VULN_MEDIUM, Gui::Icons::ICON_VULN_MEDIUM_SMALL, Gui::Icons::ICON_VULN_SMALL, Gui::Icons::ICON_WATOBO, Gui::Icons::SIBERAS_ICON, Gui::Icons::TBL_ICON_LOCK, Gui::Icons::WATOBO_LOGO
Constants included from Gui
Gui::DIFF_TYPE_NEW, Gui::DIFF_TYPE_ORIG, Gui::SEL_TYPE_GREP, Gui::SEL_TYPE_HIGHLIGHT, Gui::TABLE_COL_COMMENT, Gui::TABLE_COL_COOKIE, Gui::TABLE_COL_HOST, Gui::TABLE_COL_METHOD, Gui::TABLE_COL_PARMS, Gui::TABLE_COL_PATH, Gui::TABLE_COL_SSL, Gui::TABLE_COL_STATUS
Constants included from Diff::LCS
Diff::LCS::BalancedCallbacks, Diff::LCS::PATCH_MAP, Diff::LCS::SequenceCallbacks, Diff::LCS::VERSION
Instance Method Summary collapse
-
#initialize(owner, project = nil) ⇒ Gui
constructor
A new instance of Gui.
- #set_tab_index(index) ⇒ Object
- #settings ⇒ Object
- #start_url ⇒ Object
- #updateView ⇒ Object
Methods included from Diff::LCS
LCS, __diff_direction, __inverse_vector, __lcs, __normalize_patchset, __position_hash, __replace_next_larger, diff, #diff, #lcs, patch, #patch, #patch!, patch!, sdiff, #sdiff, traverse_balanced, #traverse_balanced, traverse_sequences, #traverse_sequences, #unpatch, #unpatch!, unpatch!
Constructor Details
#initialize(owner, project = nil) ⇒ Gui
Returns a new instance of Gui.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'plugins/crawler/gui/crawler_gui.rb', line 75 def initialize(owner, project=nil) super(owner, "Crawler", project, :opts => DECOR_ALL, :width=>800, :height=>600) @plugin_name = "Crawler" @project = project @status_lock = Mutex.new @crawl_status = { :engine_status => CRAWL_NONE, :page_size => 0, :link_size => 0, :skipped_domains => 0 } main = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y) FXLabel.new(main, "Start URL, e.g. http://my.target.to/scan/:") frame = FXHorizontalFrame.new(main, :opts => LAYOUT_FILL_X) # FXLabel.new(frame, "http://") @url_txt = FXTextField.new(frame, 60, nil, 0, :opts => TEXTFIELD_NORMAL|LAYOUT_SIDE_RIGHT|LAYOUT_FILL_X) @start_button = FXButton.new(frame, "start", :opts => BUTTON_DEFAULT|BUTTON_NORMAL ) @start_button.disable @url_txt.connect(SEL_COMMAND){ |sender, sel, item| if url_valid? # @start_button.setFocus() Watobo::Plugin::Crawler.start_url = start_url end } @url_txt.connect(SEL_CHANGED){ if url_valid? @start_button.enable else @start_button.disable # Watobo::Plugin::Crawler.start_url = nil end } @start_button.connect(SEL_COMMAND){ |sender, sel, item| case sender.text when /start/i start when /cancel/i cancel end } @crawler = Watobo::Crawler::Engine.new @settings_tabbook = SettingsTabBook.new(main) @settings_tabbook.general.set @crawler.settings @settings_tabbook.auth.crawler = @crawler @settings_tabbook.scope.set @crawler.settings @log_viewer = @settings_tabbook.log_viewer @status_frame = StatusFrame.new(main) @crawler.subscribe( :update_status ){ |status| @status_lock.synchronize do @crawl_status.update status end } stbk = @settings_tabbook [ @crawler, stbk.auth].each do |i| i.subscribe( :log ){ |msg| @log_viewer.log(LOG_INFO, msg) } end end |
Instance Method Details
#set_tab_index(index) ⇒ Object
71 72 73 |
# File 'plugins/crawler/gui/crawler_gui.rb', line 71 def set_tab_index(index) @settings_tabbook.setCurrent index end |
#settings ⇒ Object
67 68 69 |
# File 'plugins/crawler/gui/crawler_gui.rb', line 67 def settings @settings_tabbook end |
#start_url ⇒ Object
62 63 64 65 |
# File 'plugins/crawler/gui/crawler_gui.rb', line 62 def start_url url = url_valid? ? URI.parse(@url_txt.text) : nil return url end |
#updateView ⇒ Object
58 59 60 |
# File 'plugins/crawler/gui/crawler_gui.rb', line 58 def updateView end |