n0va_sa

Directory Traversal

Jul 11th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.97 KB | None | 0 0
  1. # Directory Traversal Program # Recursively #
  2. #####################################
  3. # It's a python2 Compatible Program #
  4. #####################################
  5. # C:\Documents and Settings\All Users\Start Menu\Programs\Startup <--- use this wisely and send your ideas to @mail - contactthedead1998@gmail.com
  6. import os
  7.  
  8. def listDir(current_dir,count):
  9.     spc = count * "=="
  10.     for item in os.listdir(current_dir):
  11.         if os.path.isfile(current_dir + "/"+ item):
  12.             new_spc = spc + "="
  13.             print new_spc + "File> " + item
  14.         elif os.path.isdir(current_dir + "/" + item):
  15.             print spc + "[" + item + "]"
  16.             newDir = current_dir + "/" + item
  17.             listDir(newDir, count*2)
  18.         else:
  19.             print "unknown"
  20.  
  21.  
  22. listDir(".", 1)
  23.  
  24. # its a Ransomeware Builder If you can use this #
  25. #Possibilities are endless, use this for intel gathering(use this to search specific kind of files and copy then silently to a place.)#
Add Comment
Please, Sign In to add comment