Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions README_port_scanner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Port Scanner CLI

This is a simple, multi-threaded TCP port scanner written in Python. It is designed to find open ports on a target host.

## Features

* Scans a target host (IP address or hostname).
* Supports scanning a range of ports, a list of ports, or a single port.
* Uses multiple threads for faster scanning.
* Clear and simple output of open ports.

## Prerequisites

* Python 3.6+
* No external libraries are required.

## How to Run

1. **Navigate to the project directory.**
Ensure you have the `port_scanner_main.py` script and the `port_scanner` directory.

2. **Run the application from your terminal.**
Provide the target host and optionally a port range.

```bash
python port_scanner_main.py <target_host> [options]
```

### Command-Line Options

* `host`: (Required) The target host to scan (e.g., `127.0.0.1`, `example.com`).
* `-p, --ports`: (Optional) The port range to scan. Defaults to `1-1024`.
* Formats:
* Range: `1-65535`
* Comma-separated list: `80,443,8080`
* Single port: `22`
* `-t, --threads`: (Optional) The number of threads to use for scanning. Defaults to `20`.

### Example Usage

**Scan the default port range (1-1024) on localhost:**
```bash
python port_scanner_main.py 127.0.0.1
```

**Scan a specific range of ports on a remote host:**
```bash
python port_scanner_main.py example.com -p 1-200
```

**Scan specific ports:**
```bash
python port_scanner_main.py example.com --ports 22,80,443
```

**Increase the number of threads for a faster scan:**
```bash
python port_scanner_main.py scanme.nmap.org -t 50
```

**Example Output:**
```
Scanning host scanme.nmap.org for open ports...

--- Open Ports Found! ---
[+] Port 22 is open
[+] Port 80 is open
```

## Disclaimer

* **LEGALITY**: Unauthorized port scanning of networks is illegal in many countries. This tool is intended for educational purposes and for use on networks where you have explicit permission to conduct scanning. The user assumes all liability for any misuse of this tool.
* **ACCURACY**: The accuracy of the scan can be affected by firewalls, intrusion detection systems (IDS), and network latency. A port that is reported as closed may be filtered or blocked.
* **PERFORMANCE**: Scanning a large range of ports can take a significant amount of time, even with multiple threads.

## File Structure
```
.
├── port_scanner_main.py # Main CLI application script
├── port_scanner/
│ ├── __init__.py # Makes port_scanner a Python package
│ └── scanner.py # Core logic for port scanning
└── README_port_scanner.md # This documentation file
```
103 changes: 103 additions & 0 deletions README_pwned_checker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Account Pwned Checker CLI

This tool checks if an email account has been compromised in a known data breach by using the 'Have I Been Pwned?' (HIBP) API.

## Features

* Checks a single email address against the HIBP database.
* Lists the details of each breach found for the account.
* Provides clear output for both compromised and non-compromised accounts.

## Prerequisites

* Python 3.6+
* `requests` library
* A 'Have I Been Pwned?' API Key

## Installation & Setup

