Skip to content

Commit

Permalink
Update some more finds
Browse files Browse the repository at this point in the history
  • Loading branch information
trosen-r7 authored and mbuck-r7 committed Jan 24, 2012
1 parent 4eb79ea commit d0c74cf
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 25 deletions.
6 changes: 3 additions & 3 deletions modules/auxiliary/analyze/jtr_linux.rb
Expand Up @@ -51,7 +51,7 @@ def run

hashlist = Rex::Quickfile.new("jtrtmp")

myloots = myworkspace.loots.find(:all, :conditions => ['ltype=?', 'linux.hashes'])
myloots = myworkspace.loots.where('ltype=?', 'linux.hashes')
unless myloots.nil? or myloots.empty?
myloots.each do |myloot|
begin
Expand Down Expand Up @@ -128,7 +128,7 @@ def build_seed

seed = []
#Seed the wordlist with Database , Table, and Instance Names
schemas = myworkspace.notes.find(:all, :conditions => ['ntype like ?', '%.schema%'])
schemas = myworkspace.notes.where('ntype like ?', '%.schema%')
unless schemas.nil? or schemas.empty?
schemas.each do |anote|
anote.data.each do |key,value|
Expand All @@ -138,7 +138,7 @@ def build_seed
end
end

instances = myworkspace.notes.find(:all, :conditions => ['ntype=?', 'mssql.instancename'])
instances = myworkspace.notes.where('ntype=?', 'mssql.instancename')
unless instances.nil? or instances.empty?
instances.each do |anote|
seed << anote.data['InstanceName']
Expand Down
6 changes: 3 additions & 3 deletions modules/auxiliary/analyze/jtr_mssql_fast.rb
Expand Up @@ -51,7 +51,7 @@ def build_seed

seed = []
#Seed the wordlist with Database , Table, and Instance Names
schemas = myworkspace.notes.find(:all, :conditions => ['ntype like ?', '%.schema%'])
schemas = myworkspace.notes.where('ntype like ?', '%.schema%')
unless schemas.nil? or schemas.empty?
schemas.each do |anote|
anote.data.each do |key,value|
Expand All @@ -61,7 +61,7 @@ def build_seed
end
end

instances = myworkspace.notes.find(:all, :conditions => ['ntype=?', 'mssql.instancename'])
instances = myworkspace.notes.where('ntype=?', 'mssql.instancename')
unless instances.nil? or instances.empty?
instances.each do |anote|
seed << anote.data['InstanceName']
Expand Down Expand Up @@ -92,7 +92,7 @@ def crack(format)

hashlist = Rex::Quickfile.new("jtrtmp")
ltype= "#{format}.hashes"
myloots = myworkspace.loots.find(:all, :conditions => ['ltype=?', ltype])
myloots = myworkspace.loots.where('ltype=?', ltype)
unless myloots.nil? or myloots.empty?
myloots.each do |myloot|
begin
Expand Down
6 changes: 3 additions & 3 deletions modules/auxiliary/analyze/jtr_mysql_fast.rb
Expand Up @@ -43,7 +43,7 @@ def run

hashlist = Rex::Quickfile.new("jtrtmp")

myloots = myworkspace.loots.find(:all, :conditions => ['ltype=?', 'mysql.hashes'])
myloots = myworkspace.loots.where('ltype=?', 'mysql.hashes')
unless myloots.nil? or myloots.empty?
myloots.each do |myloot|
begin
Expand Down Expand Up @@ -117,7 +117,7 @@ def build_seed

seed = []
#Seed the wordlist with Database , Table, and Instance Names
schemas = myworkspace.notes.find(:all, :conditions => ['ntype like ?', '%.schema%'])
schemas = myworkspace.notes.where('ntype like ?', '%.schema%')
unless schemas.nil? or schemas.empty?
schemas.each do |anote|
anote.data.each do |key,value|
Expand All @@ -127,7 +127,7 @@ def build_seed
end
end

