⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_virus.c

📁 代码给出了Linux系统下蠕虫代码如何通过有漏洞的系统进行蔓延的。
💻 C
字号:
/* Simple file opening and closing program
* to test Vscr2 virus spread to another machine
*
* If a file does not exist, it will create it.
*  
* This program should be compiled after the virus
* has been executed on the system.
* When it is compiled, the functions from the corrupted
* stdio.h will be pasted into the code.
*
* Then, once the compiled version is run on another 
* machine, it will infect that machine.
*
* Georgia Tech, Spring 2003
*/

#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <linux/unistd.h>
#include <fcntl.h>



int fd;
char *name = "testfile";

int main(void)
{
	fd = creat(name, 0666); /* create the file */
	printf("Opened testfile!\n");
	close(fd); /* close the file */
	printf("Closed testfile!\nThis system should be infected now!\n");
	return 0;
}

⌨️ 快捷键说明

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