Networking Basics for Ethical Hackers (Beginner to Pro Guide)

Image
  Networking Basics for Ethical Hackers (Beginner to Pro Guide) Introduction: Why Networking Matters in Ethical Hacking Before you become a skilled ethical hacker, you need to understand one thing very clearly: Hacking = Understanding Networks Every attack, every defense, every tool — all work on networks. If you don’t understand how computers talk to each other, you’ll always feel confused using tools like Nmap, Wireshark, or Metasploit. So in this guide, I’ll teach you networking from zero to a strong foundation in the simplest way possible — like a story. Chapter 1: What is a Network? Imagine this: You and your friends are in a classroom passing notes. You = Computer Friend = Another Computer Notes = Data Passing system = Network Network = A group of computers connected to share data Types of Networks: LAN (Local Area Network) → Small (home, school, lab) WAN (Wide Area Network) → Large (Internet) Chapter 2: How Data Travels (The Hidden Journey) When you send a message on WhatsAp...

How to Fix “ModuleNotFoundError: No module named ‘pdfkit’” in Mr. Holmes (Kali Linux)

How to Fix “ModuleNotFoundError: No module named ‘pdfkit’” in Mr. Holmes (Kali Linux)





Introduction

Mr. Holmes is a popular OSINT (Open-Source Intelligence) tool used in ethical hacking and cybersecurity learning.
However, many beginners face an error while running the tool on Kali Linux:

ModuleNotFoundError: No module named 'pdfkit'

This error can be confusing, especially for new users.
In this article, you will learn why this error occurs and how to fix it step by step in a clean and safe way.


Error Description

When trying to run Mr. Holmes using the command:

sudo python3 MrHolmes.py

You may see the following traceback ending with:

ModuleNotFoundError: No module named 'pdfkit'

Some users also try to activate a virtual environment and get:

source .lib_venv/bin/activate
source: no such file or directory

Why This Error Happens

This issue usually occurs due to one or more of the following reasons:

1. Virtual Environment Was Not Created

You attempted to activate a virtual environment that does not exist.

2. Python Dependencies Were Not Installed

The pdfkit module and other required packages were not installed from requirements.txt.

3. Missing System Dependency

The pdfkit library requires an external system package called wkhtmltopdf, which is not installed by default.


Step-by-Step Solution (Recommended Method)

Follow these steps in the same order to avoid further errors.


Step 1: Go to the Mr. Holmes Directory

cd ~/Downloads/Mr.Holmes

Step 2: Create a Virtual Environment

python3 -m venv venv

This creates an isolated Python environment for the tool.


Step 3: Activate the Virtual Environment

source venv/bin/activate

Once activated, your terminal will look like this:

(venv) user@kali:~/Downloads/Mr.Holmes$

Step 4: Install Required Python Packages

pip install -r requirements.txt

This command installs all necessary Python modules, including pdfkit.


Step 5: Install the Required System Package

sudo apt install wkhtmltopdf

This step is mandatory because pdfkit depends on it.


Step 6: Run Mr. Holmes (Without sudo)

python3 MrHolmes.py

If everything is installed correctly, the tool should start without errors.


Common Mistakes to Avoid

❌ Running the tool with sudo
❌ Skipping the virtual environment
❌ Ignoring requirements.txt
❌ Forgetting to install wkhtmltopdf

✔ Always run Python tools as a normal user
✔ Use virtual environments for stability


Best Practice Tip

Using a virtual environment prevents:

  • Dependency conflicts

  • System Python breakage

  • Permission-related errors

This is considered a best practice in both cybersecurity and software development.


Conclusion

The error:

ModuleNotFoundError: No module named 'pdfkit'

is not a bug in Mr. Holmes itself.
It simply means the required dependencies are missing.

By:

  • Creating a virtual environment

  • Installing Python requirements

  • Installing wkhtmltopdf

you can easily fix the issue and run Mr. Holmes smoothly on Kali Linux.


Legal Disclaimer

Mr. Holmes should only be used for educational and ethical purposes.
Always ensure you have proper authorization before performing any reconnaissance or data collection activities.


Author

RedMark
Ethical Hacking | OSINT | Kali Linux



Comments

Popular posts from this blog

Hacking Tools for Penetration Testing – Fsociety in Kali Linux

Fluxion – The Future of MITM WPA Security Research

Login System in Python Source Code