Class: Watobo::Gui::FindingInfo
- Inherits:
-
FXVerticalFrame
- Object
- FXVerticalFrame
- Watobo::Gui::FindingInfo
- Defined in:
- lib/watobo/gui/finding_info.rb
Constant Summary
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::AUTH_TYPE_UNKNOWN, 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 Icons
Icons::ICON_ADD_PROJECT, Icons::ICON_BROWSER_MEDIUM, Icons::ICON_BROWSER_SMALL, Icons::ICON_BTN_DOWN, Icons::ICON_BTN_UP, Icons::ICON_CB_CHECKED, Icons::ICON_CB_CHECKED_ORANGE, Icons::ICON_CB_UNCHECKED, Icons::ICON_CONVERSATION, Icons::ICON_DASHBOARD, Icons::ICON_DIFFER, Icons::ICON_FOLDER, Icons::ICON_FOLDER_SMALL, Icons::ICON_FUZZER, Icons::ICON_FUZZER_MEDIUM, Icons::ICON_FUZZER_SMALL, Icons::ICON_FUZZ_FILTER, Icons::ICON_FUZZ_GENERATOR, Icons::ICON_FUZZ_TAG, Icons::ICON_HINTS, Icons::ICON_HINTS_INFO, Icons::ICON_HINTS_INFO_SMALL, Icons::ICON_HINTS_SMALL, Icons::ICON_INFO, Icons::ICON_INFO_INFO, Icons::ICON_INFO_INFO_SMALL, Icons::ICON_INFO_SMALL, Icons::ICON_INFO_USER, Icons::ICON_INFO_USER_SMALL, Icons::ICON_INTERCEPTOR, Icons::ICON_LOGIN_WIZZARD, Icons::ICON_MANUAL_REQUEST, Icons::ICON_MANUAL_REQUEST_MEDIUM, Icons::ICON_MANUAL_REQUEST_SMALL, Icons::ICON_PAUSE, Icons::ICON_PLUGIN, Icons::ICON_PROJECT, Icons::ICON_PROJECT_SMALL, Icons::ICON_REPORT, Icons::ICON_REQUEST, Icons::ICON_REQUEST_SMALL, Icons::ICON_SEND_REQUEST, Icons::ICON_SITE, Icons::ICON_SITE_SMALL, Icons::ICON_START, Icons::ICON_STOP, Icons::ICON_TOKEN, Icons::ICON_TRANSCODER, Icons::ICON_VULN, Icons::ICON_VULN_BP, Icons::ICON_VULN_BP_SMALL, Icons::ICON_VULN_CRITICAL, Icons::ICON_VULN_CRITICAL_SMALL, Icons::ICON_VULN_HIGH, Icons::ICON_VULN_HIGH_SMALL, Icons::ICON_VULN_LOW, Icons::ICON_VULN_LOW_SMALL, Icons::ICON_VULN_MEDIUM, Icons::ICON_VULN_MEDIUM_SMALL, Icons::ICON_VULN_SMALL, Icons::ICON_WATOBO, Icons::SIBERAS_ICON, Icons::TBL_ICON_LOCK, Icons::WATOBO_LOGO
Instance Method Summary collapse
-
#initialize(owner, opts) ⇒ FindingInfo
constructor
A new instance of FindingInfo.
- #resetInfo ⇒ Object
- #showInfo(finding) ⇒ Object
Constructor Details
#initialize(owner, opts) ⇒ FindingInfo
Returns a new instance of FindingInfo.
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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/watobo/gui/finding_info.rb', line 78 def initialize(owner, opts) super(owner, opts) @font_title = FXFont.new(getApp(), "helvetica", 14, FONTWEIGHT_BOLD, FONTSLANT_ITALIC, FONTENCODING_DEFAULT) @font_text = FXFont.new(getApp(), "courier", 12, FONTWEIGHT_BOLD) main = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_GROOVE) main.backColor = FXColor::White frame = FXHorizontalFrame.new(main, :opts => LAYOUT_FILL_X|FRAME_GROOVE) frame.backColor = FXColor::White #@imageview = FXImageView.new(header, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|HSCROLLER_NEVER|VSCROLLER_NEVER) #@imageview = FXImageView.new(header, :opts => LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT|HSCROLLER_NEVER|VSCROLLER_NEVER, :width => 50, :height => 50) #@imageview.image = ICON_WATOBO @finding_icon = FXButton.new(frame, '', ICON_WATOBO, :opts => FRAME_NONE) @finding_icon.backColor = FXColor::White @finding_title = FXLabel.new(frame, "- N/A -", nil, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y) @finding_title.setFont(@font_title) @finding_title.backColor = FXColor::White @finding_title.justify = JUSTIFY_LEFT|JUSTIFY_CENTER_Y frame = FXHorizontalFrame.new(main, :opts => LAYOUT_FILL_X) frame.backColor = FXColor::White label = FXLabel.new(frame, "Rating: ") label.backColor = FXColor::White label.setFont(@font_text) = FXLabel.new(frame, "- N/A -", nil, :opts => JUSTIFY_CENTER_X|LAYOUT_FILL_X) .setFont(@font_text) .backColor = FXColor::White .justify = JUSTIFY_LEFT frame = FXHorizontalFrame.new(main, :opts => LAYOUT_FILL_X|FRAME_GROOVE) frame.backColor = FXColor::White label = FXLabel.new(frame, "Threat:") label.backColor = FXColor::White label.setFont(@font_title) threat = FXHorizontalFrame.new(main, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0) threat.backColor = FXColor::White #@finding_thread = FXLabel.new(thread, "- N/A -", nil, :opts => JUSTIFY_CENTER_X|LAYOUT_FILL_X) @finding_threat = FXText.new(threat, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|TEXT_READONLY|TEXT_WORDWRAP) # Enable the style buffer for this text widget @finding_threat .styled = true @finding_threat.setFont(@font_text) @finding_threat.backColor = FXColor::White # @finding_thread.justify = JUSTIFY_LEFT frame = FXHorizontalFrame.new(main, :opts => LAYOUT_FILL_X|FRAME_GROOVE) frame.backColor = FXColor::White label = FXLabel.new(frame, "Measure:") label.backColor = FXColor::White label.setFont(@font_title) measure = FXHorizontalFrame.new(main, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0) measure.backColor = FXColor::White @finding_measure =FXText.new(measure, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|TEXT_READONLY|TEXT_WORDWRAP) #FXLabel.new(measure, "- N/A -", nil, :opts => JUSTIFY_CENTER_X|LAYOUT_FILL_X) @finding_measure.setFont(@font_text) @finding_measure.backColor = FXColor::White # @finding_measure.justify = JUSTIFY_LEFT frame = FXHorizontalFrame.new(main, :opts => LAYOUT_FILL_X|FRAME_GROOVE) frame.backColor = FXColor::White label = FXLabel.new(frame, "Details:") label.backColor = FXColor::White label.setFont(@font_title) details = FXHorizontalFrame.new(main, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0) details.backColor = FXColor::White @finding_details =FXText.new(details, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|TEXT_READONLY|TEXT_WORDWRAP) @finding_details.setFont(@font_text) @finding_details.backColor = FXColor::White info = FXHorizontalFrame.new(main, :opts => LAYOUT_FILL_X|FRAME_GROOVE) info.backColor = FXColor::White frame = FXHorizontalFrame.new(info, :opts => LAYOUT_FILL_X) FXLabel.new(frame, "Finding-ID:") @finding_id = FXLabel.new(frame,"-") frame = FXHorizontalFrame.new(info, :opts => LAYOUT_FILL_X) FXLabel.new(frame, "Date:") @finding_date = FXLabel.new(frame,"-") frame = FXHorizontalFrame.new(info, :opts => LAYOUT_FILL_X) FXLabel.new(frame, "Module:") @finding_module = FXLabel.new(frame,"-") frame = FXHorizontalFrame.new(info, :opts => LAYOUT_FILL_X) FXLabel.new(frame, "Chat-ID:") @finding_chat = FXLabel.new(frame,"-") frame = FXHorizontalFrame.new(info, :opts => LAYOUT_FILL_X) FXLabel.new(frame, "Check-Pattern:") @finding_check = FXLabel.new(frame,"-") frame = FXHorizontalFrame.new(info, :opts => LAYOUT_FILL_X) FXLabel.new(frame, "Proof-Pattern:") @finding_proof = FXLabel.new(frame,"-") frame = FXHorizontalFrame.new(info, :opts => LAYOUT_FILL_X) FXLabel.new(frame, "CVSS (Base-Score):") @finding_cvss = FXLabel.new(frame,"-") end |
Instance Method Details
#resetInfo ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/watobo/gui/finding_info.rb', line 9 def resetInfo() @finding_title.text = "-" @finding_date.text = "-" @finding_module.text = "-" @finding_check.text = "-" @finding_proof.text = "-" @finding_threat.text = "-" .text = "-" @finding_cvss.text = "-" @finding_measure.text = "-" # @finding_references.text = "-" end |
#showInfo(finding) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/watobo/gui/finding_info.rb', line 24 def showInfo(finding) # p "* show info" resetInfo() case finding.details[:type] when FINDING_TYPE_INFO icon = ICON_INFO_INFO = "Info" when FINDING_TYPE_HINT icon = ICON_HINTS_INFO = "Hint" when FINDING_TYPE_VULN if finding.details[:rating] == VULN_RATING_LOW icon = ICON_VULN_LOW = "Low" end if finding.details[:rating] == VULN_RATING_MEDIUM icon = ICON_VULN_MEDIUM = "Medium" end if finding.details[:rating] == VULN_RATING_HIGH icon=ICON_VULN_HIGH = "High" end if finding.details[:rating] == VULN_RATING_CRITICAL icon=ICON_VULN_CRITICAL = "Critical" end end @finding_icon.icon = icon @finding_title.text = finding.details[:class] .text = @finding_threat.text = finding.details[:threat] @finding_measure.text = finding.details[:measure] @finding_details.text = (finding.details.has_key? :output) ? finding.details[:output] : finding.details[:details] @finding_date.text = finding.details[:tstamp] @finding_module.text = finding.details[:module] @finding_chat.text = finding.id.to_s @finding_check.text = finding.details[:check_pattern] @finding_proof.text = finding.details[:proof_pattern] @finding_id.text = finding.id.to_s self.recalc() self.update() # p "* ok" end |