• Inicio
  • Buscar
  • Ingresar
  • Registrarse

    Starfield: el juego que revolucionará el espacio y la tecnología

    • Hack x Crack - Comunidad de Seguridad informática »
    • Programación »
    • Scripting »
    • [Ruby] KingSpam 0.4
    • Imprimir
    Páginas: [1]   Ir Abajo

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

    Desconectado BigBear

    • { L5 } Smurf
    • *****
    • Mensajes: 594
      • Ver Perfil
    [Ruby] KingSpam 0.4
    « en: Septiembre 18, 2015, 04:49:21 pm »
    Un simple script en Ruby para hacer spam en un canal IRC.

    El codigo :

    Código: Ruby
    1. #!usr/bin/ruby
    2. #KingSpam 0.4
    3. #Coded By Doddy H
    4.  
    5. require "socket"
    6.  
    7. $nicks = ["ruben","negro jose","rasputin","juancho"]
    8.  
    9. def head()
    10.   print "\n\n == -- KingSpam 0.4 -- ==\n\n"
    11. end
    12.  
    13. def uso()
    14.   print "\n[+] Sintax : #{$0} <host> <channel> <spam list>\n"
    15. end
    16.  
    17. def copyright()
    18.   print "\n\n(C) Doddy Hackman 2012\n\n"
    19. end
    20.  
    21. def read_file(file)
    22.   array = []
    23.   File.open(file, "r") do |lineas|
    24.     while (linea = lineas.gets)
    25.       array.push(linea)
    26.     end
    27.   end
    28.   return array
    29. end
    30.  
    31. def load(host,canal,spam_list)
    32.   print "\n[+] Connecting ...\n"
    33.   begin
    34.     irc = TCPSocket.open(host,"6667")
    35.   rescue
    36.     print "\n[-] Error\n"
    37.   else
    38.     lineas = read_file(spam_list)
    39.     nick_azar = $nicks[rand($nicks.size)]
    40.     irc.print "NICK "+nick_azar+"\r\n"
    41.     irc.print "USER "+nick_azar+" 1 1 1 1\r\n"
    42.     irc.print "JOIN #{canal}\r\n"
    43.     print "\n[+] Online\n"
    44.     while 1
    45.       code = irc.recv(9999)    
    46.       #print code+"\n"
    47.       if code=~/PING (.*)/
    48.         irc.print "PONG #{$1}\n"
    49.       end
    50.       if code=~/:(.*) 353 (.*) = (.*) :(.*)/
    51.               nicks_found = $4
    52.               nicks = nicks_found.split(" ")
    53.       end
    54.      
    55.       print "\n[+] The party started\n\n"
    56.       while 1
    57.         sleep(20) # 1 minute
    58.         texto = lineas[rand(lineas.size)]
    59.         print "[+] Spamming channel #{canal}\n"
    60.         irc.print "PRIVMSG #{canal} #{texto}\n"
    61.        
    62.         nicks.flatten.each do |nick|
    63.           if nick!=nick_azar
    64.             nick = nick.sub("+","")
    65.             nick = nick.sub("@","")
    66.             print "[+] Spam User : "+nick+"\n"
    67.             irc.print "PRIVMSG #{nick} #{texto}\n"
    68.           end
    69.         end
    70.       end
    71.     end
    72.   end
    73. end
    74.  
    75. head()
    76.  
    77. host = ARGV[0]
    78. canal = ARGV[1]
    79. spam_list = ARGV[2]
    80.  
    81. if !host and !canal and !spam_list
    82.   uso()
    83. else
    84.   load(host,canal,spam_list)
    85. end
    86.  
    87. copyright()
    88.  
    89. # The End ?
    90.  

    Eso es todo.
    En línea

    • Imprimir
    Páginas: [1]   Ir Arriba
    • Hack x Crack - Comunidad de Seguridad informática »
    • Programación »
    • Scripting »
    • [Ruby] KingSpam 0.4
     

    • SMF | SMF © 2013, Simple Machines
    • XHTML
    • RSS
    • WAP2
    Va un mudo y le dice a un sordo: Hack x Crack usa cookies. Pues eso... Learn more