This tool helps you parse through hundreds of text files filled with email hashes and search for a specific query across all of them.
Make sure all your .txt
files are in a single directory. This will make it easier for the script to access and parse them.
The provided Python script will read all .txt
files in the specified directory and search for a specific query within these files.
- Python 3.x installed on your system.
- Download Python: If you don't have Python installed, download it from the official Python website.
-
Save the Script: Save the following script in the parent directory
-
Modify the Script:
- Replace
'path_to_your_directory'
with the actual path where your.txt
files are stored. - Replace
'your_query_here'
with the query you want to search for.
- Replace
-
Run the Script:
- Open a terminal or command prompt.
- Navigate to the directory where you saved the script.
- Run the script using the following command:
python search_email_hashes.py
Suppose your .txt
files are located in /home/user/email_hashes/
, and you want to search for the query [email protected]
. You would modify the script as follows:
def main():
directory = '/home/user/email_hashes' # Path to your directory
query = '[email protected]' # Your search query
Then run the script:
python search_email_hashes.py
The script will output the matches found along with the filenames where the query was found.
Found 3 matches for '[email protected]':
In file file1.txt: [email protected]
In file file2.txt: [email protected]
In file file3.txt: [email protected]
If no matches are found, it will display:
No matches found for '[email protected]'.
- Ensure your text files are encoded in UTF-8 to avoid encoding issues.
- The script only searches for exact matches. For partial matches or regular expressions, the script can be modified accordingly.
######## ## ## ######## ######## ## ######## ######## ### #### ## ##
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ### ##
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #### ##
######## ## ## ######## ######## ## ###### ######## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ######### ## ## ####
## ## ## ## ## ## ## ## ## ## ## ## ## ## ###
## ####### ## ## ## ######## ######## ## ## ## ## #### ## ##