Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.31 KB | None | 0 0
  1. # POKEMON.PY 1.00 BETA -> not converted for twisted yet BYAAAAAAAAAAAAA
  2.  
  3. #IMPORTS
  4. import random
  5. import socket
  6. import socks
  7. import string
  8. import time
  9. import threading
  10.  
  11. #CONFIG
  12. server = 'irc.server.com'
  13. port = 6667
  14. channel = '#test'
  15.  
  16. #SETUP
  17. pokemonList = []
  18.  
  19. #LOAD POKEMON
  20. def loadPokemon():
  21.     global pokemoneList
  22.     pokemonFile = open('pokemon.txt','r')
  23.     for line in pokemonFile.readlines():
  24.             name = line.replace('\n', '');
  25.             pokemonList.append(name)
  26.             pokemonList.sort()
  27.     pokemonFile.close()
  28.  
  29. #GET POKEMON
  30. def getPokemon():
  31.     global pokemonList
  32.     listCount = len(pokemonList)
  33.     randomLine = random.randint(1,listCount)
  34.     return pokemonList([randomLine]);
  35.  
  36. #SETUP
  37. loadPokemon()
  38. nick = getPokemon()
  39.  
  40. #Message
  41. circlejerk = "A wild pokemon has appeared!"
  42.  
  43. class MyThread(threading.Thread):
  44.         def run(self):
  45.                 ircsock = socks.socksocket()
  46.                 choice = random.choice(lines)
  47.                 choice = choice.split(":")
  48.                 pport = choice[1].replace("\n", "")
  49.                 pserver = choice[0]
  50.  
  51.                 try:
  52.                         #SPECIFY THE PROXY TYPE THERE
  53.                         ircsock.setproxy(socks.PROXY_TYPE_HTTP, pserver, int(pport))
  54.                         ircsock.connect((server, port))
  55.                         print("Connecting trough "+ pserver +":"+ str(pport) +"...")
  56.                         ircsock.send("USER "+ nick +" "+ nick +" * :"+ nick +"\n")
  57.                         ircsock.send("NICK "+ nick +"\n")
  58.                         #time.sleep(60)
  59.                         # This will register the nickname.
  60.                         #ircsock.send("PRIVMSG thugaim :REGISTER "+ nick +"h "+ nick +"@gmail.com\n")          
  61.                         # Joins the channel
  62.                         ircsock.send("JOIN "+ channel +"\n")
  63.                  
  64.  
  65.                         # Send message about winning!
  66.                         #ircsock.send("PRIVMSG "+ channel +" :I just registered my nick ("+ nick +") with the password "+ nick +"h and the email "+ nick +"@gmail.com!\n")
  67.  
  68.                         #ircsock.send("PRIVMSG "+ channel +" : my ignore JihadRape to the moederneuker\n")
  69.  
  70.                         while 1:
  71.                                 ircmsg = ircsock.recv(1024)
  72.                                 ircmsg = ircmsg.strip('\n\r')
  73.                                 ircmsg = ircmsg.lower()
  74.                                
  75.                                 ircsock.send("PRIVMSG "+ channel +" : "+ circlejerk +"\n")
  76.                                 ircsock.send("PRIVMSG Laugh : "+ circlejerk +"\n")
  77.                                 ircsock.send("PRIVMSG Cephei : "+ circlejerk +"\n")
  78.                            
  79.                                 ircsock.send("NICK "+ nick +"\n")
  80.                        
  81.                                 if ircmsg.find("ping :") != -1:
  82.                                     ping = ircmsg.split("ping :")
  83.                                     ircsock.send("PONG "+ ping[1] +"\n")
  84.                                
  85.                                 time.sleep(1)
  86.                 except:
  87.                         print("Could not connect with the proxy")
  88.  
  89.  
  90. for x in xrange ( 5000 ):
  91.         fil = open("database\\socks.txt", "r")
  92.         lines = fil.readlines()
  93.         MyThread().start()
  94.         time.sleep(0.02)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement