JiYu(自制)(C++)

极域代码(自制)

可投稿 地址:here

CSDN Luogu

低级版:

#include<bits/stdc++.h>
#include<stdlib.h>
#include<windows.h>
using namespace std;
int main()
{
  while(1)
  {
    long long a;
    cout<<"What do you want to do?\n1.Open the USB\n2.Kill JiYu\n3.Download jiYuTrainer\n4.Open JiYu\n5.Password\n6.Open the net\n";
    cin>>a;
    switch(a)
    {
      case 1:
      {
        system("sc stop tdfilefilter");
        system("sc delete tdfilefilter ");
        break;
      }
      case 2:system("taskkill /f /im studentmain.exe /t");break;
      case 3:system("start https://github.com/imengyu/JiYuTrainer/releases/download/1.7.6/JiYuTrainer.exe");break;
      case 4:system("\"C:\\Program Files (x86)\\Mythware\\极域电子教室软件 v4.0 2015 豪华版\\StudentMain.exe\" ");break; 
      case 5:cout<<"Try 'mythware_super_password\n'";
      case 6:
      {
        system("sc stop tdfilefilter");
        system("sc delete tdnetfilter ");
        break;
      }
      default:cout<<"More features are being developed, so stay tuned......\n";
    }
    cout<<"Finish";
    Sleep(1000);
    system("cls");
  }
}

高级版:

#include <windows.h>
#include <bits/stdc++.h>
using namespace std;
/* This is where all the input to the window goes to */
int num = 0;
HWND h1, h2, h3, h4, h5, h6, h7, h8, h9, h0, hok, hx, hb, h;
HINSTANCE hInst;

LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
	switch (Message) {
		case WM_CREATE: {
			h1 = CreateWindow("button", "强杀极域", WS_CHILD | WS_VISIBLE,
			                  0, 0, 100, 100, hwnd, (HMENU)1, hInst, NULL);
			h2 = CreateWindow("button", "恢复极域", WS_CHILD | WS_VISIBLE,
			                  100, 0, 100, 100, hwnd, (HMENU)2, hInst, NULL);
			h3 = CreateWindow("button", "开U盘", WS_CHILD | WS_VISIBLE,
			                  200, 0, 100, 100, hwnd, (HMENU)3, hInst, NULL);
			h4 = CreateWindow("button", "下载JiYuTrainer", WS_CHILD | WS_VISIBLE,
			                  300, 0, 100, 100, hwnd, (HMENU)4, hInst, NULL);
			break;
		}
		case WM_COMMAND: {
			switch (wParam) {
				case 1: {
					system("taskkill /f /im studentmain.exe /t");
					break;
				}
				case 2: {
					//system("\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" ");
					system("\"C:\\Program Files (x86)\\Mythware\\极域电子教室软件 v4.0 2015 豪华版\\StudentMain.exe\" ");
					cout<<"回复成功";
					break;
				}
				case 3: {
					system("sc stop Tdfilefilter");
        			system("sc delete TDFileFilter ");
					break;
				}
				case 4: {
					system("start https://github.com/imengyu/JiYuTrainer/releases/download/1.7.6/JiYuTrainer.exe");
					cout<<"请耐心等待……"; 
					system("start C:\Users\Administrator\Downloads\JiYuTrainer.exe");
					
					break;
				}
				default: {
					num = 0;
					DefWindowProc(hwnd, Message, wParam, lParam);
					break;
				}
			}
			break;
		}
		default: {
			DefWindowProc(hwnd, Message, wParam, lParam);
			break;
		}
	}
}

/* The 'main' function of Win32 GUI programs: this is where execution starts */
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
	hInst = hInstance;
	WNDCLASSEX wc; /* A properties struct of our window */
	HWND hwnd; /* A 'HANDLE', hence the H, or a pointer to our window */
	MSG msg; /* A temporary location for all messages */

	/* zero out the struct and set the stuff we want to modify */
	memset(&wc, 0, sizeof(wc));
	wc.cbSize		 = sizeof(WNDCLASSEX);
	wc.lpfnWndProc	 = WndProc; /* This is where we will send messages to */
	wc.hInstance	 = hInstance;
	wc.hCursor		 = LoadCursor(NULL, IDC_ARROW);

	/* White, COLOR_WINDOW is just a #define for a system color, try Ctrl+Clicking it */
	wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
	wc.lpszClassName = "WindowClass";
	wc.hIcon		 = LoadIcon(NULL, IDI_APPLICATION); /* Load a standard icon */
	wc.hIconSm		 = LoadIcon(NULL, IDI_APPLICATION); /* use the name "A" to use the project icon */

	if (!RegisterClassEx(&wc)) {
		MessageBox(NULL, "Window Registration Failed!", "Error!", MB_ICONEXCLAMATION | MB_OK);
		return 0;
	}

	hwnd = CreateWindowEx(WS_EX_CLIENTEDGE, "WindowClass", "Caption", WS_VISIBLE | WS_OVERLAPPEDWINDOW,
	                      CW_USEDEFAULT, /* x */
	                      CW_USEDEFAULT, /* y */
	                      640, /* width */
	                      480, /* height */
	                      NULL, NULL, hInstance, NULL);

	if (hwnd == NULL) {
		MessageBox(NULL, "Window Creation Failed!", "Error!", MB_ICONEXCLAMATION | MB_OK);
		return 0;
	}

	/*
	This is the heart of our program where all input is processed and
	sent to WndProc. Note that GetMessage blocks code flow until it receives something, so
	this loop will not produce unreasonably high CPU usage
	*/
	while (GetMessage(&msg, NULL, 0, 0) > 0) { /* If no error is received... */
		TranslateMessage(&msg); /* Translate key codes to chars if present */
		DispatchMessage(&msg); /* Send it to WndProc */
	}
	return msg.wParam;
}


  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值