Enhance Makefile and entrypoint script for interactive shell; improve FTP packet logging

This commit is contained in:
whaffman 2025-07-11 12:58:44 +02:00
parent 2ea35d73fd
commit 475a2caa1c
3 changed files with 14 additions and 3 deletions

View File

@ -10,6 +10,7 @@ up:
@echo "Building and starting $(NAME) project..." @echo "Building and starting $(NAME) project..."
docker-compose -f $(COMPOSE_FILE) up --build -d docker-compose -f $(COMPOSE_FILE) up --build -d
@echo "Project started successfully!" @echo "Project started successfully!"
docker exec -it inquisitor /bin/bash
# Stop containers and remove images # Stop containers and remove images
down: down:

View File

@ -43,6 +43,15 @@ source /opt/venv/bin/activate
echo "Starting ARP spoofing attack..." echo "Starting ARP spoofing attack..."
# Run Python with unbuffered output and force line buffering # Run Python with unbuffered output and force line buffering
PYTHONUNBUFFERED=1 python3 -u /app/src/inquisitor.py $TARGET_IP $TARGET_MAC $GATEWAY_IP $GATEWAY_MAC # PYTHONUNBUFFERED=1 python3 -u /app/src/inquisitor.py $TARGET_IP $TARGET_MAC $GATEWAY_IP $GATEWAY_MAC
echo "Python script exited with code: $?" # echo "Python script exited with code: $?"
echo "Starting interactive shell..."
echo "You can now run:"
echo " python3 /app/src/inquisitor.py $TARGET_IP $TARGET_MAC $GATEWAY_IP $GATEWAY_MAC"
echo " Or use Python interactively with: python3 -i /app/src/inquisitor.py"
echo ""
# Start an interactive bash shell
exec /bin/bash

View File

@ -44,12 +44,13 @@ def ftp_packet_callback(packet):
if b"RETR" in bytes(packet['TCP'].payload): if b"RETR" in bytes(packet['TCP'].payload):
# Extract filename from FTP RETR command # Extract filename from FTP RETR command
payload = bytes(packet['TCP'].payload).decode(errors='ignore') payload = bytes(packet['TCP'].payload).decode(errors='ignore')
print(f"the FTP payload: {payload}")
parts = payload.split() parts = payload.split()
if "RETR" in parts: if "RETR" in parts:
idx = parts.index("RETR") idx = parts.index("RETR")
if idx + 1 < len(parts): if idx + 1 < len(parts):
filename = parts[idx + 1] filename = parts[idx + 1]
print(f"FTP file download detected: {filename}") print(f"\033[92mFTP file download detected: {filename}\033[0m")
def start_sniffing(interface=conf.iface): def start_sniffing(interface=conf.iface):
""" """