indentation compliance

bug/bundler_fix
RageLtMan 2013-03-07 14:57:03 -05:00
parent 6e8f3ff8fe
commit b74fce7e24
1 changed files with 32 additions and 32 deletions

View File

@ -137,13 +137,13 @@ class Plugin::Wmap < Msf::Plugin
else else
print_error("Unable to create site") print_error("Unable to create site")
end end
when '-d' when '-d'
del_idx = args.shift del_idx = args.shift
if del_idx if del_idx
delete_site(del_idx.to_i) delete_site(del_idx.to_i)
else else
print_error("Provide index of site to delete") print_error("Provide index of site to delete")
end end
when '-l' when '-l'
view_sites view_sites
return return
@ -168,8 +168,8 @@ class Plugin::Wmap < Msf::Plugin
# Parameters are in url form # Parameters are in url form
view_site_tree(u,l,s) view_site_tree(u,l,s)
else else
# Parameters are digits # Parameters are digits
if !self.lastsites or self.lastsites.length == 0 if !self.lastsites or self.lastsites.length == 0
view_sites view_sites
print_status ("Web sites ids. referenced from previous table.") print_status ("Web sites ids. referenced from previous table.")
end end
@ -204,7 +204,7 @@ class Plugin::Wmap < Msf::Plugin
print_status("Usage: wmap_sites [options]") print_status("Usage: wmap_sites [options]")
print_line("\t-h Display this help text") print_line("\t-h Display this help text")
print_line("\t-a [url] Add site (vhost,url)") print_line("\t-a [url] Add site (vhost,url)")
print_line("\t-d [id] Delete site") print_line("\t-d [id] Delete site")
print_line("\t-l List all available sites") print_line("\t-l List all available sites")
print_line("\t-s [id] Display site structure (vhost,url|ids) (level)") print_line("\t-s [id] Display site structure (vhost,url|ids) (level)")
@ -1233,23 +1233,23 @@ class Plugin::Wmap < Msf::Plugin
print_status tbl.to_s + "\n" print_status tbl.to_s + "\n"
end end
def delete_site(wmap_index) def delete_site(wmap_index)
print_status("Deleting site #{wmap_index}") print_status("Deleting site #{wmap_index}")
idx = 0 idx = 0
self.framework.db.hosts.each do |bdhost| self.framework.db.hosts.each do |bdhost|
bdhost.services.each do |serv| bdhost.services.each do |serv|
serv.web_sites.each do |web| serv.web_sites.each do |web|
if idx == wmap_index if idx == wmap_index
web.delete web.delete
print_status("Deleted #{web.vhost} on #{bdhost.address} at index #{idx}") print_status("Deleted #{web.vhost} on #{bdhost.address} at index #{idx}")
return return
else else
idx += 1 idx += 1
end end
end end
end end
end end
end end
def view_sites def view_sites
@ -1541,7 +1541,7 @@ class Plugin::Wmap < Msf::Plugin
next next
end end
sites = serv.web_sites.where('vhost = ? and service_id = ?', vhost, serv.id) sites = serv.web_sites.where('vhost = ? and service_id = ?', vhost, serv.id)
sites.each do |site| sites.each do |site|
t = load_tree(site) t = load_tree(site)
@ -1998,10 +1998,10 @@ class Plugin::Wmap < Msf::Plugin
color = self.opts["ConsoleDriver"].output.supports_color? rescue false color = self.opts["ConsoleDriver"].output.supports_color? rescue false
colors = [ colors = [
'%grn', '%grn',
'%blu', '%blu',
'%yel', '%yel',
'%whi' '%whi'
] ]
#begin #begin