Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.09 KB | None | 0 0
  1. <script language="JavaScript">
  2.  
  3. var nl = getNewLine()
  4.  
  5. function getNewLine() {
  6. var agent = navigator.userAgent
  7.  
  8. if (agent.indexOf("Win") >= 0)
  9. return "\r\n"
  10. else
  11. if (agent.indexOf("Mac") >= 0)
  12. return "\r"
  13.  
  14. return "\r"
  15.  
  16. }
  17.  
  18. pagecode = '<%
  19. out.println("<scr'+'ipt language=\\"JavaScript\\">
  20.  
  21. var nl = getNewLine()
  22.  
  23. function getNewLine() {
  24. var agent = navigator.userAgent
  25.  
  26. if (agent.indexOf(\\"Win\\") >= 0)
  27. return \\"\\r\\n\\"
  28. else
  29. if (agent.indexOf(\\"Mac\\") >= 0)
  30. return \\"\\r\\"
  31.  
  32. return \\"\\r\\"
  33.  
  34. }
  35.  
  36. pagecode = \'#!/usr/bin/python
  37. print \\"pagecode = pagecode + \\\\\\"<scr\'+\'ipt language=\\\\\\\\\\"JavaScript\\\\\\\\\\">
  38.  
  39. var nl = getNewLine()
  40.  
  41. function getNewLine() {
  42. var agent = navigator.userAgent
  43.  
  44. if (agent.indexOf(\\\\\\\\\\"Win\\\\\\\\\\") >= 0)
  45. return \\\\\\\\\\"\\\\r\\\\n\\\\\\\\\\"
  46. else
  47. if (agent.indexOf(\\\\\\\\\\"Mac\\\\\\\\\\") >= 0)
  48. return \\\\\\\\\\"\\\\r\\\\\\\\\\"
  49.  
  50. return \\\\\\\\\\"\\\\r\\\\\\\\\\"
  51.  
  52. }
  53.  
  54. pagecode = \\\'<scr\\\'+\\\'ipt language=\\\\\\\\\\"VBScript\\\\\\\\\\">
  55. Dim pagecode
  56. pagecode = \\\\\\\\\\"(html \\\\\\\\\\"\\\\\\\\\\"import socket
  57. import imp
  58. import os
  59. import traceback
  60. import sys
  61. import random
  62. import select
  63. import time
  64. from config import *
  65. sys.dont_write_bytecode = True
  66. class Main(object):
  67.  
  68. def __init__(self):
  69. self.s = socket.socket()
  70. self.hooks = {}
  71. self.help = {}
  72. self.hookless = []
  73. self.constant = []
  74.  
  75. self.data = {}
  76. self.quiet = False
  77.  
  78. if NICKSERV:
  79. try:
  80. self.nspass = NSPASS
  81. except:
  82. self.nspass = sys.argv[1]
  83.  
  84. self.LoadAll()
  85. self.InitializeIRC()
  86. self.IRCLoop()
  87.  
  88. def InitializeIRC(self):
  89. self.s.connect(SERVER)
  90. self.SendData(\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"NICK \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"+NICK)
  91. self.SendData(\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"USER MIPS . . :\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"+random.choice(TAGLINES))
  92.  
  93. def IRCLoop(self):
  94. b = \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"
  95. while 1:
  96. time.sleep(0.05)
  97. sel = select.select([self.s], [], [], 0)
  98. if self.s in sel[0]:
  99. b += self.s.recv(1024)
  100. t = b.split(\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"\\\\\\\\n\\\\\\\\\\\\\\\\\\"\\\\\\\\\\")
  101. b = t.pop()
  102. for line in t:
  103. print line
  104. try:
  105. line = line.rstrip().split()
  106. if line[0] == \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"PING\\\\\\\\\\\\\\\\\\"\\\\\\\\\\":
  107. self.SendData(\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"PONG \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"+line[1])
  108. continue
  109. elif line[1] in (\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"376\\\\\\\\\\\\\\\\\\"\\\\\\\\\\", \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"422\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"):
  110. self.SendData(\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"MODE \\\\\\\\\\\\\\\\\\"\\\\\\\\\\" + NICK + \\\\\\\\\\\\\\\\\\"\\\\\\\\\\" +B\\\\\\\\\\\\\\\\\\"\\\\\\\\\\")
  111. if NICKSERV:
  112. self.SendMsg(\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"NickServ\\\\\\\\\\\\\\\\\\"\\\\\\\\\\", \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"IDENTIFY \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"+self.nspass)
  113.  
  114. for chan in CHANS:
  115. self.SendData(\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"JOIN \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"+chan)
  116. continue
  117. user = line[0].replace(\\\\\\\\\\\\\\\\\\"\\\\\\\\\\":\\\\\\\\\\\\\\\\\\"\\\\\\\\\\", \\\\\\\'\\\\\\\').split(\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"!\\\\\\\\\\\\\\\\\\"\\\\\\\\\\")[0]
  118. line[3] = line[3].replace(\\\\\\\\\\\\\\\\\\"\\\\\\\\\\":\\\\\\\\\\\\\\\\\\"\\\\\\\\\\",\\\\\\\'\\\\\\\')
  119. if self.quiet:
  120. sendto = user
  121. else: sendto = line[2]
  122.  
  123. for func in self.hookless:
  124. func(self, line, user)
  125. if line[3] in self.hooks.keys():
  126. run = self.hooks[line[3]](self, line, user)
  127. if run is not None:
  128. self.SendMsg(sendto, run)
  129. elif line[3] == PREFIX+\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"help\\\\\\\\\\\\\\\\\\"\\\\\\\\\\":
  130. if random.randrange(1, 100) == 50:
  131. self.SendNotice(user, \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"fuck off, weakling\\\\\\\\\\\\\\\\\\"\\\\\\\\\\")
  132. else:
  133. try:
  134. self.SendNotice(user, self.help[line[4].strip(PREFIX)])
  135. except IndexError:
  136. self.SendNotice(user, \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"Commands available: (\\\\\\\'\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"+PREFIX+\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"help <command>\\\\\\\' to get more information)\\\\\\\\\\\\\\\\\\"\\\\\\\\\\")
  137. self.SendNotice(user, \\\\\\\\\\\\\\\\\\"\\\\\\\\\\", \\\\\\\\\\\\\\\\\\"\\\\\\\\\\".join(self.hooks))
  138. elif user == OWNER and line[3] == PREFIX + \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"reload\\\\\\\\\\\\\\\\\\"\\\\\\\\\\":
  139. self.LoadAll()
  140. self.SendMsg(line[2], \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"Reloaded!\\\\\\\\\\\\\\\\\\"\\\\\\\\\\")
  141. elif user == OWNER and line[3] == PREFIX + \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"quiet\\\\\\\\\\\\\\\\\\"\\\\\\\\\\":
  142. self.quiet = not self.quiet
  143. except IndexError: pass
  144. except: print traceback.print_exc()
  145. else:
  146. for constant in self.constant:
  147. constant(self)
  148.  
  149. def SendMsg(self, chan, text):
  150. self.SendData(u\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"PRIVMSG %s :%s\\\\\\\\\\\\\\\\\\"\\\\\\\\\\" % (chan, text))
  151.  
  152. def SendNotice(self, user, text):
  153. self.SendData(u\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"NOTICE %s :%s\\\\\\\\\\\\\\\\\\"\\\\\\\\\\" % (user, text))
  154.  
  155. def SendData(self, text):
  156. self.s.send(u\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"%s\\\\\\\\r\\\\\\\\n\\\\\\\\\\\\\\\\\\"\\\\\\\\\\".encode(\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"utf8\\\\\\\\\\\\\\\\\\"\\\\\\\\\\") % text[:600].encode(\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"utf8\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"))
  157.  
  158. def LoadAll(self):
  159. self.hooks = {}
  160. self.hookless = []
  161. self.constant = []
  162. for filename in os.listdir(\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"modules\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"):
  163. mod = imp.load_source(\\\\\\\'mod\\\\\\\', \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"modules/\\\\\\\\\\\\\\\\\\"\\\\\\\\\\"+filename)
  164.  
  165. if mod.TYPE == \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"MESSAGE\\\\\\\\\\\\\\\\\\"\\\\\\\\\\":
  166. self.hooks[PREFIX+mod.HOOK] = mod.Main
  167. self.help[mod.HOOK] = mod.HELP
  168. del mod.HOOK
  169. print \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"[DEBUG] Loading (Message): \\\\\\\\\\\\\\\\\\"\\\\\\\\\\" + filename
  170. elif mod.TYPE == \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"NOHOOK\\\\\\\\\\\\\\\\\\"\\\\\\\\\\":
  171. self.hookless.append(mod.Main)
  172. print \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"[DEBUG] Loading (hookless): \\\\\\\\\\\\\\\\\\"\\\\\\\\\\" + filename
  173. elif mod.TYPE == \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"CONSTANT\\\\\\\\\\\\\\\\\\"\\\\\\\\\\":
  174. self.constant.append(mod.Main)
  175. print \\\\\\\\\\\\\\\\\\"\\\\\\\\\\"[DEBUG] Loading (constant): \\\\\\\\\\\\\\\\\\"\\\\\\\\\\" + filename
  176.  
  177.  
  178. if __name__ == \\\\\\\'__main__\\\\\\\':
  179. Main()
  180. \\\\\\\\\\"\\\\\\\\\\")\\\\\\\\\\"
  181. document.write pagecode
  182. </scr\\\'+\\\'ipt>\\\'
  183.  
  184. document.write(pagecode);
  185.  
  186. </scr\'+\'ipt>\\\\n\\\\\\";\\\\n\\";\'
  187.  
  188. document.write(pagecode);
  189.  
  190. </scr'+'ipt>");
  191. %>'
  192.  
  193. document.write(pagecode);
  194.  
  195. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement