Bienvenido a Tecnohackers

Tecnohackers » Programacion » Area de Programacion » Scripting. VBS, Batch, Bash, JavaSript.
 » 

[Ruby] Whois Online 0.1



Autor Tema: [Ruby] Whois Online 0.1  (Leído 845 veces)

Desconectado Doddy

  • Veterano
  • ***
  • Mensajes: 249
  • Slow Mind
[Ruby] Whois Online 0.1
« en: Abril 23, 2012, 07:18:38 pm »
Un simple script en Ruby para hacer un whois al dominio que quieran.

Código: You are not allowed to view links. Register or Login
#!usr/bin/ruby
#Whois Online 0.1
#Coded BY Doddy H

require "net/http"

def head()
  print "\n-- == Whois Online 0.1 == --\n\n"
end
 
def sintax()
  print "\n[+] Sintax : ruby domain.rb <domain>\n"
end
 
def copyright()
  print "\n\n(C) Doddy Hackman 2012\n\n"
end
 
def tomar(web,par)
  return Net::HTTP.post_form(URI.parse(web),par).body
end

def whois(dom)
  code = tomar("http://networking.ringofsaturn.com/Tools/whois.php",{"domain"=>dom,"submit"=>"submit"})
  if  code=~/<pre>(.*?)<\/pre>/mi
    final = $1
    final = final.sub(/&quot;/,"")
    final = final.sub(/&gt;&gt;&gt;/,"")
    final = final.sub(/&lt;&lt;&lt;/,"")
    return final
  else
    return "Not Found"
  end
end

domain = ARGV[0]

head()
if !domain
  sintax()
else
  print whois(domain)
end
copyright()
   
#The End ?
You are not allowed to view links. Register or Login

Tags:
Tags:

 


SMF 2.0.19 | SMF © 2016, Simple Machines
Paginas Afiliadas
Twitter - FaceBook - Daraxblog
Designed by Smf Personal