1. **Get an API Key:**
* You must have an API key to use the HIBP API. You can get one for free from the [HIBP API Key Page](https://haveibeenpwned.com/API/Key).
* Once you have your key, open the `pwned_checker/checker.py` file.
* Replace the placeholder `"YOUR_API_KEY_HERE"` with your actual API key:
```python
# In pwned_checker/checker.py
headers = {
"hibp-api-key": "YOUR_API_KEY_HERE" # <-- PASTE YOUR KEY HERE
}
```

2. **Navigate to the project directory.**
Make sure you have the `pwned_main.py` script and the `pwned_checker` directory.

3. **Create a virtual environment (recommended):**
```bash
python -m venv venv_pwned
source venv_pwned/bin/activate # On Windows: venv_pwned\Scripts\activate
```

4. **Install dependencies:**
Navigate to the `pwned_checker` directory and run:
```bash
pip install -r requirements.txt
```

## How to Run

1. Open your terminal or command prompt.
2. Make sure your virtual environment is activated.
3. Navigate to the root directory containing `pwned_main.py`.
4. Run the application with the email you want to check:
```bash
python pwned_main.py "[email protected]"
```

### Example Usage

**To check an email:**
```bash
python pwned_main.py "[email protected]"
```

**Example Output (If Breaches are Found):**
```
Checking account: [email protected]

--- Account Found in Breaches! ---
The account '[email protected]' was found in the following breaches:

- Breach: Adobe
Domain: adobe.com
Date: 2013-10-04
Description: In October 2013, 153 million Adobe accounts were breached...

- Breach: MyFitnessPal
Domain: myfitnesspal.com
Date: 2018-02-25
Description: In February 2018, the health and fitness service MyFitnessPal suffered a data breach...
```

**Example Output (If No Breaches are Found):**
```
Checking account: [email protected]

--- No Breaches Found ---
The account '[email protected]' was not found in any known breaches.
```

## Disclaimer

* This tool relies on the 'Have I Been Pwned?' service. Its accuracy is dependent on the data maintained by HIBP.
* A "not found" result does not guarantee an account is secure, only that it has not appeared in a breach known to HIBP.
* Handle your API key securely. Do not commit it to public repositories. The method of placing it directly in the source code is for simplicity; for more secure applications, use environment variables or a secrets management system.

## File Structure
```
.
├── pwned_main.py # Main CLI application script
├── pwned_checker/
│ ├── __init__.py # Makes pwned_checker a Python package
│ ├── checker.py # Logic for interacting with the HIBP API
│ └── requirements.txt # Python dependencies
└── README_pwned_checker.md # This documentation file
```
86 changes: 86 additions & 0 deletions README_sensitive_data_scanner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Sensitive Data Scanner CLI

This tool recursively scans a specified directory to find sensitive data patterns within files, such as API keys, private keys, and credit card numbers.

## Features

* Scans all files within a directory and its subdirectories.
* Uses a predefined set of regular expressions to identify potential sensitive information.
* Reports the file path and the type of sensitive data found.

## Patterns Detected

The scanner looks for the following patterns:
* AWS Access Key ID
* AWS Secret Access Key (Note: this pattern is broad and may cause false positives)
* Google API Key
* Generic API Key patterns
* RSA and SSH Private Keys (looks for the header)
* Credit Card Numbers (Visa, Mastercard, American Express, Discover)
* U.S. Social Security Numbers

## Prerequisites

* Python 3.6+
* No external libraries are required.

## How to Run

1. **Navigate to the project directory.**
Ensure you have the `scanner_main.py` script and the `sensitive_data_scanner` directory.

2. **Run the application from your terminal.**
Provide the path to the directory you want to scan as a command-line argument.

```bash
python scanner_main.py /path/to/your/directory
```

### Example Usage

**To scan a directory named `my_project`:**
```bash
python scanner_main.py ./my_project
```

**Example Output:**
```
Scanning directory: ./my_project

--- Sensitive Data Found! ---

[+] File: ./my_project/config/prod.env
- Found 1 instance(s) of 'AWS Access Key ID'
Example: AKIAIOSFODNN7EXAMPLE
- Found 1 instance(s) of 'AWS Secret Access Key'
Example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

[+] File: ./my_project/src/dev/test_keys.txt
- Found 1 instance(s) of 'RSA Private Key'
Example: -----BEGIN RSA PRIVATE KEY-----
```

**If no data is found:**
```
Scanning directory: ./clean_project

--- No Sensitive Data Found ---
Scan complete. No files with matching sensitive data patterns were found.
```

## Disclaimer

* **This tool is not foolproof.** It uses regular expressions to find patterns, which can result in both **false positives** (flagging data that is not sensitive) and **false negatives** (missing sensitive data that doesn't match a pattern).
* The results should be manually reviewed to confirm if the flagged data is truly sensitive.
* This tool is intended for educational and basic scanning purposes. For enterprise-grade data loss prevention (DLP), consider using more advanced, dedicated security solutions.
* The tool reads all files as text. It may not be effective on binary files and will ignore files it cannot read due to permissions or encoding issues.

## File Structure
```
.
├── scanner_main.py # Main CLI application script
├── sensitive_data_scanner/
│ ├── __init__.py # Makes sensitive_data_scanner a Python package
│ └── scanner.py # Core logic for file scanning and regex matching
└── README_sensitive_data_scanner.md # This documentation file
```
92 changes: 60 additions & 32 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,35 +1,63 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using @vitejs/plugin-react"
/>
<link rel="apple-touch-icon" href="/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json" />
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
<script type="module" src="/src/index.jsx"></script>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cybersecurity Tools Collection</title>
<style>
body { font-family: sans-serif; line-height: 1.6; margin: 2em; }
h1 { text-align: center; }
ul { list-style: none; padding: 0; }
li { background: #f4f4f4; border: 1px solid #ddd; margin-bottom: 1em; padding: 1em; }
h2 { margin-top: 0; }
a { text-decoration: none; color: #0366d6; }
a:hover { text-decoration: underline; }
</style>
</head>
<body>
<h1>Cybersecurity Tools Collection</h1>
<p>This repository contains a collection of various security-related tools. Click on a tool's documentation to learn more about its functionality and how to use it.</p>
<ul>
<li>
<h2>Account Pwned Checker</h2>
<p>A command-line tool to check if an email account has been compromised in a known data breach using the 'Have I Been Pwned?' API.</p>
<a href="README_pwned_checker.md">View Documentation</a>
</li>
<li>
<h2>Sensitive Data Scanner</h2>
<p>A tool to recursively scan a directory for files containing sensitive data patterns like API keys, private keys, and credit card numbers.</p>
<a href="README_sensitive_data_scanner.md">View Documentation</a>
</li>
<li>
<h2>Port Scanner</h2>
<p>A simple, multi-threaded TCP port scanner to find open ports on a target host.</p>
<a href="README_port_scanner.md">View Documentation</a>
</li>
<li>
<h2>IoT Simulator</h2>
<p>A simulator for IoT devices.</p>
<a href="README_iot_simulator.md">View Documentation</a>
</li>
<li>
<h2>Network Mapper</h2>
<p>A tool to generate network topology diagrams from a CSV file.</p>
<a href="README_netmap.md">View Documentation</a>
</li>
<li>
<h2>Scam Detector</h2>
<p>A tool to detect scams in social media.</p>
<a href="README_scam_detector.md">View Documentation</a>
</li>
<li>
<h2>Simple Browser</h2>
<p>A simple web browser.</p>
<a href="README_simple_browser.md">View Documentation</a>
</li>
<li>
<h2>Wi-Fi Analyzer</h2>
<p>A tool to analyze Wi-Fi networks on Linux systems.</p>
<a href="README_wifi_analyzer.md">View Documentation</a>
</li>
</ul>
</body>
</html>
Empty file added port_scanner/__init__.py
Empty file.
Loading
Loading