Permalink
Browse files

indentation compliance

  • Loading branch information...
1 parent 6e8f3ff commit b74fce7e24f0be17674e05b394fb6f0ead5556d1 RageLtMan committed Mar 7, 2013
Showing with 32 additions and 32 deletions.
  1. +32 −32 plugins/wmap.rb
View
@@ -137,13 +137,13 @@ def cmd_wmap_sites(*args)
else
print_error("Unable to create site")
end
- when '-d'
- del_idx = args.shift
- if del_idx
- delete_site(del_idx.to_i)
- else
- print_error("Provide index of site to delete")
- end
+ when '-d'
+ del_idx = args.shift
+ if del_idx
+ delete_site(del_idx.to_i)
+ else
+ print_error("Provide index of site to delete")
+ end
when '-l'
view_sites
return
@@ -168,8 +168,8 @@ def cmd_wmap_sites(*args)
# Parameters are in url form
view_site_tree(u,l,s)
else
- # Parameters are digits
- if !self.lastsites or self.lastsites.length == 0
+ # Parameters are digits
+ if !self.lastsites or self.lastsites.length == 0
view_sites
print_status ("Web sites ids. referenced from previous table.")
end
@@ -204,7 +204,7 @@ def cmd_wmap_sites(*args)
print_status("Usage: wmap_sites [options]")
print_line("\t-h Display this help text")
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-s [id] Display site structure (vhost,url|ids) (level)")
@@ -1233,23 +1233,23 @@ def view_targets
print_status tbl.to_s + "\n"
end
- def delete_site(wmap_index)
- print_status("Deleting site #{wmap_index}")
- idx = 0
- self.framework.db.hosts.each do |bdhost|
- bdhost.services.each do |serv|
- serv.web_sites.each do |web|
- if idx == wmap_index
- web.delete
- print_status("Deleted #{web.vhost} on #{bdhost.address} at index #{idx}")
- return
- else
- idx += 1
- end
- end
- end
- end
- end
+ def delete_site(wmap_index)
+ print_status("Deleting site #{wmap_index}")
+ idx = 0
+ self.framework.db.hosts.each do |bdhost|
+ bdhost.services.each do |serv|
+ serv.web_sites.each do |web|
+ if idx == wmap_index
+ web.delete
+ print_status("Deleted #{web.vhost} on #{bdhost.address} at index #{idx}")
+ return
+ else
+ idx += 1
+ end
+ end
+ end
+ end
+ end
def view_sites
@@ -1541,7 +1541,7 @@ def view_site_tree(urlstr, md, ld)
next
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|
t = load_tree(site)
@@ -1998,10 +1998,10 @@ def rpc_mon_nodes()
color = self.opts["ConsoleDriver"].output.supports_color? rescue false
colors = [
- '%grn',
- '%blu',
- '%yel',
- '%whi'
+ '%grn',
+ '%blu',
+ '%yel',
+ '%whi'
]
#begin

0 comments on commit b74fce7

Please sign in to comment.