Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'socket'
- puts "\n---------------------------------------------------------------------------------
- _____ _ _ _ _ ___
- / ____| | | | | | | (_) |__ \\
- | (___ _ _| |__ | |__| | __ _ _ ) |
- \\___ \\| | | | '_ \\| __ |/ _` | | / /
- ____) | |_| | |_) | | | | (_| | | |_|
- |_____/ \\__,_|_.__/|_| |_|\\__,_|_| (_) ~ AnonGuy [ an0nguy @ protonmail.ch ]"
- print "\nPlease Enter The Domain Name -- "
- domain = gets.chomp.chomp('/').sub(/^https?\:\/\/(www.)?/, '')
- print 'Wordlist -- '
- dictionary = gets.chomp # Your wordlist, or dictionary, if you may ..
- testDomain = 'l0lwal33t.'+domain
- count = 0
- def exists(subdomain)
- begin
- Socket.gethostbyname(subdomain)
- rescue SocketError
- return false
- end
- return true
- end
- puts '---------------------------------------------------------------------------------'
- if exists(testDomain) == true
- abort("Wildcard Subdomain (*) exists! :(\nEnding Script Execution . . .\n---------------------------------------------------------------------------------")
- end
- File.new(dictionary).each_line do |word|
- subdomain = "#{word.chomp}.#{domain}"
- if exists(subdomain) == true
- count += 1
- puts "#{count.to_s} -- #{subdomain} exists!"
- end
- end
- puts "---------------------------------------------------------------------------------\nTotal Subdomains Found --\> #{count.to_s}\n---------------------------------------------------------------------------------"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement