Class: Watobo::Gui::PageTree
- Inherits:
-
FXTreeList
- Object
- FXTreeList
- Watobo::Gui::PageTree
show all
- Includes:
- Constants, Icons
- Defined in:
- lib/watobo/gui/page_tree.rb
Constant Summary
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
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
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(parent, page = nil, prefs = {}) ⇒ PageTree
Returns a new instance of PageTree.
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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
|
# File 'lib/watobo/gui/page_tree.rb', line 61
def initialize(parent, page=nil, prefs={})
@page = page
@quick_filter = Hash.new
opts = LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_TOP|TREELIST_SHOWS_LINES|TREELIST_SHOWS_BOXES|TREELIST_ROOT_BOXES|TREELIST_EXTENDEDSELECT
opts = prefs[:opts] if prefs.has_key? :opts
super(parent, :opts => opts)
@event_dispatcher_listeners = Hash.new
@filters = {
:element => []
}
forms = self.appendItem(nil, "load a new page first!", nil, nil)
self.connect(SEL_COMMAND) do |sender, sel, item|
if item.data.is_a? Mechanize::Form
puts "Form Selected"
notify(:form_selected, item.data)
elsif item.data.is_a? Mechanize::Form::Field
puts "Field Selected"
notify(:form_selected, item.parent.data)
notify(:field_selected, item)
end
end
self.connect(SEL_RIGHTBUTTONRELEASE) do |sender, sel, event|
exclude_site = nil
unless event.moved?
.new(self) do ||
item = sender.getItemAt(event.win_x, event.win_y)
unless item.nil?
unless self.itemLeaf?(item)
.new()
FXMenuCommand.new(, "expand tree" ).connect(SEL_COMMAND) {
expandFullTree(item)
}
FXMenuCommand.new(, "collapse tree" ).connect(SEL_COMMAND) {
self.collapseFullTree(item)
}
end
data = self.getItemData(item)
if item == "Forms" then
puts "Right Click Forms"
.new()
FXMenuCommand.new(, "found Form Item" ).connect(SEL_COMMAND) {
notify(:add_site_to_scope, item.to_s)
}
else
puts "Didn't click Forms"
end
end
.create
.(nil, event.root_x, event.root_y)
app.runModalWhileShown()
end
end
end
end
|
Instance Attribute Details
#page ⇒ Object
Returns the value of attribute page.
8
9
10
|
# File 'lib/watobo/gui/page_tree.rb', line 8
def page
@page
end
|
Instance Method Details
#collapseFullTree(item) ⇒ Object
48
49
50
51
52
53
|
# File 'lib/watobo/gui/page_tree.rb', line 48
def collapseFullTree(item)
self.collapseTree(item)
item.each do |c|
collapseFullTree(c) if !self.itemLeaf?(c)
end
end
|
#expandFullTree(item) ⇒ Object
41
42
43
44
45
46
|
# File 'lib/watobo/gui/page_tree.rb', line 41
def expandFullTree(item)
self.expandTree(item)
item.each do |c|
expandFullTree(c) if !self.itemLeaf?(c)
end
end
|
#hidden?(chat) ⇒ Boolean
55
56
57
58
59
|
# File 'lib/watobo/gui/page_tree.rb', line 55
def hidden?(chat)
false
end
|
#refresh_tree ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/watobo/gui/page_tree.rb', line 27
def refresh_tree()
self.clearItems
unless @page.nil?
if page.forms.length > 0
page.forms.each do |f|
add_form_item f
end
else
self.appendItem(nil, "Forms ()", nil, nil)
end
end
end
|
#reload ⇒ Object
16
17
18
19
20
|
# File 'lib/watobo/gui/page_tree.rb', line 16
def reload()
self.clearItems
end
|
#subscribe(event, &callback) ⇒ Object
12
13
14
|
# File 'lib/watobo/gui/page_tree.rb', line 12
def subscribe(event, &callback)
(@event_dispatcher_listeners[event] ||= []) << callback
end
|