Advertisement
Guest User

Untitled

a guest
Feb 24th, 2012
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.97 KB | None | 0 0
  1. import os
  2. import sys
  3.  
  4. def inList ( Index, List ):
  5.     for n in range( len(List) ):
  6.         if (  Index == List[n] ):
  7.             return True
  8.     return False
  9.  
  10. fileList = []
  11. fileSize = 0
  12. folderCount = 0
  13. rootdir = sys.argv[1]
  14.  
  15. for root, subfolders, files in os.walk(rootdir):
  16.     for file in files:
  17.         fileList.append(file)
  18. print("Total Files ", len(fileList))
  19. f2 = open( "output.txt", "w" ) 
  20. for index, name in enumerate(fileList):
  21.     print(index)
  22.     print(name)
  23.     f1 = open( rootdir + "\\" + name, "r")
  24.     for line in f1:
  25.         point = line.find( "email=" );
  26.         if ( point != -1 ):
  27.             mail = line[ point+len("email="): len(line) ]
  28.         point = line.find( "password=" );
  29.         if ( point != -1 ):
  30.             password = line[ point+len("password="): len(line) ]
  31.         point = line.find( "isPremiumChat" )
  32.         #make sure we dont mess up different emails
  33.         if ( point != -1 ):
  34.             mail = mail.strip()
  35.             if( len(mail) > 0 and len(password) > 0 ):
  36.                 f2.write( mail + "::" + password)
  37.     f1.close()
  38. f2.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement