Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Created by Pathogen @ www.hakhub.tk
- import random,subprocess,sys,socket,string,re
- num = str(random.randint(1,1000))
- host = "irc.yourserver.org"
- port = 6667
- iden = "CIA-"+num
- nick = "CIA-"+num
- rname = "George Orwell"
- chan = "#CIA"
- rbuf = ""
- sock = socket.socket()
- sock.connect((host,port))
- sock.send("NICK %s\r\n" % nick)
- sock.send("USER %s %s bla :%s\r\n" %(iden,host,rname))
- sock.send("JOIN : %s\r\n" % chan)
- sock.send("PRIVMSG %s :%s\r\n" % (chan, "Activated."))
- print 'Message sent!'
- while 1:
- rbuf = rbuf + sock.recv(1024)
- tmp = str.split(rbuf,"\n")
- print tmp
- rbuf = tmp.pop()
- for line in tmp:
- line = str.rstrip(line)
- line = str.split(line)
- if(line[0] == "PING"):
- sock.send("PONG %s\r\n" % line[1])
- elif re.findall("Hello",str(tmp)):
- sock.send("PRIVMSG %s :%s\r\n" % (chan, "Hello There!"))
- elif re.findall("scanit",str(tmp)):
- string = re.split(" ",str(tmp[0]))
- if re.match("127",str.strip(string[4])) or re.match("192",str.strip(string[4])) or str.strip(string[4]) == "localhost" :
- sock.send("PRIVMSG %s :%s\r\n" % (chan, "NO! You may not play with my ports."))
- break
- command = str("nmap -PN -T5 " + str.strip(string[4]))
- res = subprocess.Popen(command,stdout=subprocess.PIPE,shell=True)
- results = res.stdout.read()
- line = results.split("\n")
- for each in line:
- sock.send("PRIVMSG %s :%s\r\n" % (chan, each))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement