📄 bamboozle.c
字号:
/*+------------------------------------------------------------------------- bamboozle.c - ecu/ecuungetty protection scheme wht@n4hgf.Mt-Park.GA.US--------------------------------------------------------------------------*//*+:EDITS:*//*:09-10-1992-13:58-wht@n4hgf-ECU release 3.20 *//*:08-22-1992-15:38-wht@n4hgf-ECU release 3.20 BETA *//*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 *//*:01-09-1991-22:31-wht@n4hgf-ISC port *//*:01-09-1991-21:05-wht@n4hgf-no prototype for crypt if not __STDC__ *//*:08-14-1990-20:39-wht@n4hgf-ecu3.00-flush old edit history */#if __STDC__char *crypt(char *,char *);#elsechar *crypt();#endif/*+------------------------------------------------------------------------- bamboozle(pid) - build encrypted string based on 'pid'If crypt not used, do something pretty basic (probably enough)If you are paranoid, don't use _ANY_ of these algorithms exactly--------------------------------------------------------------------------*/char *bamboozle(pid)int pid;{#if defined(CRYPT)char pidstr[16];char *cptr; sprintf(pidstr,"z%08d",pid); pidstr[0] = 'G'; /* fool strings searchers */ cptr = crypt(pidstr,"ba"); return(cptr);#else /* probably enough */static char pidstr[16]; sprintf(pidstr,"b%09da",(int)(((long)pid * 4) / 5)); return(pidstr);#endif#ifdef VARIANT_1 /* very paranoid */char pidstr[16];char *cptr; sprintf(pidstr,"z%08d",pid); pidstr[0] = 0xFF; /* fool strings searchers */ cptr = crypt(pidstr,pidstr); return(cptr);#endif#ifdef VARIANT_2 /* not paranoid at all */char pidstr[16]; sprintf(pidstr,"z%08d",pid - 2);#endif#ifdef VARIANT_3 /* invite trouble :-) */ return("I_am_easy");#endif} /* end of bamboozle *//* vi: set tabstop=4 shiftwidth=4: *//* end of bamboozle.c */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -