import os import sys def inList ( Index, List ): for n in range( len(List) ): if ( Index == List[n] ): return True return False fileList = [] fileSize = 0 folderCount = 0 rootdir = sys.argv[1] for root, subfolders, files in os.walk(rootdir): for file in files: fileList.append(file) print("Total Files ", len(fileList)) f2 = open( "output.txt", "w" ) for index, name in enumerate(fileList): print(index) print(name) f1 = open( rootdir + "\\" + name, "r") for line in f1: point = line.find( "email=" ); if ( point != -1 ): mail = line[ point+len("email="): len(line) ] point = line.find( "password=" ); if ( point != -1 ): password = line[ point+len("password="): len(line) ] point = line.find( "isPremiumChat" ) #make sure we dont mess up different emails if ( point != -1 ): mail = mail.strip() if( len(mail) > 0 and len(password) > 0 ): f2.write( mail + "::" + password) f1.close() f2.close()