The search query you provided, "Filetype Txt -gmail.com Username Password --BEST" Google Dorking command
If you are a security professional using this to educate clients on why they need Multi-Factor Authentication (MFA), it’s a vivid "real-world" example of data exposure. If you are an average user , finding your own info in a file like this is a sign to change your passwords immediately and switch to a dedicated password manager. A Quick Note on Safety
for root, dirs, files in os.walk(directory): for file in files: if file.endswith(".txt"): path = os.path.join(root, file) with open(path, 'r', encoding='utf-8', errors='ignore') as f: for line_num, line in enumerate(f, 1): # Skip if gmail.com appears if "gmail.com" in line.lower(): continue match = pattern.search(line) if match: print(f"[!] Possible credentials in: path:line_num") print(f" line.strip()") print()
Here's a that: