Add custom bashrc for Inquisitor container with network info functions and environment setup
This commit is contained in:
parent
dec71886f7
commit
38902a98e1
67
inquisitor/bashrc
Normal file
67
inquisitor/bashrc
Normal file
@ -0,0 +1,67 @@
|
||||
# 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
|
||||
sniff-ftp - Start FTP packet sniffing
|
||||
restore-arp - Restore ARP tables
|
||||
help - Show all available commands
|
||||
|
||||
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'
|
||||
|
||||
# Custom prompt
|
||||
export PS1='\[\033[1;32m\][inquisitor@\h]\[\033[0m\] \[\033[1;34m\]\w\[\033[0m\] $ '
|
||||
Loading…
Reference in New Issue
Block a user