├── images ├── .gitkeep ├── install.png ├── output.png ├── logo-darkwebeye.png └── include-file-format.png ├── LICENSE ├── .gitignore ├── README.md └── darkWebEye.py /images/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /images/install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BullsEye0/DarkWebEye/HEAD/images/install.png -------------------------------------------------------------------------------- /images/output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BullsEye0/DarkWebEye/HEAD/images/output.png -------------------------------------------------------------------------------- /images/logo-darkwebeye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BullsEye0/DarkWebEye/HEAD/images/logo-darkwebeye.png -------------------------------------------------------------------------------- /images/include-file-format.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BullsEye0/DarkWebEye/HEAD/images/include-file-format.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2024, Jolanda de Koff 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # poetry 98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 102 | #poetry.lock 103 | 104 | # pdm 105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 106 | #pdm.lock 107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 108 | # in version control. 109 | # https://pdm.fming.dev/latest/usage/project/#working-with-version-control 110 | .pdm.toml 111 | .pdm-python 112 | .pdm-build/ 113 | 114 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 115 | __pypackages__/ 116 | 117 | # Celery stuff 118 | celerybeat-schedule 119 | celerybeat.pid 120 | 121 | # SageMath parsed files 122 | *.sage.py 123 | 124 | # Environments 125 | .env 126 | .venv 127 | env/ 128 | venv/ 129 | ENV/ 130 | env.bak/ 131 | venv.bak/ 132 | 133 | # Spyder project settings 134 | .spyderproject 135 | .spyproject 136 | 137 | # Rope project settings 138 | .ropeproject 139 | 140 | # mkdocs documentation 141 | /site 142 | 143 | # mypy 144 | .mypy_cache/ 145 | .dmypy.json 146 | dmypy.json 147 | 148 | # Pyre type checker 149 | .pyre/ 150 | 151 | # pytype static type analyzer 152 | .pytype/ 153 | 154 | # Cython debug symbols 155 | cython_debug/ 156 | 157 | # PyCharm 158 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 159 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 160 | # and can be added to the global gitignore or merged into this file. For a more nuclear 161 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 162 | #.idea/ 163 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DarkWebEye 2 | Welcome to DarkWebEye. Explore the unseen depths of the internet with DarkWebEye, a powerful and intuitive tool crafted by Jolanda de Koff. Designed for ethical hackers, cybersecurity enthusiasts, and researchers, DarkWebEye offers a secure and efficient way to search the dark web through the Ahmia search engine. 3 | 4 | ***Your Gateway to the Hidden Web*** 5 | 6 | ![Logo DarkWebEye](images/logo-darkwebeye.png) 7 | 8 | [Here you can read the article + Video on HackingPassion.com](https://hackingpassion.com/darkwebeye/) 9 | 10 | # DarkWebEye: 11 | 12 | > ### Where Curiosity Meets the Hidden - Journey Through the Dark - Seeking Secrets in the Shadows 13 | 14 | ## Introduction 15 | Welcome to DarkWebEye. This tool, crafted by me, Jolanda de Koff, is designed to help you explore the hidden parts of the web safely and efficiently. DarkWebEye uses the Ahmia search engine to provide a streamlined way to find specific content on the dark web. It's perfect for cybersecurity enthusiasts, ethical hackers, and researchers. 16 | 17 | Why DarkWebEye? 18 | The dark web is a mysterious and often misunderstood part of the internet. With DarkWebEye, you can navigate this complex landscape responsibly. Whether you want to understand hidden services, gather research data, or satisfy your curiosity, DarkWebEye is your reliable guide. 19 | 20 | 21 | ## Key Features 22 | 23 | - **Easy Setup:** Quickly get started with a virtual environment that installs all the necessary Python modules. 24 | - **Custom Search Filters:** Tailor your search by time frame to get the most relevant results. 25 | - **Multiple Output Formats:** Save your search results in TXT, JSON, or PDF format for easy reference. 26 | - **User-Friendly Interface:** Navigate through the dark web with a simple and intuitive command-line interface. 27 | 28 | ## How It Works 29 | 30 | DarkWebEye begins by ensuring you have all the required modules installed in a virtual environment. If not, it guides you through the setup process. Once everything is in place, you can enter your search query and select a time filter (e.g., Any Time, Last Day, Last Week, Last Month). The results are displayed directly in your terminal, and you have the option to save them in your preferred format. 31 | 32 | 33 | ## Step-by-Step Guide 34 | 35 | 1. **Setup**: 36 | - Ensure you have Python 3 installed. 37 | - Clone or download the DarkWebEye script from [GitHub](https://github.com/BullsEye0/darkWebEye). 38 | 39 | 2. **Running the Script**: 40 | - Open your terminal. 41 | - Navigate to the folder containing the DarkWebEye script. 42 | - Execute the script by running `python darkWebEye.py`. 43 | 44 | 3. **Using DarkWebEye**: 45 | - Enter your search query when prompted. 46 | - Select the time filter for your search (e.g., Any Time, Last Day, Last Week, Last Month). 47 | - Review the search results directly in your terminal. 48 | - Choose a file format to save the results (TXT, JSON, or PDF) or opt not to save them. 49 | 50 | 4. **Saving Results**: 51 | - Specify the directory where you want to save the results. 52 | - DarkWebEye generates the file and stores it in your specified location. 53 | 54 | Explore the dark web confidently and discover the hidden secrets waiting to be uncovered with DarkWebEye. 55 | 56 | ## Folder Structure 57 | 58 | To keep everything organized, create a dedicated folder for DarkWebEye. This will house the script, virtual environment, and any search results. Here's a simple structure you can follow: 59 | 60 | ``` 61 | /DarkWebEye 62 | |-- /env # Virtual environment 63 | |-- darkwebeye.py # The main script 64 | |-- results # 65 | ``` 66 | ![Install DarkWebEye](images/install.png) 67 | 68 | **** 69 | 70 | ## Installation Steps: 71 | 72 | 1. **Clone the repository:** 73 | ```bash 74 | git clone https://github.com/BullsEye0/darkWebEye.git 75 | cd darkWebEye 76 | ``` 77 | 78 | 2. **Run the script:** 79 | ```bash 80 | python3 darkWebEye.py 81 | ``` 82 | 83 | *And that's it!* 84 | 85 | **** 86 | 87 | ## Follow Prompts 88 | 89 | The tool will guide you through creating a **virtual environment** and installing the necessary modules. 90 | Enter your search query and select a time filter. 91 | Save Results 92 | 93 | Choose a format to save the results for future reference. 94 | 95 | **** 96 | 97 | ## Safety Precautions 98 | Before using darkWebEye, following some safety measures to protect your privacy and security is crucial. 99 | 100 | - Use a VPN: Ensure you are connected to a reliable VPN to mask your IP address. 101 | - Run in a Virtual Machine: Using a virtual machine can add an extra layer of security. 102 | - Update Your Software: Keep all your software, including the Tor browser, up to date. 103 | - Follow Good Practices: Do not share personal information and avoid clicking on suspicious links. 104 | - For more detailed safety precautions, here on [Hackingpassion.com](https://hackingpassion.com) you can find more info. 105 | 106 | **** 107 | 108 | ## Video 109 | 110 | [Here on Odysee, you can see the video: ](https://odysee.com/$/embed/@hackingpassion:9/darkWebEye:a?r=ATrtLheniwT9fg2d9GsyfTGaYUtpMfbK) 111 | 112 | **** 113 | 114 | ## About the Author 115 | 116 | Hi there! I'm Jolanda de Koff, a passionate cybersecurity expert, Linux specialist, and ethical hacker. Over the years, I've dedicated myself to sharing knowledge and tools with the community through my websites, [HackingPassion.com](https://hackingpassion.com), [Bullseye0.com](https://bullseye0.com), and [JolandaDeKoff.com](https://jolandadekoff.com). 117 | 118 | ### My Mission 119 | 120 | I believe that knowledge should be accessible to all. My goal is to educate and empower individuals to explore cybersecurity responsibly. Through my tutorials, I aim to demystify the complexities of ethical hacking and provide practical insights that you can apply in real-world scenarios. 121 | 122 | ![DarkWebEye](images/include-file-format.png) 123 | 124 | **** 125 | 126 | ## Stay Connected 127 | 128 | I'm all about connecting with like-minded individuals and fostering a community of learning and growth. Here are some ways you can connect with me and stay updated: 129 | 130 | * Website: [HackingPassion.com](https://hackingpassion.com) and [Jolanda de Koff](https://jolandadekoff.com) 131 | 132 | * GitHub: [BullsEye0](https://github.com/BullsEye0) 133 | 134 | * [Facebook Personal](https://www.facebook.com/profile.php?id=100069546190609) 135 | 136 | * [Facebook Page](https://www.facebook.com/ethical.hack.group) 137 | 138 | * [Facebook Group](https://www.facebook.com/groups/ethical.hack.group/) 139 | 140 | * [Odysee](https://odysee.com/$/invite/@hackingpassion:9) 141 | 142 | * [Youtube](https://www.youtube.com/@HackingPassion) 143 | 144 | * [Linkedin](https://www.linkedin.com/in/jolandadekoff/) 145 | 146 | > Join the journey through the shadows of the dark web with darkWebEye and discover the hidden secrets waiting to be uncovered. 147 | 148 | ![darkWebEye](images/output.png) 149 | 150 | *** 151 | 152 | ## 💻 Support this project 153 | 154 | If you find this tool useful, consider supporting my work: 155 | [❤️ Sponsor BullsEye](https://github.com/sponsors/BullsEye0) 156 | 157 | Get the full hands-on course: 158 | **[Ethical Hacking Complete Course – Zero to Expert](https://www.udemy.com/course/ethical-hacking-complete-course-zero-to-expert/?couponCode=DECEMBER25)** 159 | 160 | (supports me directly as your instructor!) 161 | 162 | Professional penetration testing. Zero to Expert. 163 | ✅ Kali Linux + Parrot OS 164 | ✅ Real-world hacking scenarios 165 | ✅ All major tools & techniques 166 | ✅ Beginner-friendly 167 | 168 | HACKING IS NOT A HOBBY, BUT A WAY OF LIFE 🎯 169 | 170 | *** 171 | 172 | ## Donate 173 | 174 | I have developed DarkWebEye because I am passionate about this. 175 | Donations are one of the many ways to support what I do. 176 | 177 | [Donate](https://hackingpassion.com/donate/) 178 | 179 | BAT: Use [Brave](https://brave.com/bul891) and donate on any of my web pages/profiles 180 | 181 | [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R96YN2PUS8V8W) 182 | -------------------------------------------------------------------------------- /darkWebEye.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env/python3 2 | # This Python file uses the following encoding:utf-8 3 | 4 | # ===== # 5 | # 6 | # ▀█████████▄ ▄████████ Author: Jolanda de Koff | BullsEye 7 | # ███ ███ ███ ███ Websites: HackingPassion.com | Bullseye0.com / JolandaDeKoff.com 8 | # ███ ███ ███ █▀ GitHub: https://github.com/BullsEye0 9 | # ▄███▄▄▄██▀ ▄███▄▄▄ linkedin: https://www.linkedin.com/in/jolandadekoff 10 | # ▀▀███▀▀▀██▄ ▀▀███▀▀▀ Facebook Group: https://www.facebook.com/groups/hack.passion/ 11 | # ███ ██▄ ███ █▄ Facebook: https://www.facebook.com/profile.php?id=100069546190609 12 | # ███ ███ ███ ███ Facebook Page: https://www.facebook.com/ethical.hack.group 13 | # ▄█████████▀ ██████████ Odysee: https://odysee.com/$/invite/@hackingpassion:9 14 | # Reddit: https://www.reddit.com/user/BullsEye_0/ 15 | # Medium: https://medium.com/@bulls-eye 16 | # 17 | # BullsEye..! 18 | # ===== # 19 | 20 | # DarkWebEye v1 Created June 2024 21 | # Copyright (c) 2024 Jolanda de Koff. 22 | 23 | ######################################################################## 24 | 25 | # A notice to all nerds and n00bs... 26 | # If you copy the developer's work, it will not make you a hacker..! 27 | # Respect all developers; we are doing this because it's fun... 28 | 29 | ######################################################################## 30 | 31 | 32 | import subprocess 33 | import sys 34 | import os 35 | import json 36 | import time 37 | import signal 38 | 39 | from colorama import init, Fore 40 | 41 | init(autoreset=True) 42 | 43 | interrupted = False 44 | 45 | def in_virtualenv(): 46 | return ( 47 | hasattr(sys, 'real_prefix') or 48 | (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix) 49 | ) 50 | 51 | def install_module(module_name): 52 | try: 53 | subprocess.check_call([sys.executable, "-m", "pip", "install", module_name]) 54 | except subprocess.CalledProcessError: 55 | return False 56 | return True 57 | 58 | def create_virtualenv(): 59 | if not os.path.exists('env'): 60 | try: 61 | subprocess.check_call([sys.executable, "-m", "venv", "env"]) 62 | print(Fore.LIGHTGREEN_EX + "Virtual environment created successfully.") 63 | except subprocess.CalledProcessError as e: 64 | print(Fore.LIGHTRED_EX + f"Failed to create virtual environment: {e}") 65 | sys.exit(1) 66 | 67 | def activate_and_run(): 68 | env_activate = os.path.join('env', 'bin', 'activate') if os.name == 'posix' else os.path.join('env', 'Scripts', 'activate') 69 | if os.name == 'posix': 70 | subprocess.call(['bash', '-c', f'source {env_activate} && python {sys.argv[0]}']) 71 | else: 72 | subprocess.call(['cmd.exe', '/k', f'env\\Scripts\\activate && python {sys.argv[0]}']) 73 | os._exit(0) 74 | 75 | def install_modules_in_virtualenv(): 76 | env_python = os.path.join('env', 'bin', 'python') if os.name == 'posix' else os.path.join('env', 'Scripts', 'python.exe') 77 | for module in required_modules: 78 | try: 79 | subprocess.check_call([env_python, "-m", "pip", "install", module]) 80 | except subprocess.CalledProcessError as e: 81 | print(Fore.LIGHTRED_EX + f"Failed to install {module} in virtual environment: {e}") 82 | sys.exit(1) 83 | 84 | def check_and_install_modules(): 85 | for module in required_modules: 86 | try: 87 | __import__(module) 88 | except ImportError: 89 | print(Fore.LIGHTYELLOW_EX + f"Module {module} not found. Installing...") 90 | if not install_module(module): 91 | print(Fore.LIGHTRED_EX + f"Failed to install {module}.") 92 | print_virtualenv_prompt() 93 | choice = input("Create a virtual environment and install the required modules? (yes/no): ").strip().lower() 94 | if choice == 'yes': 95 | create_virtualenv() 96 | install_modules_in_virtualenv() 97 | activate_and_run() 98 | else: 99 | print(Fore.LIGHTRED_EX + "Modules not installed. Exiting...") 100 | sys.exit(1) 101 | 102 | def print_virtualenv_prompt(): 103 | print(Fore.RED + """ 104 | ▓█████▄ ▄▄▄ ██▀███ ██ ▄█▀ █ █░▓█████ ▄▄▄▄ ▓█████▓██ ██▓▓█████ 105 | ▒██▀ ██▌▒████▄ ▓██ ▒ ██▒ ██▄█▒ ▓█░ █ ░█░▓█ ▀ ▓█████▄ ▓█ ▀ ▒██ ██▒▓█ ▀ 106 | ░██ █▌▒██ ▀█▄ ▓██ ░▄█ ▒▓███▄░ ▒█░ █ ░█ ▒███ ▒██▒ ▄██▒███ ▒██ ██░▒███ 107 | ░▓█▄ ▌░██▄▄▄▄██ ▒██▀▀█▄ ▓██ █▄░█░ █ ░█ ▒▓█ ▄ ▒██░█▀ ▒▓█ ▄ ░ ▐██▓░▒▓█ ▄ 108 | ░▒████▓ ▓█ ▓██▒░██▓ ▒██▒▒██▒ █▄░░██▒██▓ ░▒████▒░▓█ ▀█▓░▒████▒ ░ ██▒▓░░▒████▒ 109 | ▒▒▓ ▒ ▒▒ ▓▒█░░ ▒▓ ░▒▓░▒ ▒▒ ▓▒░ ▓░▒ ▒ ░░ ▒░ ░░▒▓███▀▒░░ ▒░ ░ ██▒▒▒ ░░ ▒░ ░ 110 | ░ ▒ ▒ ▒ ▒▒ ░ ░▒ ░ ▒░░ ░▒ ▒░ ▒ ░ ░ ░ ░ ░▒░▒ ░ ░ ░ ░▓██ ░▒░ ░ ░ ░ 111 | ░ ░ ░ ░ ▒ ░░ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ▒ ▒ ░░ ░ 112 | ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░░ ░ ░ ░ 113 | """ + Fore.RESET) 114 | print(Fore.LIGHTBLUE_EX + "\t Where Curiosity Meets the Hidden") 115 | time.sleep(0.5) 116 | print(Fore.LIGHTBLUE_EX + "\tJourney Through the Dark - Seeking Secrets in the Shadows\n\n") 117 | time.sleep(0.3) 118 | print(Fore.LIGHTYELLOW_EX + "\tHow about creating a virtual environment?") 119 | print(Fore.LIGHTYELLOW_EX + "\tHere’s why it's a good idea:") 120 | print(Fore.LIGHTYELLOW_EX + "\t1. It keeps this project's libraries separate from others.") 121 | print(Fore.LIGHTYELLOW_EX + "\t2. It avoids version conflicts.") 122 | print(Fore.LIGHTYELLOW_EX + "\t3. It makes it easy to manage and remove dependencies.") 123 | print(Fore.LIGHTYELLOW_EX + "\t4. It keeps your main Python installation clean.\n") 124 | print(Fore.LIGHTWHITE_EX + "\tModule Installation Notice:") 125 | print(Fore.LIGHTWHITE_EX + "\tThis script will install necessary Python modules.") 126 | print(Fore.LIGHTWHITE_EX + "\tThese modules are required for the tool to function properly.") 127 | print(Fore.LIGHTWHITE_EX + "\tFor more information, visit the GitHub page: https://github.com/BullsEye0\n") 128 | 129 | required_modules = [ 130 | 'fpdf', 131 | 'colorama', 132 | 'requests' 133 | ] 134 | 135 | def signal_handler(sig, frame): 136 | global interrupted 137 | if not interrupted: 138 | interrupted = True 139 | print("\n\n\t\033[1;91m[!] I like to See Ya \033[0m😃") 140 | sys.exit(1) 141 | 142 | signal.signal(signal.SIGINT, signal_handler) 143 | 144 | if not in_virtualenv(): 145 | if not os.path.exists('env'): 146 | print("\nThis tool is not running in a virtual environment.") 147 | print_virtualenv_prompt() 148 | choice = input("Create a virtual environment and install the required modules? (yes/no): ").strip().lower() 149 | if choice == 'yes': 150 | create_virtualenv() 151 | install_modules_in_virtualenv() 152 | activate_and_run() 153 | else: 154 | print(Fore.LIGHTRED_EX + "Modules not installed. Exiting...") 155 | print("\n\t\033[1;91m[!] I like to See Ya \033[0m😃") 156 | sys.exit(1) 157 | else: 158 | activate_and_run() 159 | else: 160 | check_and_install_modules() 161 | 162 | from fpdf import FPDF 163 | import requests 164 | from html.parser import HTMLParser 165 | 166 | def clear_screen(title=None): 167 | if os.name == 'posix': 168 | os.system('clear') 169 | else: 170 | os.system('cls') 171 | if title: 172 | print(f"\033]0;{title}\007", end='') 173 | 174 | def print_darkwebeye_title(): 175 | print(Fore.RED + ''' 176 | ▓█████▄ ▄▄▄ ██▀███ ██ ▄█▀ █ █░▓█████ ▄▄▄▄ ▓█████▓██ ██▓▓█████ 177 | ▒██▀ ██▌▒████▄ ▓██ ▒ ██▒ ██▄█▒ ▓█░ █ ░█░▓█ ▀ ▓█████▄ ▓█ ▀ ▒██ ██▒▓█ ▀ 178 | ░██ █▌▒██ ▀█▄ ▓██ ░▄█ ▒▓███▄░ ▒█░ █ ░█ ▒███ ▒██▒ ▄██▒███ ▒██ ██░▒███ 179 | ░▓█▄ ▌░██▄▄▄▄██ ▒██▀▀█▄ ▓██ █▄░█░ █ ░█ ▒▓█ ▄ ▒██░█▀ ▒▓█ ▄ ░ ▐██▓░▒▓█ ▄ 180 | ░▒████▓ ▓█ ▓██▒░██▓ ▒██▒▒██▒ █▄░░██▒██▓ ░▒████▒░▓█ ▀█▓░▒████▒ ░ ██▒▓░░▒████▒ 181 | ▒▒▓ ▒ ▒▒ ▓▒█░░ ▒▓ ░▒▓░▒ ▒▒ ▓▒░ ▓░▒ ▒ ░░ ▒░ ░░▒▓███▀▒░░ ▒░ ░ ██▒▒▒ ░░ ▒░ ░ 182 | ░ ▒ ▒ ▒ ▒▒ ░ ░▒ ░ ▒░░ ░▒ ▒░ ▒ ░ ░ ░ ░ ░▒░▒ ░ ░ ░ ░▓██ ░▒░ ░ ░ ░ 183 | ░ ░ ░ ░ ▒ ░░ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ▒ ▒ ░░ ░ 184 | ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░░ ░ ░ ░ 185 | ░ ''' + Fore.RESET) 186 | 187 | print(Fore.LIGHTBLUE_EX + "\t Where Curiosity Meets the Hidden") 188 | time.sleep(0.5) 189 | print(Fore.LIGHTBLUE_EX + "\tJourney Through the Dark - Seeking Secrets in the Shadows\n\n") 190 | time.sleep(0.3) 191 | 192 | class DarkWebSearchParser(HTMLParser): 193 | def __init__(self): 194 | super().__init__() 195 | self.results = [] 196 | self.current_title = None 197 | self.current_link = None 198 | self.current_onion_link = None 199 | self.current_description = None 200 | self.current_time = None 201 | self.in_result = False 202 | self.in_description = False 203 | self.in_title = False 204 | self.in_link = False 205 | self.in_time = False 206 | 207 | def handle_starttag(self, tag, attrs): 208 | attrs_dict = dict(attrs) 209 | if tag == 'li' and ('class', 'result') in attrs: 210 | self.in_result = True 211 | self.current_title = '' 212 | self.current_link = '' 213 | self.current_onion_link = '' 214 | self.current_description = '' 215 | self.current_time = '' 216 | elif self.in_result and tag == 'h4': 217 | self.in_title = True 218 | elif self.in_result and tag == 'a' and 'href' in attrs_dict: 219 | href = attrs_dict['href'] 220 | self.current_link = href 221 | if 'redirect_url=' in href: 222 | self.current_onion_link = href.split('redirect_url=')[1] 223 | self.in_link = True 224 | elif self.in_result and tag == 'span' and 'class' in attrs_dict and attrs_dict['class'] == 'result-date': 225 | self.in_time = True 226 | elif self.in_result and tag == 'p': 227 | self.in_description = True 228 | 229 | def handle_data(self, data): 230 | if self.in_title: 231 | self.current_title += data.strip() 232 | elif self.in_description: 233 | self.current_description += data.strip() 234 | elif self.in_time: 235 | self.current_time += data.strip() 236 | 237 | def handle_endtag(self, tag): 238 | if tag == 'li' and self.in_result: 239 | self.in_result = False 240 | self.in_title = False 241 | self.in_description = False 242 | self.in_link = False 243 | self.in_time = False 244 | self.results.append({ 245 | 'title': self.current_title, 246 | 'description': self.current_description, 247 | 'onion_link': self.current_onion_link, 248 | 'direct_link': self.current_link + f' — {self.current_time}' if self.current_time else self.current_link 249 | }) 250 | self.current_title = None 251 | self.current_link = None 252 | self.current_onion_link = None 253 | self.current_description = None 254 | self.current_time = None 255 | elif tag == 'h4': 256 | self.in_title = False 257 | elif tag == 'a' and self.in_link: 258 | self.in_link = False 259 | elif tag == 'span' and self.in_time: 260 | self.in_time = False 261 | elif tag == 'p' and self.in_description: 262 | self.in_description = False 263 | 264 | def search_ahmia(query, time_filter): 265 | base_url = "https://ahmia.fi/search/" 266 | search_url = f"{base_url}?q={query}&d={time_filter}" 267 | 268 | try: 269 | start_time = time.time() 270 | response = requests.get(search_url) 271 | elapsed_time = time.time() - start_time 272 | 273 | if response.status_code == 200: 274 | parser = DarkWebSearchParser() 275 | parser.feed(response.text) 276 | results = parser.results 277 | for result in results: 278 | print(Fore.LIGHTBLUE_EX + f"Title: {result['title']}") 279 | print(f"Description: {result['description'] if result['description'] else 'No description provided'}") 280 | print(f"Onion Link: {result['onion_link'] if result['onion_link'] else 'None'}") 281 | print(f"Direct Link: {result['direct_link'] if result['direct_link'] else 'None'}") 282 | print(Fore.LIGHTBLUE_EX + "+==================================================================================================+") 283 | print(f"\nOmitted very similar entries. Displaying {len(results)} matches in {elapsed_time:.2f} seconds.") 284 | return results 285 | else: 286 | print(f"Error: {response.status_code}") 287 | return None 288 | except requests.exceptions.RequestException as e: 289 | print(f"Network error occurred: {e}") 290 | return None 291 | except Exception as e: 292 | print(f"An error occurred: {e}") 293 | return None 294 | 295 | def save_results(results, file_type, save_path): 296 | if file_type == '1': 297 | file_path = os.path.join(save_path, 'results.txt') 298 | with open(file_path, 'w') as f: 299 | for result in results: 300 | f.write(f"Title: {result['title']}\n") 301 | f.write(f"Description: {result['description']}\n") 302 | f.write(f"Onion Link: {result['onion_link']}\n") 303 | f.write(f"Direct Link: {result['direct_link']}\n") 304 | f.write("+=======================================================================================================+\n") 305 | print(f"Results saved as {file_path}") 306 | elif file_type == '2': 307 | file_path = os.path.join(save_path, 'results.json') 308 | with open(file_path, 'w') as f: 309 | json.dump(results, f, indent=4) 310 | print(f"Results saved as {file_path}") 311 | elif file_type == '3' and 'fpdf' in sys.modules: 312 | file_path = os.path.join(save_path, 'results.pdf') 313 | pdf = FPDF() 314 | pdf.add_page() 315 | pdf.set_font("Arial", size=12) 316 | for result in results: 317 | pdf.cell(200, 10, txt=f"Title: {result['title']}".encode('latin1', 'replace').decode('latin1'), ln=True) 318 | pdf.multi_cell(0, 10, txt=f"Description: {result['description']}".encode('latin1', 'replace').decode('latin1')) 319 | pdf.cell(200, 10, txt=f"Onion Link: {result['onion_link']}".encode('latin1', 'replace').decode('latin1'), ln=True) 320 | pdf.cell(200, 10, txt=f"Direct Link: {result['direct_link']}".encode('latin1', 'replace').decode('latin1'), ln=True) 321 | pdf.cell(200, 10, txt="+=======================================================================================================+", ln=True) 322 | pdf.output(file_path) 323 | print(f"Results saved as {file_path}") 324 | elif file_type == '3': 325 | print("\tPDF saving is not available because the 'fpdf' module is not installed.") 326 | else: 327 | print("\tInvalid file type selected.") 328 | 329 | def main(): 330 | try: 331 | while True: 332 | clear_screen("\tDarkWebEye") 333 | print(Fore.LIGHTBLUE_EX + "+==============================+") 334 | print(Fore.LIGHTBLUE_EX + "Created by Jolanda de Koff / BullsEye 🎯") 335 | print(Fore.LIGHTBLUE_EX + "Github: https://github.com/BullsEye0") 336 | print(Fore.LIGHTBLUE_EX + "Website: https://HackingPassion.com") 337 | print(Fore.LIGHTBLUE_EX + "Odysee: https://odysee.com/$/invite/@hackingpassion:9") 338 | print(Fore.LIGHTYELLOW_EX + "Hi There, Shall We Play a Game..?") 339 | print(Fore.LIGHTBLUE_EX + "+==============================+\n") 340 | time.sleep(0.5) 341 | print_darkwebeye_title() 342 | 343 | search_query = input(Fore.LIGHTYELLOW_EX + "\n\tEnter your search query or (type 'exit' to quit): ") 344 | if search_query.lower() == 'exit': 345 | print("\n\t\033[1;91m[!] I like to See Ya \033[0m😃\n\n") 346 | time.sleep(0.5) 347 | sys.exit(1) 348 | 349 | print(Fore.LIGHTYELLOW_EX + "\tChoose a time filter:") 350 | print("\t1. Any Time") 351 | print("\t2. Last Day") 352 | print("\t3. Last Week") 353 | print("\t4. Last Month") 354 | 355 | time_choice = input("\tEnter the number of your choice: ") 356 | 357 | if time_choice == '1': 358 | time_filter = 'all' 359 | elif time_choice == '2': 360 | time_filter = '1' 361 | elif time_choice == '3': 362 | time_filter = '7' 363 | elif time_choice == '4': 364 | time_filter = '30' 365 | else: 366 | print("Invalid choice. Defaulting to Any Time.") 367 | time_filter = 'all' 368 | 369 | results = search_ahmia(search_query, time_filter) 370 | 371 | if results: 372 | print(Fore.LIGHTYELLOW_EX + "\t\nChoose a file format to save the results:") 373 | print("\t1. Save as .txt") 374 | print("\t2. Save as .json") 375 | print("\t3. Save as .pdf") 376 | print("\t4. Do not save") 377 | file_choice = input("\tEnter the number of your choice: ") 378 | if file_choice in ['1', '2', '3']: 379 | save_path = input(Fore.LIGHTYELLOW_EX + "\tEnter the directory to save the file (leave empty for current directory): ").strip() 380 | if not save_path: 381 | save_path = os.getcwd() 382 | save_results(results, file_choice, save_path) 383 | elif file_choice == '4': 384 | print("\tResults will not be saved.") 385 | 386 | input("\n\n\n\tPress Enter to search again.") 387 | 388 | except KeyboardInterrupt: 389 | pass 390 | 391 | if __name__ == "__main__": 392 | main() 393 | --------------------------------------------------------------------------------