instances = myworkspace.notes.find(:all, :conditions => ['ntype=?', 'mssql.instancename'])
instances = myworkspace.notes.where('ntype=?', 'mssql.instancename')
unless instances.nil? or instances.empty?
instances.each do |anote|
seed << anote.data['InstanceName']
Expand Down
6 changes: 3 additions & 3 deletions modules/auxiliary/analyze/jtr_oracle_fast.rb
Expand Up @@ -48,7 +48,7 @@ def build_seed

seed = []
#Seed the wordlist with Database , Table, and Instance Names
schemas = myworkspace.notes.find(:all, :conditions => ['ntype like ?', '%.schema%'])
schemas = myworkspace.notes.where('ntype like ?', '%.schema%')
unless schemas.nil? or schemas.empty?
schemas.each do |anote|
anote.data.each do |key,value|
Expand All @@ -58,7 +58,7 @@ def build_seed
end
end

instances = myworkspace.notes.find(:all, :conditions => ['ntype=?', 'mssql.instancename'])
instances = myworkspace.notes.where('ntype=?', 'mssql.instancename')
unless instances.nil? or instances.empty?
instances.each do |anote|
seed << anote.data['InstanceName']
Expand Down Expand Up @@ -90,7 +90,7 @@ def crack(format)

hashlist = Rex::Quickfile.new("jtrtmp")
ltype= "#{format}.hashes"
myloots = myworkspace.loots.find(:all, :conditions => ['ltype=?', ltype])
myloots = myworkspace.loots.where('ltype=?', ltype)
unless myloots.nil? or myloots.empty?
myloots.each do |myloot|
begin
Expand Down
6 changes: 3 additions & 3 deletions modules/auxiliary/analyze/postgres_md5_crack.rb
Expand Up @@ -49,7 +49,7 @@ def run

print_status("Wordlist length: #{@seed.length}")

myloots = myworkspace.loots.find(:all, :conditions => ['ltype=?', 'postgres.hashes'])
myloots = myworkspace.loots.where('ltype=?', 'postgres.hashes')
unless myloots.nil?
myloots.each do |myloot|
begin
Expand Down Expand Up @@ -95,7 +95,7 @@ def build_seed

seed = []
#Seed the wordlist with Database , Table, and Instance Names
schemas = myworkspace.notes.find(:all, :conditions => ['ntype like ?', '%.schema%'])
schemas = myworkspace.notes.where('ntype like ?', '%.schema%')
unless schemas.nil? or schemas.empty?
schemas.each do |anote|
anote.data.each do |key,value|
Expand All @@ -105,7 +105,7 @@ def build_seed
end
end

instances = myworkspace.notes.find(:all, :conditions => ['ntype=?', 'mssql.instancename'])
instances = myworkspace.notes.where('ntype=?', 'mssql.instancename')
unless instances.nil? or instances.empty?
instances.each do |anote|
seed << anote.data['InstanceName']
Expand Down
12 changes: 2 additions & 10 deletions plugins/wmap.rb
Expand Up @@ -1363,9 +1363,7 @@ def process_urls(urlstr)
#print_status "aaa"
#print_status framework.db.workspace.name

#sites = serv.web_sites.find(:all, :conditions => ['vhost = ? or vhost = ?', vhost, host.address])

sites = serv.web_sites.find(:all)
sites = serv.web_sites.all

sites.each do |site|

Expand Down Expand Up @@ -1450,16 +1448,10 @@ def view_site_tree(urlstr, md, ld)
next
end

#print_status "aaa"
#print_status framework.db.workspace.name
sites = serv.web_sites.where('vhost = ? or vhost = ?', vhost, host.address)

sites = serv.web_sites.find(:all, :conditions => ['vhost = ? or vhost = ?', vhost, host.address])

#sites = serv.web_sites.find(:all)

sites.each do |site|
#site.vhost
#site.web_forms.find_all_by_path(target.path).each do |form|
t = load_tree(site)
print_tree(t,md,ld)
print_line("\n")
Expand Down

0 comments on commit d0c74cf

Please sign in to comment.