genpw.c

来自「一个可以执行Client端传来的Shell命令的服务器程序」· C语言 代码 · 共 26 行

C
26
字号
/*** * genpw.c *  - This program will generate encrypted password strings for *    use in adding passwords to executable programs. *    You must provide a two character salt and a password. *    to compile: cc -o genpw genpw.c * ***/#include <stdio.h>main(){ char *pwe; char pw[15]; char salt[3]; char input[80];    fprintf(stderr,"salt?: ");   gets(input);   strncpy(salt,input,2);   fprintf(stderr,"password?: ");   gets(input);   strncpy(pw,input,8);   pwe = (char *) crypt(pw,salt);   fprintf(stderr,"encrypted: \"%s\"\n",pwe);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?