inquisitor/inquisitor/bashrc

64 lines
2.8 KiB
Bash

# Custom bashrc for Inquisitor container
get_container_info() {
local container_name=$1
local ip_var=$2
local mac_var=$3
echo "Getting network info for $container_name..."
# Get MAC and IP address from Docker network
local ip=$(docker inspect $container_name --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}')
local mac=$(docker inspect $container_name --format '{{range .NetworkSettings.Networks}}{{.MacAddress}}{{end}}')
if [ -z "$ip" ] || [ -z "$mac" ]; then
echo "Error: Could not get network info for $container_name"
exit 1
fi
echo "$container_name: IP=$ip, MAC=$mac"
export $ip_var=$ip
export $mac_var=$mac
}
# Get network information from FTP containers
get_container_info "ftp-client" "TARGET_IP" "TARGET_MAC"
get_container_info "ftp-server" "GATEWAY_IP" "GATEWAY_MAC"
# Display banner
cat << 'EOF'
██╗███╗ ██╗ ██████╗ ██╗ ██╗██╗███████╗██╗████████╗ ██████╗ ██████╗
██║████╗ ██║██╔═══██╗██║ ██║██║██╔════╝██║╚══██╔══╝██╔═══██╗██╔══██╗
██║██╔██╗ ██║██║ ██║██║ ██║██║███████╗██║ ██║ ██║ ██║██████╔╝
██║██║╚██╗██║██║▄▄ ██║██║ ██║██║╚════██║██║ ██║ ██║ ██║██╔══██╗
██║██║ ╚████║╚██████╔╝╚██████╔╝██║███████║██║ ██║ ╚██████╔╝██║ ██║
╚═╝╚═╝ ╚═══╝ ╚══▀▀═╝ ╚═════╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝
ARP Spoofing & Network Analysis Tool
Version 1.0.0
========================================================================
Welcome to the Inquisitor container!
Environment Variables:
TARGET_IP: $TARGET_IP
TARGET_MAC: $TARGET_MAC
GATEWAY_IP: $GATEWAY_IP
GATEWAY_MAC: $GATEWAY_MAC
Quick Commands:
inquisitor - Start interactive ARP spoofing
EOF
# Activate virtual environment automatically
source /opt/venv/bin/activate
# Custom aliases
alias inquisitor='python3 /app/src/inquisitor.py $TARGET_IP $TARGET_MAC $GATEWAY_IP $GATEWAY_MAC'
alias inquisitor-verbose='python3 /app/src/inquisitor.py --verbose $TARGET_IP $TARGET_MAC $GATEWAY_IP $GATEWAY_MAC'
# Custom prompt
export PS1='\[\033[1;32m\][inquisitor@\h]\[\033[0m\] \[\033[1;34m\]\w\[\033[0m\] $ '