Sha256: af285418426d165552d41f5a50b197daa191ed9f9b8a5d0be0cec986b3515fed

Contents?: true

Size: 920 Bytes

Versions: 31

Compression:

Stored size: 920 Bytes

Contents

# Brute-forcing multiple domains at the same time, the purpose is to extract a valid host list
# Usage: ruby dns_brute.rb [file with list of domains]
require "wmap"

f_rpt=".rpt.txt"
# Step 1 - obtain list of domains to be brute-forced on
tracker=Wmap::HostTracker.instance
root_domains=tracker.dump_root_domains
sub_domains=tracker.dump_sub_domains
# Step 2 - multi-thread brute forcer works on known domains and sub-domains 
k=Wmap::DnsBruter.new(:verbose=>false, :max_parallel=>50)
#hosts=k.dns_brute_file(ARGV[0])
#hosts = k.dns_brute_domains(root_domains)
hosts=k.dns_brute_domains(sub_domains)
k=nil
#hosts=hosts1+hosts2
# Step 3 - save results to a local file for debugging
f=File.open(f_rpt,"w")
hosts.map do |x|
  f.write("#{x}\n")
end
f.close
puts "Brute force results are saved successfully: #{f_rpt}"

# Step 4 - now update the local hosts table accordingly
tracker.bulk_add(hosts)
tracker.save!
tracker=nil

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
wmap-2.8.4 demos/dns_brutes.rb
wmap-2.8.3 demos/dns_brutes.rb
wmap-2.8.2 demos/dns_brutes.rb
wmap-2.8.1 demos/dns_brutes.rb
wmap-2.7.9 demos/dns_brutes.rb
wmap-2.7.7 demos/dns_brutes.rb
wmap-2.7.6 demos/dns_brutes.rb
wmap-2.7.2 demos/dns_brutes.rb
wmap-2.7.1 demos/dns_brutes.rb
wmap-2.7.0 demos/dns_brutes.rb
wmap-2.6.9 demos/dns_brutes.rb
wmap-2.6.8 demos/dns_brutes.rb
wmap-2.6.7 demos/dns_brutes.rb
wmap-2.6.6 demos/dns_brutes.rb
wmap-2.6.5 demos/dns_brutes.rb
wmap-2.6.4 demos/dns_brutes.rb
wmap-2.6.3 demos/dns_brutes.rb
wmap-2.6.2 demos/dns_brutes.rb
wmap-2.6.1 demos/dns_brutes.rb
wmap-2.6.0 demos/dns_brutes.rb