Autor Tema: [Ruby] KingSpam 0.4  (Leído 2945 veces)

0 Usuarios y 1 Visitante están viendo este tema.

BigBear

  • **
  • Mensajes: 165
  • Liked: 47
[Ruby] KingSpam 0.4
« : septiembre 18, 2015, 09:49:59 am »
Un simple script en Ruby para hacer spam en un canal IRC.

El codigo :

Código: ruby [Seleccionar]

#!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 #{
#!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 ?
}\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.