-
1 计算机病毒机理
-
2 延伸学习
-
3 扩展阅读
-
4 扩展阅读
1、无限弹窗病毒:通常是弹出广告
Python:
---------------------------------
import os
for i in range(10):
os.system('start')
---------------------------------
C语言:
---------------------------------
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i;
for(i=0;i<10;i++)
system("start");
return 0;
}
----------------------------------
2、冲击波病毒:
https://baike.baidu.com/item/%E5%86%B2%E5%87%BB%E6%B3%A2%E7%97%85%E6%AF%92/0
Python:
-----------------------------------
import os
os.system('shutdown -s -t 60')
-----------------------------------
C语言:
----------------------------------------------------------------------------------
#include <stdio.h>
#include <windows.h>
int main()
{
system("shutdown -s -t 60"); // 冲击波病毒
return 0;
}
----------------------------------------------------------------------------------
shutdown -a 取消关机
shutdown -s 关机
shutdown -f 强行关闭应用程序
shutdown -m \\计算机名 控制远程计算机
shutdown -i 显示“远程关机”图形用户界面,但必须是Shutdown的第一个参数
shutdown -l 注销当前用户
shutdown -r 关机并重启
shutdown -s -t 时间 设置关机倒计时
shutdown -h 休眠
3、U盘病毒:
https://baike.baidu.com/item/U%E7%9B%98%E7%97%85%E6%AF%92?fromModule=lemma_search-box
Python:
-----------------------------------------------------
import os
# import win32api
# import win32con
# win32api.SetFileAttributes(r'c:\lvcheng\a.txt', win32con.FILE_ATTRIBUTE_HIDDEN)
os.system(r'attrib c:\lvcheng\a.txt +h')
-----------------------------------------------------
C语言:
--------------------------------------------------------------------------
#include <stdlib.h>
//#include <windows.h>
int main()
{
system("attrib a.txt -h");
//SetFileAttributes("a.txt", FILE_ATTRIBUTE_HIDDEN);
return 0;
}
-------------------------------------------------------------------------
4、木马病毒:https://baike.baidu.com/item/%E6%9C%A8%E9%A9%AC%E7%97%85%E6%AF%92?fromModule=lemma_search-box
C语言:
---------------------------------------------------
#include <stdio.h>
#include <malloc.h>
int main()
{
int *i;
while(1)
{
i = (int *) malloc(10);
}
return 0;
}
---------------------------------------------------



