Foro de elhacker.net

Programación => Scripting => Mensaje iniciado por: BigBear en 11 Febrero 2012, 23:05 pm



Título: [Ruby] Fuzz DNS 0.3
Publicado por: BigBear en 11 Febrero 2012, 23:05 pm
Un buscador de DNS.

Código
  1. #!usr/bin/ruby
  2. #Fuzz DNS 0.3
  3. #Coded By Doddy H
  4.  
  5. paths = ['www','www1','www2','www3','ftp','ns','mail','3com','aix','apache','back','bind','boreder','bsd','business','chains','cisco','content','corporate','cpv','dns','domino','dominoserver','download','e-mail','e-safe','email','esafe','external','extranet','firebox','firewall','front','fw','fw0','fwe','fw-1','firew','gate','gatekeeper','gateway','gauntlet','group','help','hop','hp','hpjet','hpux','http','https','hub','ibm','ids','info','inside','internal','internet','intranet','ipfw','irix','jet','list','lotus','lotusdomino','lotusnotes','lotusserver','mailfeed','mailgate','mailgateway','mailgroup','mailhost','maillist','mailpop','mailrelay','mimesweeper','ms','msproxy','mx','nameserver','news','newsdesk','newsfeed','newsgroup','newsroom','newsserver','nntp','notes','noteserver','notesserver','nt','outside','pix','pop','pop3','pophost','popmail','popserver','print','printer','private','proxy','proxyserver','public','qpop','raptor','read','redcreek','redhat','route','router','scanner','screen','screening','ecure','seek','smail','smap','smtp','smtpgateway','smtpgw','solaris','sonic','spool','squid','sun','sunos','suse','switch','transfer','trend','trendmicro','vlan','vpn','wall','web','webmail','webserver','webswitch','win2000','win2k','upload','file','fileserver','storage','backup','share','core','gw','wingate','main','noc','home','radius','security','access','dmz','domain','sql','mysql','mssql','postgres','db','database','imail','imap','exchange','sendmail','louts','test','logs','stage','staging','dev','devel','ppp','chat','irc','eng','admin','unix','linux','windows','apple','hp-ux','bigip','pc']
  6. #paths = ['www']
  7.  
  8. require "net/http"
  9.  
  10. def uso
  11.  print "\n[+] fuzzdns.rb <domain>\n"
  12. end
  13.  
  14. def toma(web)
  15.   return Net::HTTP.get_response(web)
  16. end
  17.  
  18. def savefile(file,text)
  19.  save = File.open(file, "a")
  20.  save.puts text+"\n"
  21.  save.close
  22. end
  23.  
  24. def head()
  25.  print "\n\n -- == Fuzz DNS 0.3 == --\n\n"
  26. end
  27.  
  28. def copyright()
  29.   print "\n\n\n(C) Doddy Hackman 2012\n\n"
  30.   exit(1)
  31. end
  32.  
  33. def fin()
  34.   print "\n\n[+] Scan Finished\n"
  35. end
  36.  
  37. web = ARGV[0]
  38.  
  39. head()
  40. if !web
  41.  uso()
  42. else
  43.  print "\n[+] Starting the scan...\n\n\n"
  44.  paths.each do |path|
  45.    begin
  46.      code = toma(URI.parse("http://"+path+"."+web))
  47.    rescue
  48.      fin()
  49.      copyright()
  50.    end
  51.    case code
  52.      when Net::HTTPSuccess
  53.        print "[Link] : "+"http://"+path+"."+web+"\n"
  54.        savefile("dns-logs.txt","http://"+path+"."+web)
  55.      end
  56.    end
  57.  fin()    
  58. end
  59.  
  60. copyright()
  61.  
  62. # The End ?
  63.