Thursday, October 8, 2009

IRC BOTNET

This simply connects a bot to a IRC room and stays their. Coded in python. Enjoy!:P


import socket,sys
irc_host = "sites name goes here"
irc_port = 6667
irc_channel = "(irc chatrooms name)"
irc_nick = ""


try:
irc_sock = socket.socket ( socket.AF_INET,socket.SOCK_STREAM)
irc_sock.connect ((irc_host,irc_port))
except:
print("[Socrates]Error: Could not connect to IRC; Host: %s Port: %i")

else:
print ("[Socrates]Connected to the IRC; Host: %s Port: %i")

irc_sock.send (( "nick %s \r\n") %(irc_nick))
print (" Setting bot nick to %s")%(irc_nick)
irc_sock.send (("USER %s 8 * :X\r\n") % (irc_nick))
print (" Setting User")
irc_sock.send (( "Join %s \r\n") % (irc_channel))
print ("Joining channel %s") % (irc_channel)

while True:
recv = irc_sock.recv(5000)
if recv.find ( ' PING' ) <=5000:
irc_sock.send('PONG' + recv.split()[1] + '\r\n')
irc_sock.send(("MSG %s :sup %s!\n") %(irc_channel))

No comments:

Post a Comment