Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. with open(filename) as data:
  2.  
  3. accounts = dict()
  4.  
  5. for line in data:
  6. username = line.split()[1]
  7. IP = line.split()[0]
  8.  
  9. try:
  10. accounts[username].add(IP)
  11. except KeyError:
  12. accounts[username] = set()
  13. accounts[username].add(IP)
  14.  
  15. print "The accounts will be deleted from memory in 5 seconds"
  16. time.sleep(5)
  17. accounts.clear()
  18.  
  19. print "The accounts have been deleted from memory"
  20. time.sleep(5)
  21.  
  22. print "End of script"
  23.  
  24. accounts = dict()
  25. data= open(filename)
  26. for line in data.readline():
  27. info = line.split("LOG:")
  28. if len(info) == 2 :
  29. ( a , b ) = info
  30. try:
  31. accounts[a].add(True)
  32. except KeyError:
  33. accounts[a] = set()
  34. accounts[a].add(True)
  35.  
  36. import random
  37.  
  38. fn = random.randint
  39.  
  40. with open('ips.txt', 'w') as f:
  41. for i in xrange(9000000):
  42. f.write('{0}.{1}.{2}.{3} username-{4}n'.format(
  43. fn(0,255),
  44. fn(0,255),
  45. fn(0,255),
  46. fn(0,255),
  47. fn(0, 9000000),
  48. ))
  49.  
  50. import time
  51. from collections import defaultdict
  52.  
  53. def read_file(filename):
  54. with open(filename) as data:
  55.  
  56. accounts = defaultdict(set)
  57.  
  58. for line in data:
  59. IP, username = line.split()[:2]
  60. accounts[username].add(IP)
  61.  
  62. print "The accounts will be deleted from memory in 5 seconds"
  63. time.sleep(5)
  64. accounts.clear()
  65.  
  66. print "The accounts have been deleted from memory"
  67. time.sleep(5)
  68.  
  69. print "End of script"
  70.  
  71. if __name__ == '__main__':
  72. read_file('ips.txt')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement