C++病毒(小心 小心 小心)

1..蓝屏警告小心点

#include <windows.h>
#include <iostream>
using namespace std;
void full_screen()
{
  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 HideTheCursor()
{
  CONSOLE_CURSOR_INFO cciCursor;
  HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
  if (GetConsoleCursorInfo(hStdOut, &cciCursor))
  {
    cciCursor.bVisible = FALSE;
    SetConsoleCursorInfo(hStdOut, &cciCursor);
  }
}
int main()
{
  system("mode 96,28");
  HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
  DWORD mode;
  GetConsoleMode(hStdin, &mode);
  mode &= ~ENABLE_QUICK_EDIT_MODE;
  SetConsoleMode(hStdin, mode);
  HideTheCursor();
  
  system("color 1f");
  RECT rect;
  HWND hwnd = GetForegroundWindow();
  GetWindowRect(hwnd, &rect);
  MoveWindow(hwnd, -30, -7, 8600, 1080, TRUE);
  full_screen(); 
  cout << "A problem has been detected and windows has been shut\
down to prevent damage\n\
to your computer.\n\n\
DRIVER_IROL_NOT_LESS_OR_EQUAL\n\n\
If this is the first time you've seen this Stop error screen, \n\
restart your computer.If this screen appears again, follow \n\
these steps:\n\n\
Check to make sure any new hardware or software is prwe56ewrrwqqwerqoperly installed.\n\
If this is a new ieqwerqwerwnstarwerwqtewqw3rewrllation, ask your hardware or software manufacturer\n\
for any windows updates you might need.\n\n\
If problems continue. disable or remove any newly installetretwd hardware\n\
or software.qqwrqerwfsdf Disable BIOS ewerwrwerrqememory wee65ewqoption such as caching or shadowing.\n\
If you need to nsu Safe Mode to refdgmove or disable componentsrryuytr, restart\n\
your computer, press Fafsdfsad8 to select Advanced Startuprywrt Options, and then\n\
select Safe Mode.\n\n\
Technical information:\n\
\"\"\"STOP:0x000ff  00050(0xFD3094c2,0x000fyhvgvkk jnfds 00001,0xFBFE7617,0x0000}\n\n\
\"\"\"SPCMDON.SYS - Address FBFE7617 base at FBFE5000, DateStamp 3d6dd67c\n"
     << endl;
  while (1)
  {
    HideTheCursor();
    Sleep(1000);
  }
  return 0;
}

2.鼠标乱动

#include<windows.h>
#include<stdio.h>
#include<time.h>
#include<conio.h>
int main()
{
    system("title ");
    int x,y;
    printf("按任意键暂停!");
    while(!_kbhit())
    {
        x=rand()%332+300;
        y=rand()%228+300;
        SetCursorPos(x,y);
    }
    return 0 ;
}
 

(无法截屏)

3.14588

#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main() {
    system("color f0");
    int jh;
    int mm;
    int mmm;
    int bf=0;
    jh=3;
    while(MessageBox(NULL,"你的电脑已经成功被朗哥病毒侵占,是否服从朗哥接下来的要求?","hahaha",MB_YESNO)==7) {
        MessageBox(NULL,"你没有按'是',再来一遍","不按'是'你试试(偷偷告诉你,密码是14588)",MB_OK);
    }
    MessageBox(NULL,"输入密码以进行下一步,有3次机会","",MB_OK);
    cout<<"输入密码:";
    cin>>mmm;
    while(mmm!=14588) {
        if(jh==1) {
            MessageBox(NULL,"你没有机会了,正在安装病毒驱动","hahaha",MB_OK);
            system("color 2d");
            for(int i=1; i<=100; i++) {
                bf=bf+1;
                cout<<bf<<"%"<<"已安装";
                Sleep(100);
                system("cls");
            }
            cout<<"安装完毕";
            Sleep(500);
            cout<<"      C盘所有文件名已改为'朗哥'";
            system("color f0");
            Sleep(2000);
            return 0;
        }
        jh=jh-1;
        system("color f4");
        MessageBox(NULL,"密码错误!","",MB_OK);
        system("color f4");
        cout<<"还有"<<jh<<"次机会"<<endl;
        if(jh==1) {
            cout<<"小提示:开头的选项里有答案哦"<<endl;
        }
        Sleep(2000);
        system("color f0");
        system("cls");
        cout<<"输入密码:";
        cin>>mmm;
        cout<<endl;
    }
 
    system("color f2");
    cout<<"密码正确!"<<endl;
    MessageBox(NULL,"下一步,灵魂拷问","hohoho",MB_OK);
    system("cls");
    while(MessageBox(NULL,"朗哥帅吗","",MB_YESNO)==7) {
        MessageBox(NULL,"选错了,重选","WRONG",MB_OK);
    }
    MessageBox(NULL,"虽然你选对了,但我还是要给你安装病毒驱动","hahaha",MB_OK);
    system("color 2d");
    for(int i=1; i<=100; i++) {
        bf=bf+1;
        cout<<bf<<"%"<<"已安装";
        Sleep(100);
        system("cls");
    }
    cout<<"安装完毕";
    Sleep(500);
    cout<<"      C盘所有文件名已改为'朗哥'";
    system("color f0");
    Sleep(2000);
    return 0;
}

(无法截屏)

  • 27
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
数据结构C++病毒检测的实现可以参考以下步骤: 1. 创建一个保存待测任务的文本文件,文件格式和内容如下: ``` num task1 task2 ... task_num ``` 其中,num表示待检测的任务数量,task1到task_num表示具体的任务。 2. 读取文本文件中的任务数量和任务内容,并将其存储在合适的数据结构中,例如数组或链表。 3. 对于每个任务,进行病毒检测的操作。可以使用字符串匹配算法,如KMP算法,来判断任务中的DNA序列是否包含病毒的DNA序列。 4. 如果任务中的DNA序列包含病毒的DNA序列,则输出"感染";否则,输出"未感染"。 以下是一个示例代码,演示了如何实现数据结构C++病毒检测: ```cpp #include <iostream> #include <fstream> #include <string> using namespace std; bool isInfected(string dnaSequence, string virusSequence) { int n = dnaSequence.length(); int m = virusSequence.length(); for (int i = 0; i < n; i++) { bool match = true; for (int j = 0; j < m; j++) { if (dnaSequence[(i + j) % n] != virusSequence[j]) { match = false; break; } } if (match) { return true; } } return false; } int main() { ifstream inputFile("tasks.txt"); if (!inputFile) { cout << "Failed to open file." << endl; return 0; } int num; inputFile >> num; for (int i = 0; i < num; i++) { string task; inputFile >> task; if (isInfected(task, "baa")) { cout << "感染" << endl; } else { cout << "未感染" << endl; } } inputFile.close(); return 0; } ```

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值