Un simple script en Ruby para hacer spam en un canal IRC.

El codigo :
#!usr/bin/ruby
#KingSpam 0.4
#Coded By Doddy H

require "socket"

$nicks = ["ruben","negro jose","rasputin","juancho"]

def head() 
  print "\n\n == -- KingSpam 0.4 -- ==\n\n"
end
 
def uso() 
  print "\n[+] Sintax : #{$0} <host> <channel> <spam list>\n"
end

def copyright()
  print "\n\n(C) Doddy Hackman 2012\n\n"
end

def read_file(file)
  array = []
  File.open(file, "r") do |lineas|
    while (linea = lineas.gets)
      array.push(linea)
    end
  end
  return array
end

def load(host,canal,spam_list)
  print "\n[+] Connecting ...\n"
  begin
    irc = TCPSocket.open(host,"6667")
  rescue 
    print "\n[-] Error\n"
  else 
    lineas = read_file(spam_list)
    nick_azar = $nicks[rand($nicks.size)]
    irc.print "NICK "+nick_azar+"\r\n"
    irc.print "USER "+nick_azar+" 1 1 1 1\r\n"
    irc.print "JOIN #{canal}\r\n"
    print "\n[+] Online\n"
    while 1 
      code = irc.recv(9999)	
      #print code+"\n"
      if code=~/PING (.*)/ 
        irc.print "PONG #{$1}\n"
      end
      if code=~/:(.*) 353 (.*) = (.*) :(.*)/
	      nicks_found = $4
	      nicks = nicks_found.split(" ")
      end
      
      print "\n[+] The party started\n\n"
      while 1
        sleep(20) # 1 minute
        texto = lineas[rand(lineas.size)]
	print "[+] Spamming channel #{canal}\n"
	irc.print "PRIVMSG #{canal} #{texto}\n"
	
	nicks.flatten.each do |nick|
	  if nick!=nick_azar
	    nick = nick.sub("+","")
	    nick = nick.sub("@","")
	    print "[+] Spam User : "+nick+"\n"
	    irc.print "PRIVMSG #{nick} #{texto}\n"
	  end
	end
      end
    end
  end
end

head()

host = ARGV[0]
canal = ARGV[1]
spam_list = ARGV[2]

if !host and !canal and !spam_list
  uso()
else
  load(host,canal,spam_list)
end

copyright()

# The End ?
Eso es todo.
Responder

Volver a “Fuentes”