Advertisement
Shiny_

Untitled

Apr 20th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.19 KB | None | 0 0
  1. # -*- coding: cp1250 -*-
  2. import socket, time
  3.  
  4. nick = "Lunux_"
  5. password = "LMAO"
  6. debug = True
  7. network = "irc.pirc.pl"
  8. port = 6667
  9.  
  10. if debug == True:
  11.     chan = "#testingchannel"
  12. elif debug == False:
  13.     chan = "#mirkofm"
  14.  
  15. irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  16. irc.connect((network, port))
  17. irc.recv(4096)
  18. irc.send("NICK " + nick + "\r\n\
  19.          USER " + nick + " " + nick + " " + nick + " :PIRC.pl\r\n")
  20. #irc.send("PRIVMSG NICKSERV IDENTIFY " + password + "\r\n\
  21.           #MODE +i+w\r\n\
  22.           #JOIN " + chan + "\r\n"
  23. #)
  24. # irc.send("PRIVMSG " + chan + " :no kurwa wreszcie XD\r\n")
  25.  
  26. while True:
  27.     data = irc.recv(4096).decode("UTF-8")
  28.     print(data)
  29.  
  30.     if data.find("PING") != -1:
  31.         irc.send("PONG " + data.split()[1] + "\r\n")
  32.  
  33.     if data.find("limit sesji") != -1:
  34.         irc.send("/quit")
  35.         exit()
  36.  
  37.     if data.find("nick nie jest zarejestrowany") or data.find("Ten nick jest zarejestrowany i chroniony") != -1:
  38.         irc.send("PRIVMSG NICKSERV IDENTIFY " + password + "\r\n\
  39.          MODE +i+w\r\n\
  40.          JOIN " + chan + "\r\n")
  41. # -*- coding: cp1250 -*-
  42. import socket, time
  43.  
  44. nick = "Lunux_"
  45. password = "LMAO"
  46. debug = True
  47. network = "irc.pirc.pl"
  48. port = 6667
  49.  
  50. if debug == True:
  51.     chan = "#testingchannel"
  52. elif debug == False:
  53.     chan = "#mirkofm"
  54.  
  55. irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  56. irc.connect((network, port))
  57. irc.recv(4096)
  58. irc.send("NICK " + nick + "\r\n\
  59.          USER " + nick + " " + nick + " " + nick + " :PIRC.pl\r\n")
  60. #irc.send("PRIVMSG NICKSERV IDENTIFY " + password + "\r\n\
  61.           #MODE +i+w\r\n\
  62.           #JOIN " + chan + "\r\n"
  63. #)
  64. # irc.send("PRIVMSG " + chan + " :no kurwa wreszcie XD\r\n")
  65.  
  66. while True:
  67.     data = irc.recv(4096).decode("UTF-8")
  68.     print(data)
  69.  
  70.     if data.find("PING") != -1:
  71.         irc.send("PONG " + data.split()[1] + "\r\n")
  72.  
  73.     if data.find("limit sesji") != -1:
  74.         irc.send("/quit")
  75.         exit()
  76.  
  77.     if data.find("nick nie jest zarejestrowany") or data.find("Ten nick jest zarejestrowany i chroniony") != -1:
  78.         irc.send("PRIVMSG NICKSERV IDENTIFY " + password + "\r\n\
  79.          MODE +i+w\r\n\
  80.          JOIN " + chan + "\r\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement