Skip to content

Commit

Permalink
fix: HTTP payload for report
Browse files Browse the repository at this point in the history
  • Loading branch information
zeefxd committed Dec 4, 2024
1 parent 4a188c0 commit 5230467
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 1 addition & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ARP Spoofer Documentation
# ARP Spoofer

Welcome to the ARP Spoofer documentation. This tool provides advanced network packet analysis and ARP spoofing capabilities.

Expand All @@ -12,5 +12,4 @@ ARP Spoofer is a Python-based tool that enables:

## Quick Links
- [Installation Guide](installation.md)
- [Usage Guide](usage.md)
- [API Reference](api.md)
7 changes: 5 additions & 2 deletions src/spoofer/arp_spoofer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from src.core.exceptions import NetworkException
from src.models.models import PacketInfo, Device
from src.utils.validators import validate_ip
from jinja2 import Environment, FileSystemLoader
from jinja2 import Environment, FileSystemLoader, select_autoescape

warnings.filterwarnings("ignore")

Expand Down Expand Up @@ -175,7 +175,10 @@ def save_captured_data(self, format: str = "txt"):
})

elif format == "html":
env = Environment(loader=FileSystemLoader('src/utils'))
env = Environment(
loader=FileSystemLoader('src/utils'),
autoescape=select_autoescape(['html', 'xml'])
)
template = env.get_template('report_template.html')

# Enhance packet data with hostname resolution
Expand Down
2 changes: 1 addition & 1 deletion src/utils/report_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ <h1>ARP Spoofing Session Report</h1>
<p><strong>Gateway IP:</strong> {{ gateway_ip }}</p>
<p><strong>Patterns:</strong> {{ patterns }}</p>

<h2>Captured Packets (Total: {{ total_packets }})</h2>
<h2>Captured Packets (Total: {{ total_packets | e }})</h2>
<table>
<tr>
<th>Time</th>
Expand Down

0 comments on commit 5230467

Please sign in to comment.