├── .gitignore
├── README.md
└── turbolehe.py
/.gitignore:
--------------------------------------------------------------------------------
1 | *.csv
2 | *.txt
3 | **/*
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [![Contributors][contributors-shield]][contributors-url]
2 | [![Forks][forks-shield]][forks-url]
3 | [![Stargazers][stars-shield]][stars-url]
4 | [![Issues][issues-shield]][issues-url]
5 |
6 |
7 |
8 |
TURBOLEHE
9 |
10 |
11 |
12 | ## Introduction
13 |
14 | **Turbolehe** is a powerful tool designed to enhance your open-source intelligence (OSINT) investigations. With **Turbolehe**, you can generate a Holehe report quickly with just one command line. Turbolehe will test common email possibilities based on the first name and last name you provide.
15 |
16 | ## Table of Contents
17 |
18 | - [About The Project](#about-the-project)
19 | - [Getting Started](#getting-started)
20 | - [Usage](#usage)
21 | - [Roadmap](#roadmap)
22 | - [Contributing](#contributing)
23 | - [Holehe official page](#Holehe-official-page)
24 |
25 | ---
26 |
27 | ## About The Project
28 |
29 | **Turbolehe** is a command-line utility that simplifies the process of generating and validating email addresses associated with a given name or string. It was created to streamline open-source intelligence investigations by automating the generation of probable email addresses and testing their existence.
30 |
31 | **Key Features**:
32 | - Generate probable email addresses based on a provided name or string.
33 | - Test the validity of generated email addresses by generating a Holehe report for each email address.
34 | - Filter generated email addresses by specifying a domain (using the `-B` option).
35 |
36 | **Why Use Turbolehe?**
37 | - **Time-Saving**: Focus on more critical aspects of your investigation while Turbolehe automates the email generation process.
38 | - **Efficiency**: Quickly create lists of email addresses for further investigation.
39 | - **Flexibility**: Filter email addresses by domain to narrow down your search.
40 |
41 | ### Built With
42 |
43 | Turbolehe is built with the following technologies:
44 |
45 | - [Python](https://www.python.org/)
46 | - [Subprocess](https://docs.python.org/3/library/subprocess.html) - For executing shell commands.
47 | - [CSV](https://docs.python.org/3/library/csv.html) - For handling CSV files.
48 | - [Command-Line Arguments](https://docs.python.org/3/library/argparse.html) - For parsing command-line arguments.
49 |
50 | ---
51 |
52 | ## Getting Started
53 |
54 | ### Prerequisites
55 |
56 | - [Python3](https://www.python.org/) installed on your system.
57 | - **Holehe** already installed.
58 | - If you don't, install **Holehe**:
59 | ```sh
60 | pip3 install holehe
61 | ```
62 |
63 | ### Installation
64 |
65 | **Turbolehe** does not require installation. You can use it directly from the command line. Here are the steps to get started:
66 |
67 | 1. Clone the repository:
68 |
69 | ```sh
70 | git clone https://github.com/UserCr4ig/Turbolehe
71 | ```
72 |
73 | 2. Navigate to the project directory:
74 |
75 | ```sh
76 | cd Turbolehe
77 | ```
78 |
79 | 3. Run Turbolehe with your desired search term:
80 |
81 | ```sh
82 | python3 turbolehe.py [first_name] [Last_name]
83 | ```
84 | #
85 | #### **Don't forget to give the project a star! Your contributions are greatly appreciated !**
86 | ---
87 |
88 | ## Usage
89 |
90 | Turbolehe is designed to be straightforward to use. Simply provide a name and first name combination, and it will generate a list of probable Holehe reports. You can also use the -B option to filter email addresses by specifying a domain.
91 |
92 | Example usage:
93 |
94 | ```sh
95 | python turbolehe.py John Doe
96 | ```
97 |
98 | Example with filter (we will use gmail for this example) :
99 |
100 | ```sh
101 | python turbolehe.py John Doe -B
102 | ```
103 | ```sh
104 | Entrez le nom de domaine : gmail.com
105 | ```
106 |
107 |
108 | NB : This argument can be interesting if you know that this person uses such and such email service.
109 |
110 | ---
111 |
112 | ## Roadmap
113 |
114 | Here are some planned features and improvements for **Turbolehe**:
115 |
116 | - [ ] Add a new script to efficiently handle the large amount of data. Currently, I don't have an idea for an efficient way to do this. Currently, I use Excel.
117 | - [ ] Implement multithreading to avoid having to make 10 cups of coffee while it finishes :).
118 |
119 | You can also open a features proposition in the [open issues](https://github.com/UserCr4ig/Turbolehe/issues) for a full list of proposed features and known issues.
120 |
121 | ---
122 |
123 | ## Contributing
124 |
125 | Contributions to **Turbolehe** are welcome! If you have ideas for enhancements or bug fixes, please follow these steps to contribute:
126 |
127 | 1. Fork the project.
128 | 2. Create a new branch for your feature (`git checkout -b feature/YourAmazingFeature`).
129 | 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`).
130 | 4. Push to your branch (`git push origin feature/YourAmazingFeature`).
131 | 5. Open a pull request.
132 |
133 |
134 | ## Holehe official page
135 |
136 | - [Holehe official page](https://github.com/megadose/holehe)
137 |
138 |
139 | ---
140 |
141 | [*(Back to top)*](https://github.com/UserCr4ig/Turbolehe#introduction)
142 |
143 |
144 |
145 |
146 |
147 |
148 | [contributors-shield]: https://img.shields.io/github/contributors/UserCr4ig/Turbolehe.svg?style=for-the-badge
149 | [contributors-url]: https://github.com/UserCr4ig/Turbolehe/graphs/contributors
150 | [forks-shield]: https://img.shields.io/github/forks/UserCr4ig/Turbolehe.svg?style=for-the-badge
151 | [forks-url]: https://github.com/UserCr4ig/Turbolehe/network/members
152 | [stars-shield]: https://img.shields.io/github/stars/UserCr4ig/Turbolehe.svg?style=for-the-badge
153 | [stars-url]: https://github.com/UserCr4ig/Turbolehe/stargazers
154 | [issues-shield]: https://img.shields.io/github/issues/UserCr4ig/Turbolehe.svg?style=for-the-badge
155 | [issues-url]: https://github.com/UserCr4ig/Turbolehe/issues
156 |
157 | This readme has been of course generated by ChatGPT
158 |
--------------------------------------------------------------------------------
/turbolehe.py:
--------------------------------------------------------------------------------
1 | import subprocess
2 | import csv
3 | import os
4 | import argparse
5 |
6 | # Parameters
7 | domains = ["@gmail.com", "@yahoo.com", "@hotmail.com", "@outlook.com"]
8 |
9 | # Command line arguments parsing
10 | parser = argparse.ArgumentParser()
11 | parser.add_argument('search_term', nargs='+', help='First name, last name, or string to search for')
12 | parser.add_argument('-B', action='store_true', help='Option -B to generate only specified domain addresses')
13 | args = parser.parse_args()
14 |
15 | # Check the validity of the search term
16 | search_term = ' '.join(args.search_term)
17 | if not search_term.replace(' ', '').isalpha():
18 | print("Error: The search term must contain only alphabetical letters.")
19 | exit()
20 |
21 | # Function to generate probable email addresses
22 | def generate_addresses(search_term, domains):
23 | addresses = []
24 | first_name, last_name = search_term.split(' ', 1)
25 |
26 | for domain in domains:
27 | email_formats = [
28 | first_name.lower() + '.' + last_name.lower() + domain,
29 | first_name.lower()[0] + last_name.lower() + domain,
30 | first_name.lower() + last_name.lower()[0] + domain,
31 | first_name.lower()[0] + '.' + last_name.lower() + domain,
32 | last_name.lower() + '.' + first_name.lower() + domain,
33 | last_name.lower() + first_name.lower()[0] + domain,
34 | last_name.lower()[0] + '.' + first_name.lower() + domain,
35 | first_name.lower() + last_name.lower() + domain,
36 | last_name.lower() + first_name.lower() + domain,
37 | first_name.lower() + '.' + last_name.lower()[0] + domain,
38 | first_name.lower() + '_' + last_name.lower()[0] + domain, # Added format with underscore
39 | first_name.lower()[0] + '_' + last_name.lower() + domain, # Added format with underscore
40 | first_name.lower() + '_' + last_name.lower() + domain, # Added format with underscore
41 | last_name.lower() + '_' + first_name.lower() + domain, # Added format with underscore
42 | last_name.lower() + '_' + first_name.lower()[0] + domain, # Added format with underscore
43 | last_name.lower()[0] + '_' + first_name.lower() + domain, # Added format with underscore
44 | ]
45 |
46 | addresses.extend(email_formats)
47 |
48 | return addresses
49 |
50 | # Generate probable email addresses based on the search term
51 | email_addresses = generate_addresses(search_term, domains)
52 |
53 | # Check if the -B option is specified to filter addresses by domain name
54 | if args.B:
55 | domain = input("Enter the domain name: ")
56 | email_addresses = [address for address in email_addresses if address.endswith(domain)]
57 |
58 | # Create directory structure
59 | first_name, last_name = search_term.split(' ', 1)
60 | directory_command = f"mkdir {first_name}-{last_name}"
61 | subprocess.run(directory_command, shell=True)
62 |
63 | # Execute the command to test each email address
64 | for address in email_addresses:
65 | command_holehe = f"cd {first_name}-{last_name} && holehe {address} -C"
66 | subprocess.run(command_holehe, shell=True)
67 | directory = os.path.join(os.getcwd(), f"{first_name}-{last_name}")
68 |
69 | # List to store valid file names
70 | valid_files = []
71 |
72 | # Iterate through all files in the directory
73 | for file in os.listdir(directory):
74 | if file.endswith(".csv") and file.startswith("holehe_"):
75 | # Add the valid file name to the list
76 | valid_files.append(file)
77 |
78 | # Output file path
79 | output_path = os.path.join(directory, 'main.csv')
80 |
81 | # Open the output file in write mode
82 | with open(output_path, 'w', newline='') as csvfile:
83 | writer = None
84 |
85 | # Iterate through valid files
86 | for file in valid_files:
87 | # CSV file path
88 | file_path = os.path.join(directory, file)
89 |
90 | # Extract email address from the file name
91 | email_address = file.split("_")[2]
92 |
93 | # Open the CSV file in read mode
94 | with open(file_path, newline='') as csvfile_in:
95 | reader = csv.DictReader(csvfile_in)
96 | fieldnames = reader.fieldnames
97 |
98 | # Add the 'email address' column in the first position
99 | fieldnames.insert(0, 'email address')
100 |
101 | # Create the writer if not already done
102 | if writer is None:
103 | writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
104 | writer.writeheader()
105 |
106 | # Read each row from the CSV file and write it to the output file with the corresponding email address
107 | for row in reader:
108 | row['email address'] = email_address
109 | writer.writerow(row)
110 |
111 | print("Successfully generated main.csv file.")
112 |
--------------------------------------------------------------------------------