command windows V-bata0.5 EN
作者是个初中生勿喷QWQ
这是一个小小的机房指令
添加:
- 编译环境:DEV-C++
- 工具(Tools)->编译选项->代码生成/优化->代码生成:->语言标准(-std)->选"GNU C++11"(否则报错)
- 工具(Tools)->编译选项->编译器->编译时添加以下命令->加上"-lws2_32"(否则报错)
添加副包:
- jpk副包
- kjy副包
- 添加代码与主包放入同一文件夹(极域文件夹)编译运行
| 指令 | 功能 |
|---|---|
| sd | 关机 |
| wf | 网络信息 |
| _kjy | 反极域 |
| nt | 笔记 |
| game | 游戏 |
| ca | 计算机 |
| wz | 便捷网站 |
| sy | 电脑信息 |
| cmd | cmd指令 |
| pub | 人民万岁!!! |
主包代码:
#include<bits/stdc++.h>
#include<ws2tcpip.h>
#include<windows.h>
#include<random>
#include<tchar.h>
#include<thread>
#include<conio.h>
#pragma comment(lib,"ws2_32.lib")
#define ll long long
#pragma comment(lib, "wininet.lib")
#pragma comment(lib, "user32.lib")
#define L_F -1778384896
#define L_W -1764818944
HWND h=NULL;
using namespace std;
bool run=true;
int type=0;
const int N=1e3+5;
typedef struct tagHOOKINFO{
HHOOK h;HOOKPROC p;DWORD d;
}HOOKINFO;
BOOL i(TCHAR*n){
return _tcsstr(n,TEXT("屏幕广播"))||_tcsstr(n,TEXT("BlackScreen Window"))||_tcsstr(n,TEXT("共享屏幕"));
}
void s(BOOL b,HWND w){
if(!w)return;
if(b){
SendMessage(w,WM_SYSCOMMAND,SC_RESTORE,0);
SetWindowLong(w,GWL_STYLE,L_F);
}else SetWindowLong(w,GWL_STYLE,L_W);
}
BOOL CALLBACK e(HWND w,LPARAM l){
TCHAR t[MAX_PATH]={0};
GetWindowText(w,t,MAX_PATH);
if(i(t)){h=w;s((BOOL)l,w);return 0;}
return 1;
}
void a(BOOL b){
TCHAR t[MAX_PATH]={0};
GetWindowText(h,t,MAX_PATH);
if(!h||!i(t))EnumWindows(e,b);
s(b,h);
}
bool rEx(const string& p){
STARTUPINFOW si={0};
si.cb=sizeof(STARTUPINFOW);
si.dwFlags=STARTF_USESHOWWINDOW;
si.wShowWindow=SW_HIDE;
PROCESS_INFORMATION pi={0};
wstring wp(p.begin(),p.end());
BOOL s=CreateProcessW(wp.c_str(),NULL,NULL,NULL,FALSE,CREATE_NO_WINDOW,NULL,NULL,&si,&pi);
if(s){
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
return true;
}else{
cout<<"Err:"<<GetLastError()<<endl;
return false;
}
}
bool ck(int key){return GetAsyncKeyState(key)&0x8000;}
void mcl(int button){
if (button==0){
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
}else if(button==1){
mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0);
}
}
bool crun;
vector<SOCKET> clist;
string nm;
void sall(const char* d){
for(auto c:clist)send(c,d,strlen(d),0);
}
void rcvTh(SOCKET c){
char buf[512];
while(crun){
int l=recv(c,buf,511,0);
if(l<=0)break;
buf[l]=0;
cout<<buf;
sall(buf);
}
}
void chat(){
system("cls");
WSADATA wsa;WSAStartup(MAKEWORD(2,2),&wsa);
crun=1;clist.clear();
int t;cout<<"1.Server 2.Client:";cin>>t;cin.ignore();
cout<<"Name:";getline(cin,nm);
system("cls");
if(t==1){
SOCKET s=socket(AF_INET,SOCK_STREAM,0);
sockaddr_in a;a.sin_family=AF_INET;a.sin_port=htons(9999);a.sin_addr.s_addr=INADDR_ANY;
bind(s,(sockaddr*)&a,sizeof(a));listen(s,10);
cout<<"Server Started\n";
cout<<"push q to out"<<endl;
thread([&](){
string m;
while(crun){
if(!getline(cin,m))break;
if(m=="q"){crun=0;break;}
string sm='['+nm+"]: "+m+"\n";
sall(sm.c_str());cout<<sm;
}
}).detach();
while(crun){
fd_set fFD;FD_ZERO(&fFD);FD_SET(s,&fFD);
timeval tv{0,50000};
if(select(0,&fFD,0,0,&tv)<=0)continue;
SOCKET c=accept(s,0,0);
clist.push_back(c);
thread(rcvTh,c).detach();
}
closesocket(s);
}else{
SOCKET c=socket(AF_INET,SOCK_STREAM,0);
sockaddr_in a;a.sin_family=AF_INET;a.sin_port=htons(9999);
char ip[20];cout<<"Server IP:";cin>>ip;
a.sin_addr.s_addr=inet_addr(ip);connect(c,(sockaddr*)&a,sizeof(a));
cout<<"push q to out"<<endl;
thread([=](){
char buf[512];
while(crun){
int l=recv(c,buf,511,0);
if(l<=0)break;buf[l]=0;cout<<buf;
}
}).detach();
string m;
while(getline(cin,m)){
if(m=="q"){crun=0;break;}
string sm='['+nm+"]: "+m+"\n";
send(c,sm.c_str(),sm.size(),0);
}
closesocket(c);
}
WSACleanup();
system("cls");
}
void pub_ch(){
#ifdef _WIN32
SetConsoleOutputCP(CP_UTF8);
SetConsoleCP(CP_UTF8);
#endif
rEx("D://command//end_mu.wav");
system("cls");
system("color EC");
ifstream infile("end.txt");
string line;
while(getline(infile,line)){cout<<line<<endl;Sleep(200);}
Sleep(10000);
infile.close();
system("cls");
return;
}
void start(){
cout<<"The auto-clicker will start in 5 seconds, please position your mouse where you want to click."<<endl;
for(int i=5;i>=1;i--) {
Sleep(1000);
cout<<i<<" ";
}
cout<<endl;
system("cls");
}
void ldq(){
system("cls");
bool run=1,ax=0,sw=0;
start();
while(true){
if(ck('C')||ck('c')){
cout<<"Paused for 10 seconds"<<endl;
run=false;
Sleep(10000);
run=true;
cout<<"Resumed operation"<<endl;
}else if(ck('V')||ck('v')){
type=1-type;
cout<<(type==0?"Switched to left-click":"Switched to right-click")<<endl;
Sleep(100);
}else if(ck('B')||ck('b')){
sw=!sw;
ax=false;
cout<<(sw?"Slow mode enabled (625ms)":"Slow mode disabled")<<endl;
}else if(ck('N')||ck('n')){
ax=!ax;
sw=false;
cout<<(ax?"Super slow mode enabled (1600ms)":"Super slow mode disabled")<<endl;
}else if(ck('M')||ck('m')){
cout<<"Program paused, press any key to continue..."<<endl;
return;
} else if (ck('K')||ck('k')){
while(true){
type=1-type;
Sleep(50);
mcl(type);
if (ck('L') || ck('l')) {
cout <<"Exited rapid click mode" << endl;
break;
}
}
}
if (run) {
mcl(type);
if (sw)Sleep(625);
else if (ax)Sleep(1600);
else Sleep(50);
}
}
system("cls");
}
void nt() {
system("cls");
string n;
ofstream f("note.txt");
while(1) {
system("cls");
cout << "input your note(input out to out): ";
getline(cin, n);
if(n == "out"){system("cls");break;}
f << n << endl;
}
f.close();
system("cls");
}
void wf() {
int c;
string n;
while(true) {
system("cls");
cout << "=== WiFi Password Manager ===" << endl;
cout << "1. List saved networks\n2. Show password\n3. Export profiles\n4. Exit\nChoice:";
if(!(cin >> c)) {
cin.clear();
cin.ignore(1024, '\n');
cout << "Invalid input! Please enter 1-4";
Sleep(1000);
continue;
}
if(c == 1) {
system("netsh wlan show profiles");
cout << "\nPress any key to continue...";
cin.ignore();
cin.get();
}
else if(c == 2) {
cout << "Network name: ";
cin >> n;
string cmd = "netsh wlan show profile name=\"" + n + "\" key=clear";
int r = system(cmd.c_str());
if(r != 0)cout << "Error: Requires administrator privileges";
Sleep(3000);
}
else if(c == 3) {
system("netsh wlan export profile key=clear folder=.");
ofstream log("export_log.txt");
log << "WiFi profiles exported as XML files";
log.close();
cout << "Profiles exported to current directory";
Sleep(2000);
}
else if(c == 4) {
system("cls");
break;
}
else {
cout << "Invalid choice!";
Sleep(1000);
}
}
system("cls");
}
void sy() {
system("cls");
SYSTEM_INFO sysInfo;
GetSystemInfo(&sysInfo);
cout << "System Information:\n";
cout << "Processor Architecture: " << sysInfo.wProcessorArchitecture << endl;
cout << "Number of Processors: " << sysInfo.dwNumberOfProcessors << endl;
MEMORYSTATUSEX memInfo;
memInfo.dwLength = sizeof(memInfo);
GlobalMemoryStatusEx(&memInfo);
cout << "Total Physical Memory: " << memInfo.ullTotalPhys/1024/1024 << "MB\n";
cout << "Available Physical Memory: " << memInfo.ullAvailPhys/1024/1024 << "MB\n";
Sleep(5000);
system("cls");
}
void wz(){
system("start https://xinyoudui.com");
system("start https://luogu.com.cn");
system("start https://doubao.com");
system("cls");
}
void cmd(){
system("cls");
while(1){
cout<<"cmd command"<<endl;
cout<<"input:";
string a;
cin>>a;
if(a=="out")break;
system(a.c_str());
system("cls");
}
system("cls");
}
void ca(){
system("cls");
while(1){
system("cls");
double num1, num2;
char op;
cout << "Calculator (format: number1 operator number2)\n";
cout << "Operators: + - * / % # ^\n";
cout << "Please enter: ";
if(!(cin >> num1 >> op >> num2)){
cout << "Error: Incorrect input format";
cin.clear();
cin.ignore(numeric_limits<streamsize>::max(), '\n');
Sleep(500);
continue;
}
if(op == '+'){
cout << "Result: " << num1 + num2;Sleep(500);
}else if(op == '-'){
cout << "Result: " << num1 - num2;Sleep(500);
}else if(op == '*'){
cout << "Result: " << num1 * num2;Sleep(500);
}else if(op == '/'){
if(num2 != 0)cout << "Result: " << num1 / num2;
else cout << "Error: Cannot divide by zero";
Sleep(500);
}else if(op == '%'){
if(num2 != 0)cout << "Result: " << (int)num1 % (int)num2;
else cout << "Error: Cannot divide by zero";
Sleep(500);
}else if(op=='#'){
break;
}else if(op=='^'){
cout<<"Result: "<<(long long)pow(num1,num2);
Sleep(5000);
}else{
cout << "Error: Invalid operator";
Sleep(500);
break;
}
}
system("cls");
}
void _kjy(){
system("cls");
string p="D:\\command\\kjy.exe",p1="D:\\command\\jpk.exe";
int t=0;
char c1,c2;
while(1){
cout<<"-->jiyukiller<--"<<endl;
cout<<"1. {Automatic} "<<endl;
cout<<"2. {Manual} "<<endl;
cout<<"3.{Timing Kill}"<<endl;
cout<<"4. {Out} "<<endl;
cout<<"mode:";
cin>>c1;
if(c1=='1'){
if(rEx(p))cout<<"OK!"<<endl;
else cout<<"Fail!"<<endl;
}else if(c1=='2'){
system("taskkill /t /f /im jpk.exe");
system("taskkill /t /f /im kjy.exe");
system("cls");
while(1){
cout<<"c=kill proc\nv=start proc\nb=minisize window\no=back"<<endl;
cout<<"choice:";
c2=getch();
if(c2=='c'){
system("taskkill /t /f /im StudentMain.exe");
system("taskkill /t /f /im StudentMain");
system("taskkill /t /f /im mcs");
system("taskkill /t /f /im MCService_x64");
system("taskkill /t /f /im Teacher_2.7.13058.exe");
system("cls");
}else if(c2=='b'){
a(0);
if(rEx(p1))cout<<"OK!"<<endl;
}else if(c2=='v'){
system("start StudentMain.exe");
Sleep(1000);
mcl(0);
}else if(c2=='o'){
system("taskkill /t /f /im jpk.exe");
break;
}else{
cout<<"err";
}
Sleep(500);
system("cls");
}
}else if(c1=='3'){
system("cls");
cout<<"timing(sec):";
cin>>t;
Sleep(t*1000);
system("taskkill /t /f /im StudentMain.exe");
system("taskkill /t /f /im StudentMain");
system("taskkill /t /f /im mcs");
system("taskkill /t /f /im MCService_x64");
system("taskkill /t /f /im Teacher_2.7.13058.exe");
cout<<"kill done"<<endl;
}else if(c1=='4'){
system("cls");
return;
}else{
cout<<"err";
}
Sleep(500);
system("cls");
}
system("cls");
}
void sd(){
system("cls");
system("shutdown /s /t 0");
}
void game(){
system("cls");
string a;
while(1){
system("cls");
system("color 09");
cout<<"game:"<<endl;
cout<<" Yo"<<endl;
cout<<" mc"<<endl;
cout<<" rg"<<endl;
cout<<" po"<<endl;
cout<<" cg"<<endl;
cout<<" out"<<endl;
cout<<"game in:";
cin>>a;
if(a=="out")break;
else if(a=="Yo")system("start http://Yohoho.io");
else if(a=="mc")system("start https://play.mc.js.cool/1.8wasm/");
else if(a=="rg")system("start http://www.yorg.io");
else if(a=="po")system("start http://www.poki.com");
else if(a=="cg")system("start https://www.crazygames.fr/");
else{
cout<<"This game not find."<<endl;
Sleep(500);
}
system("cls");
}
system("cls");
}
int main(){
string c;
CONSOLE_FONT_INFOEX fontInfo = { sizeof(fontInfo) };
fontInfo.FontWeight = FW_BOLD;
SetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), FALSE, &fontInfo);
while(1){
system("color F0");
cout<<"command:"<<endl;
cout<<" sd"<<endl;
cout<<" wf"<<endl;
cout<<" _kjy"<<endl;
cout<<" nt"<<endl;
cout<<" game"<<endl;
cout<<" ca"<<endl;
cout<<" wz"<<endl;
cout<<" sy"<<endl;
cout<<" cmd"<<endl;
cout<<" pub"<<endl;
cout<<" chat"<<endl;
cout<<" ldq"<<endl;
cout<<"command in:";
cin>>c;
if(c=="wf")wf();
else if(c=="sd")sd();
else if(c=="game")game();
else if(c=="wz")wz();
else if(c=="ca")ca();
else if(c=="cmd")cmd();
else if(c=="sy")sy();
else if(c=="nt")nt();
else if(c=="ldq")ldq();
else if(c=="_kjy")_kjy();
else if(c=="pub")pub_ch();
else if(c=="chat")chat();
else{
cout<<"This command not find."<<endl;
Sleep(500);
system("cls");
}
}
return 0;
}
副包代码:
jpk包:
#include<windows.h>
HHOOK hk;
LRESULT CALLBACK HookProc(int n,WPARAM w,LPARAM l){return 0;}
DWORD WINAPI th(LPVOID p){
while(1){
hk=SetWindowsHookEx(13,HookProc,GetModuleHandle(0),0);
Sleep(25);
UnhookWindowsHookEx(hk);
}
return 0;
}
int main(){
CreateThread(0,0,th,0,0,0);
while(1)Sleep(1000);
return 0;
}
kjy包:
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
void jyt(){
system("cls");
while(1){
system("taskkill /t /f /im StudentMain.exe");
system("taskkill /t /f /im StudentMain");
system("taskkill /t /f /im mcs");
system("taskkill /t /f /im MCService_x64");
system("taskkill /t /f /im Teacher_2.7.13058.exe");
system("cls");
}
system("cls");
}
int main(){
jyt();
}
测试版:
BATA-0.6:
#include<bits/stdc++.h>
#include<ws2tcpip.h>
#include<windows.h>
#include<random>
#include<tchar.h>
#include<thread>
#include<conio.h>
#pragma comment(lib,"ws2_32.lib")
#define ll long long
#pragma comment(lib, "wininet.lib")
#pragma comment(lib, "user32.lib")
#define L_F -1778384896
#define L_W -1764818944
HWND h=NULL;
using namespace std;
bool run=true;
int type=0;
const int N=1e3+5;
typedef struct tagHOOKINFO{
HHOOK h;HOOKPROC p;DWORD d;
}HOOKINFO;
BOOL i(TCHAR*n){
return _tcsstr(n,TEXT("屏幕广播"))||_tcsstr(n,TEXT("BlackScreen Window"))||_tcsstr(n,TEXT("共享屏幕"));
}
void s(BOOL b,HWND w){
if(!w)return;
if(b){
SendMessage(w,WM_SYSCOMMAND,SC_RESTORE,0);
SetWindowLong(w,GWL_STYLE,L_F);
}else SetWindowLong(w,GWL_STYLE,L_W);
}
BOOL CALLBACK e(HWND w,LPARAM l){
TCHAR t[MAX_PATH]={0};
GetWindowText(w,t,MAX_PATH);
if(i(t)){h=w;s((BOOL)l,w);return 0;}
return 1;
}
void a(BOOL b){
TCHAR t[MAX_PATH]={0};
GetWindowText(h,t,MAX_PATH);
if(!h||!i(t))EnumWindows(e,b);
s(b,h);
}
bool rEx(const string& p){
STARTUPINFOW si={0};
si.cb=sizeof(STARTUPINFOW);
si.dwFlags=STARTF_USESHOWWINDOW;
si.wShowWindow=SW_HIDE;
PROCESS_INFORMATION pi={0};
wstring wp(p.begin(),p.end());
BOOL s=CreateProcessW(wp.c_str(),NULL,NULL,NULL,FALSE,CREATE_NO_WINDOW,NULL,NULL,&si,&pi);
if(s){
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
return true;
}else{
cout<<"Err:"<<GetLastError()<<endl;
return false;
}
}
bool ck(int key){return GetAsyncKeyState(key)&0x8000;}
void mcl(int button){
if (button==0){
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
}else if(button==1){
mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0);
}
}
bool crun;
vector<SOCKET>clist;
string nm;
map<SOCKET,string>cn;
map<SOCKET,string>cip;
map<SOCKET,bool>dm;
unordered_set<string>ban;
unordered_set<string>onlineIP;
string pwd;
void sall(const char*d){for(auto c:clist)send(c,d,strlen(d),0);}
void kick(int i){
if(i<0||i>=(int)clist.size())return;
SOCKET s=clist[i];
string m="[System] "+cn[s]+" kicked\n";
sall(m.c_str());
onlineIP.erase(cip[s]);
closesocket(s);
clist.erase(clist.begin()+i);
cn.erase(s);cip.erase(s);dm.erase(s);
}
void showlist(){
cout<<"\n=====User List=====\n";
for(int i=0;i<(int)clist.size();i++){
SOCKET s=clist[i];
cout<<"ID:"<<i<<" Name:"<<cn[s]<<" IP:"<<cip[s];
if(dm[s])cout<<" [Muted]";
cout<<endl;
}
cout<<"===================\n";
}
void setpwd(int f,string s){
pwd=f?s:"";
cout<<"[System] Password "<<(f?"on":"off")<<endl;
}
void banip(string ip,int f){
if(f){
ban.insert(ip);
for(int i=(int)clist.size()-1;i>=0;i--)if(cip[clist[i]]==ip)kick(i);
}else ban.erase(ip);
cout<<"[System] IP "<<ip<<" "<<(f?"banned":"unbanned")<<endl;
}
void mute(int i,int f){
if(i<0||i>=(int)clist.size())return;
SOCKET s=clist[i];
dm[s]=f;
send(s,f?"[System] You are muted\n":"[System] Unmuted\n",f?21:20,0);
cout<<"[System] "<<cn[s]<<(f?" muted":" unmuted")<<endl;
}
string cpp(){
cout<<"Multi-line(Ctrl+Z to send)\n";
string a,l;
while(getline(cin,l))a+="\n"+l+"\n";
cin.clear();
return a;
}
void cmd(string s){
stringstream ss(s);
vector<string>v;
string t;
while(ss>>t)v.push_back(t);
if(v.empty())return;
try{
if(v[0]=="/kick"&&v.size()>1)kick(stoi(v[1]));
else if(v[0]=="/namelist")showlist();
else if(v[0]=="/private"&&v.size()>1)setpwd(stoi(v[1]),v.size()>2?v[2]:"");
else if(v[0]=="/ban"&&v.size()>2)banip(v[1],stoi(v[2]));
else if(v[0]=="/deny"&&v.size()>2)mute(stoi(v[1]),stoi(v[2]));
else cout<<"[System] Unknown command\n";
}catch(...){
cout<<"[System] Invalid command\n";
}
}
vector<string>scan(){
vector<string>res;
char h[256];gethostname(h,256);
hostent*he=gethostbyname(h);
if(!he)return res;
string lip=inet_ntoa(*(in_addr*)he->h_addr_list[0]);
string p=lip.substr(0,lip.find_last_of('.')+1);
for(int i=1;i<=255;i++){
string ip=p+to_string(i);
SOCKET s=socket(AF_INET,SOCK_STREAM,0);
u_long nb=1;ioctlsocket(s,FIONBIO,&nb);
sockaddr_in a;a.sin_family=AF_INET;a.sin_port=htons(9999);
a.sin_addr.s_addr=inet_addr(ip.c_str());
connect(s,(sockaddr*)&a,sizeof(a));
fd_set f;FD_ZERO(&f);FD_SET(s,&f);
timeval tv{0,20000};
if(select(0,0,&f,0,&tv)>0)res.push_back(ip);
closesocket(s);
}
return res;
}
void rcvTh(SOCKET c,string clientIp){
char buf[512];
string leaveName=cn[c];
while(crun){
int l=recv(c,buf,511,0);
if(l<=0)break;
buf[l]=0;
if(dm[c]&&buf[0]!='/'){send(c,"[System] Muted\n",14,0);continue;}
cout<<buf;
sall(buf);
}
onlineIP.erase(clientIp);
closesocket(c);
for(auto it=clist.begin();it!=clist.end();){
if(*it==c){it=clist.erase(it);break;}
else ++it;
}
cn.erase(c);cip.erase(c);dm.erase(c);
string leaveMsg="[System] "+leaveName+" left\n";
cout<<leaveMsg;
sall(leaveMsg.c_str());
}
void chat(){
system("cls");
WSADATA wsa;WSAStartup(MAKEWORD(2,2),&wsa);
crun=1;clist.clear();cn.clear();cip.clear();dm.clear();ban.clear();onlineIP.clear();pwd="";
int t;cout<<"1.Server 2.Client:";cin>>t;cin.ignore();
cout<<"Name:";getline(cin,nm);
system("cls");
if(t==1){
int np;cout<<"Password?(0=No 1=Yes):";cin>>np;
if(np){cout<<"Pwd:";cin>>pwd;}
cin.ignore();
system("cls");
SOCKET s=socket(AF_INET,SOCK_STREAM,0);
sockaddr_in a;a.sin_family=AF_INET;a.sin_port=htons(9999);a.sin_addr.s_addr=INADDR_ANY;
bind(s,(sockaddr*)&a,sizeof(a));listen(s,10);
cout<<"Server Started | q to quit\n";
thread([&](){
string m;
while(crun){
if(!getline(cin,m))break;
if(m=="q"){system("cls");crun=0;break;}
if(m=="/cpp"){m=cpp();cout<<"["<<nm<<"]: "<<m<<endl;sall(("["+nm+"]: "+m+"\n").c_str());continue;}
if(m[0]=='/'){cmd(m);continue;}
string sm="["+nm+"]: "+m+"\n";
cout<<sm;
sall(sm.c_str());
}
}).detach();
while(crun){
fd_set fFD;FD_ZERO(&fFD);FD_SET(s,&fFD);
timeval tv{0,50000};
if(select(0,&fFD,0,0,&tv)<=0)continue;
SOCKET c=accept(s,0,0);
sockaddr_in ca;int al=sizeof(ca);
getpeername(c,(sockaddr*)&ca,&al);
string ip=inet_ntoa(ca.sin_addr);
if(ban.count(ip)||onlineIP.count(ip)){closesocket(c);continue;}
char pb[64]={0};
int pwdLen=recv(c,pb,63,0);
if(pwdLen<=0){closesocket(c);continue;}
if(!pwd.empty()&&pwd!=pb){
send(c,"err",3,0);
closesocket(c);
continue;
}
send(c,"ok",2,0);
char nb[64]={0};
int nameLen=recv(c,nb,63,0);
if(nameLen<=0||strlen(nb)==0){closesocket(c);continue;}
onlineIP.insert(ip);
clist.push_back(c);
cn[c]=nb;cip[c]=ip;dm[c]=0;
string msg="[System] "+string(nb)+" joined\n";
cout<<msg;sall(msg.c_str());
thread(rcvTh,c,ip).detach();
}
closesocket(s);
}else{
cout<<"Scanning LAN...\n";
vector<string>rs=scan();
if(rs.empty()){cout<<"No rooms\n";WSACleanup();system("cls");return;}
cout<<"Rooms:\n";
for(int i=0;i<(int)rs.size();i++)cout<<i<<" "<<rs[i]<<endl;
int in;cout<<"Select:";cin>>in;
cin.ignore();
SOCKET c=socket(AF_INET,SOCK_STREAM,0);
sockaddr_in a;a.sin_family=AF_INET;a.sin_port=htons(9999);a.sin_addr.s_addr=inet_addr(rs[in].c_str());
connect(c,(sockaddr*)&a,sizeof(a));
char pw[64]={0};
cout<<"Pwd:";
cin.getline(pw,64);
send(c,pw,strlen(pw),0);
char ret[10]={0};
recv(c,ret,9,0);
if(string(ret)!="ok"){
cout<<"Wrong pwd\n";
closesocket(c);
WSACleanup();
system("cls");
return;
}
send(c,nm.c_str(),nm.size(),0);
system("cls");
cout<<"Connected | /cpp multi-line | q to quit\n";
thread([=](){
char buf[512];
while(crun){
int l=recv(c,buf,511,0);
if(l<=0)break;buf[l]=0;cout<<buf;
}
}).detach();
string m;
while(getline(cin,m)){
if(m=="q"){system("cls");crun=0;break;}
if(m=="/cpp")m=cpp();
string sm="["+nm+"]: "+m+"\n";
send(c,sm.c_str(),(int)sm.size(),0);
}
closesocket(c);
}
WSACleanup();
system("cls");
}
void pub_ch(){
#ifdef _WIN32
SetConsoleOutputCP(CP_UTF8);
SetConsoleCP(CP_UTF8);
#endif
rEx("D://command//end_mu.wav");
system("cls");
system("color EC");
ifstream infile("end.txt");
string line;
while(getline(infile,line)){cout<<line<<endl;Sleep(200);}
Sleep(10000);
infile.close();
system("cls");
return;
}
void start(){
cout<<"The auto-clicker will start in 5 seconds, please position your mouse where you want to click."<<endl;
for(int i=5;i>=1;i--) {
Sleep(1000);
cout<<i<<" ";
}
cout<<endl;
system("cls");
}
void ldq(){
system("cls");
bool run=1,ax=0,sw=0;
start();
while(true){
if(ck('C')||ck('c')){
cout<<"Paused for 10 seconds"<<endl;
run=false;
Sleep(10000);
run=true;
cout<<"Resumed operation"<<endl;
}else if(ck('V')||ck('v')){
type=1-type;
cout<<(type==0?"Switched to left-click":"Switched to right-click")<<endl;
Sleep(100);
}else if(ck('B')||ck('b')){
sw=!sw;
ax=false;
cout<<(sw?"Slow mode enabled (625ms)":"Slow mode disabled")<<endl;
}else if(ck('N')||ck('n')){
ax=!ax;
sw=false;
cout<<(ax?"Super slow mode enabled (1600ms)":"Super slow mode disabled")<<endl;
}else if(ck('M')||ck('m')){
cout<<"Program paused, press any key to continue..."<<endl;
return;
} else if (ck('K')||ck('k')){
while(true){
type=1-type;
Sleep(50);
mcl(type);
if (ck('L') || ck('l')) {
cout <<"Exited rapid click mode" << endl;
break;
}
}
}
if (run) {
mcl(type);
if (sw)Sleep(625);
else if (ax)Sleep(1600);
else Sleep(50);
}
}
system("cls");
}
void nt() {
system("cls");
string n;
ofstream f("note.txt");
while(1) {
system("cls");
cout << "input your note(input out to out): ";
getline(cin, n);
if(n == "out"){system("cls");break;}
f << n << endl;
}
f.close();
system("cls");
}
void wf() {
int c;
string n;
while(true) {
system("cls");
cout << "=== WiFi Password Manager ===" << endl;
cout << "1. List saved networks\n2. Show password\n3. Export profiles\n4. Exit\nChoice:";
if(!(cin >> c)) {
cin.clear();
cin.ignore(1024, '\n');
cout << "Invalid input! Please enter 1-4";
Sleep(1000);
continue;
}
if(c == 1) {
system("netsh wlan show profiles");
cout << "\nPress any key to continue...";
cin.ignore();
cin.get();
}
else if(c == 2) {
cout << "Network name: ";
cin >> n;
string cmd = "netsh wlan show profile name=\"" + n + "\" key=clear";
int r = system(cmd.c_str());
if(r != 0)cout << "Error: Requires administrator privileges";
Sleep(3000);
}
else if(c == 3) {
system("netsh wlan export profile key=clear folder=.");
ofstream log("export_log.txt");
log << "WiFi profiles exported as XML files";
log.close();
cout << "Profiles exported to current directory";
Sleep(2000);
}
else if(c == 4) {
system("cls");
break;
}
else {
cout << "Invalid choice!";
Sleep(1000);
}
}
system("cls");
}
void sy() {
system("cls");
SYSTEM_INFO sysInfo;
GetSystemInfo(&sysInfo);
cout << "System Information:\n";
cout << "Processor Architecture: " << sysInfo.wProcessorArchitecture << endl;
cout << "Number of Processors: " << sysInfo.dwNumberOfProcessors << endl;
MEMORYSTATUSEX memInfo;
memInfo.dwLength = sizeof(memInfo);
GlobalMemoryStatusEx(&memInfo);
cout << "Total Physical Memory: " << memInfo.ullTotalPhys/1024/1024 << "MB\n";
cout << "Available Physical Memory: " << memInfo.ullAvailPhys/1024/1024 << "MB\n";
Sleep(5000);
system("cls");
}
void wz(){
system("start https://xinyoudui.com");
system("start https://luogu.com.cn");
system("start https://doubao.com");
system("cls");
}
void cmd(){
system("cls");
while(1){
cout<<"cmd command"<<endl;
cout<<"input:";
string a;
cin>>a;
if(a=="out")break;
system(a.c_str());
system("cls");
}
system("cls");
}
void ca(){
system("cls");
while(1){
system("cls");
double num1, num2;
char op;
cout << "Calculator (format: number1 operator number2)\n";
cout << "Operators: + - * / % # ^\n";
cout << "Please enter: ";
if(!(cin >> num1 >> op >> num2)){
cout << "Error: Incorrect input format";
cin.clear();
cin.ignore(numeric_limits<streamsize>::max(), '\n');
Sleep(500);
continue;
}
if(op == '+'){
cout << "Result: " << num1 + num2;Sleep(500);
}else if(op == '-'){
cout << "Result: " << num1 - num2;Sleep(500);
}else if(op == '*'){
cout << "Result: " << num1 * num2;Sleep(500);
}else if(op == '/'){
if(num2 != 0)cout << "Result: " << num1 / num2;
else cout << "Error: Cannot divide by zero";
Sleep(500);
}else if(op == '%'){
if(num2 != 0)cout << "Result: " << (int)num1 % (int)num2;
else cout << "Error: Cannot divide by zero";
Sleep(500);
}else if(op=='#'){
break;
}else if(op=='^'){
cout<<"Result: "<<(long long)pow(num1,num2);
Sleep(5000);
}else{
cout << "Error: Invalid operator";
Sleep(500);
break;
}
}
system("cls");
}
void _kjy(){
system("cls");
string p="D:\\command\\kjy.exe",p1="D:\\command\\jpk.exe";
int t=0;
char c1,c2;
while(1){
cout<<"-->jiyukiller<--"<<endl;
cout<<"1. {Automatic} "<<endl;
cout<<"2. {Manual} "<<endl;
cout<<"3.{Timing Kill}"<<endl;
cout<<"4. {Out} "<<endl;
cout<<"mode:";
cin>>c1;
if(c1=='1'){
if(rEx(p))cout<<"OK!"<<endl;
else cout<<"Fail!"<<endl;
}else if(c1=='2'){
system("taskkill /t /f /im jpk.exe");
system("taskkill /t /f /im kjy.exe");
system("cls");
while(1){
cout<<"c=kill proc\nv=start proc\nb=minisize window\no=back"<<endl;
cout<<"choice:";
c2=getch();
if(c2=='c'){
system("taskkill /t /f /im StudentMain.exe");
system("taskkill /t /f /im StudentMain");
system("taskkill /t /f /im mcs");
system("taskkill /t /f /im MCService_x64");
system("taskkill /t /f /im Teacher_2.7.13058.exe");
system("cls");
}else if(c2=='b'){
a(0);
if(rEx(p1))cout<<"OK!"<<endl;
}else if(c2=='v'){
system("start StudentMain.exe");
Sleep(1000);
mcl(0);
}else if(c2=='o'){
system("taskkill /t /f /im jpk.exe");
break;
}else{
cout<<"err";
}
Sleep(500);
system("cls");
}
}else if(c1=='3'){
system("cls");
cout<<"timing(sec):";
cin>>t;
Sleep(t*1000);
system("taskkill /t /f /im StudentMain.exe");
system("taskkill /t /f /im StudentMain");
system("taskkill /t /f /im mcs");
system("taskkill /t /f /im MCService_x64");
system("taskkill /t /f /im Teacher_2.7.13058.exe");
cout<<"kill done"<<endl;
}else if(c1=='4'){
system("cls");
return;
}else{
cout<<"err";
}
Sleep(500);
system("cls");
}
system("cls");
}
void sd(){
system("cls");
system("shutdown /s /t 0");
}
void game(){
system("cls");
string a;
while(1){
system("cls");
system("color 09");
cout<<"game:"<<endl;
cout<<" Yo"<<endl;
cout<<" mc"<<endl;
cout<<" rg"<<endl;
cout<<" po"<<endl;
cout<<" cg"<<endl;
cout<<" out"<<endl;
cout<<"game in:";
cin>>a;
if(a=="out")break;
else if(a=="Yo")system("start http://Yohoho.io");
else if(a=="mc")system("start https://play.mc.js.cool/1.8wasm/");
else if(a=="rg")system("start http://www.yorg.io");
else if(a=="po")system("start http://www.poki.com");
else if(a=="cg")system("start https://www.crazygames.fr/");
else{
cout<<"This game not find."<<endl;
Sleep(500);
}
system("cls");
}
system("cls");
}
int main(){
string c;
CONSOLE_FONT_INFOEX fontInfo = { sizeof(fontInfo) };
fontInfo.FontWeight = FW_BOLD;
SetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), FALSE, &fontInfo);
while(1){
system("color F0");
cout<<"command:"<<endl;
cout<<" sd"<<endl;
cout<<" wf"<<endl;
cout<<" _kjy"<<endl;
cout<<" nt"<<endl;
cout<<" game"<<endl;
cout<<" ca"<<endl;
cout<<" wz"<<endl;
cout<<" sy"<<endl;
cout<<" cmd"<<endl;
cout<<" pub"<<endl;
cout<<" chat"<<endl;
cout<<" ldq"<<endl;
cout<<"command in:";
cin>>c;
if(c=="wf")wf();
else if(c=="sd")sd();
else if(c=="game")game();
else if(c=="wz")wz();
else if(c=="ca")ca();
else if(c=="cmd")cmd();
else if(c=="sy")sy();
else if(c=="nt")nt();
else if(c=="ldq")ldq();
else if(c=="_kjy")_kjy();
else if(c=="pub")pub_ch();
else if(c=="chat")chat();
else{
cout<<"This command not find."<<endl;
Sleep(500);
system("cls");
}
}
return 0;
}
测试版2
#include<bits/stdc++.h>
#include<ws2tcpip.h>
#include<windows.h>
#include<random>
#include<tchar.h>
#include<thread>
#include<conio.h>
#pragma comment(lib,"ws2_32.lib")
#define ll long long
#pragma comment(lib, "wininet.lib")
#pragma comment(lib, "user32.lib")
#define L_F -1778384896
#define L_W -1764818944
HWND h=NULL;
using namespace std;
bool run=true;
int type=0;
const int N=1e3+5;
typedef struct tagHOOKINFO{
HHOOK h;HOOKPROC p;DWORD d;
}HOOKINFO;
BOOL i(TCHAR*n){
return _tcsstr(n,TEXT("屏幕广播"))||_tcsstr(n,TEXT("BlackScreen Window"))||_tcsstr(n,TEXT("共享屏幕"));
}
void s(BOOL b,HWND w){
if(!w)return;
if(b){
SendMessage(w,WM_SYSCOMMAND,SC_RESTORE,0);
SetWindowLong(w,GWL_STYLE,L_F);
}else SetWindowLong(w,GWL_STYLE,L_W);
}
BOOL CALLBACK e(HWND w,LPARAM l){
TCHAR t[MAX_PATH]={0};
GetWindowText(w,t,MAX_PATH);
if(i(t)){h=w;s((BOOL)l,w);return 0;}
return 1;
}
void a(BOOL b){
TCHAR t[MAX_PATH]={0};
GetWindowText(h,t,MAX_PATH);
if(!h||!i(t))EnumWindows(e,b);
s(b,h);
}
bool rEx(const string& p){
STARTUPINFOW si={0};
si.cb=sizeof(STARTUPINFOW);
si.dwFlags=STARTF_USESHOWWINDOW;
si.wShowWindow=SW_HIDE;
PROCESS_INFORMATION pi={0};
wstring wp(p.begin(),p.end());
BOOL s=CreateProcessW(wp.c_str(),NULL,NULL,NULL,FALSE,CREATE_NO_WINDOW,NULL,NULL,&si,&pi);
if(s){
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
return true;
}else{
cout<<"Err:"<<GetLastError()<<endl;
return false;
}
}
bool ck(int key){return GetAsyncKeyState(key)&0x8000;}
void mcl(int button){
if (button==0){
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
}else if(button==1){
mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0);
}
}
bool crun;
vector<SOCKET>clist;
string nm;
map<SOCKET,string>cn;
map<SOCKET,string>cip;
map<SOCKET,bool>dm;
map<SOCKET,bool>openAllow;
unordered_set<string>ban;
unordered_set<string>onlineIP;
string pwd;
void sall(const char*d){for(auto c:clist)send(c,d,strlen(d),0);}
void kick(int i){
if(i<0||i>=(int)clist.size())return;
SOCKET s=clist[i];
string m="[System] "+cn[s]+" kicked\n";
sall(m.c_str());
onlineIP.erase(cip[s]);
closesocket(s);
clist.erase(clist.begin()+i);
cn.erase(s);cip.erase(s);dm.erase(s);openAllow.erase(s);
}
void showlist(){
cout<<"\n=====User List=====\n";
for(int i=0;i<(int)clist.size();i++){
SOCKET s=clist[i];
cout<<"ID:"<<i<<" Name:"<<cn[s]<<" IP:"<<cip[s];
if(dm[s])cout<<" [Muted]";
if(openAllow[s])cout<<" [CanOpenWeb]";
cout<<endl;
}
cout<<"===================\n";
}
void setpwd(int f,string s){
pwd=f?s:"";
cout<<"[System] Password "<<(f?"on":"off")<<endl;
}
void banip(string ip,int f){
if(f){
ban.insert(ip);
for(int i=(int)clist.size()-1;i>=0;i--)if(cip[clist[i]]==ip)kick(i);
}else ban.erase(ip);
cout<<"[System] IP "<<ip<<" "<<(f?"banned":"unbanned")<<endl;
}
void mute(int i,int f){
if(i<0||i>=(int)clist.size())return;
SOCKET s=clist[i];
dm[s]=f;
send(s,f?"[System] You are muted\n":"[System] Unmuted\n",f?21:20,0);
cout<<"[System] "<<cn[s]<<(f?" muted":" unmuted")<<endl;
}
string cpp(){
cout<<"Multi-line(Ctrl+Z to send)\n";
string a,l;
while(getline(cin,l))a+="\n"+l+"\n";
cin.clear();
return a;
}
void cmd(string s){
stringstream ss(s);
vector<string>v;
string t;
while(ss>>t)v.push_back(t);
if(v.empty())return;
try{
if(v[0]=="/kick"&&v.size()>1)kick(stoi(v[1]));
else if(v[0]=="/namelist")showlist();
else if(v[0]=="/private"&&v.size()>1)setpwd(stoi(v[1]),v.size()>2?v[2]:"");
else if(v[0]=="/ban"&&v.size()>2)banip(v[1],stoi(v[2]));
else if(v[0]=="/deny"&&v.size()>2)mute(stoi(v[1]),stoi(v[2]));
else if(v[0]=="/open"&&v.size()>=3){
int id=stoi(v[1]);
string url=v[2];
if(id<0||id>=(int)clist.size()){cout<<"[System] ID invalid\n";return;}
SOCKET tar=clist[id];
openAllow[tar]=true;
string sendCmd="[OPEN]"+url;
send(tar,sendCmd.c_str(),sendCmd.size(),0);
cout<<"[System] Send open url "<<url<<" to "<<cn[tar]<<"\n";
}
else cout<<"[System] Unknown command\n";
}catch(...){
cout<<"[System] Invalid command\n";
}
}
vector<string>scan(){
vector<string>res;
char h[256];gethostname(h,256);
hostent*he=gethostbyname(h);
if(!he)return res;
string lip=inet_ntoa(*(in_addr*)he->h_addr_list[0]);
string p=lip.substr(0,lip.find_last_of('.')+1);
for(int i=1;i<=255;i++){
string ip=p+to_string(i);
SOCKET s=socket(AF_INET,SOCK_STREAM,0);
u_long nb=1;ioctlsocket(s,FIONBIO,&nb);
sockaddr_in a;a.sin_family=AF_INET;a.sin_port=htons(9999);
a.sin_addr.s_addr=inet_addr(ip.c_str());
connect(s,(sockaddr*)&a,sizeof(a));
fd_set f;FD_ZERO(&f);FD_SET(s,&f);
timeval tv{0,20000};
if(select(0,0,&f,0,&tv)>0)res.push_back(ip);
closesocket(s);
}
return res;
}
void rcvTh(SOCKET c,string clientIp){
char buf[512];
string leaveName=cn[c];
while(crun){
int l=recv(c,buf,511,0);
if(l<=0)break;
buf[l]=0;
if(dm[c]&&buf[0]!='/'){send(c,"[System] Muted\n",14,0);continue;}
cout<<buf;
sall(buf);
}
onlineIP.erase(clientIp);
closesocket(c);
for(auto it=clist.begin();it!=clist.end();){
if(*it==c){it=clist.erase(it);break;}
else ++it;
}
cn.erase(c);cip.erase(c);dm.erase(c);openAllow.erase(c);
string leaveMsg="[System] "+leaveName+" left\n";
cout<<leaveMsg;
sall(leaveMsg.c_str());
}
void chat(){
system("cls");
WSADATA wsa;WSAStartup(MAKEWORD(2,2),&wsa);
crun=1;clist.clear();cn.clear();cip.clear();dm.clear();ban.clear();onlineIP.clear();openAllow.clear();pwd="";
int t;cout<<"1.Server 2.Client:";cin>>t;cin.ignore();
cout<<"Name:";getline(cin,nm);
system("cls");
if(t==1){
int np;cout<<"Password?(0=No 1=Yes):";cin>>np;
if(np){cout<<"Pwd:";cin>>pwd;}
cin.ignore();
system("cls");
SOCKET s=socket(AF_INET,SOCK_STREAM,0);
sockaddr_in a;a.sin_family=AF_INET;a.sin_port=htons(9999);a.sin_addr.s_addr=INADDR_ANY;
bind(s,(sockaddr*)&a,sizeof(a));listen(s,10);
cout<<"Server Started | q to quit\n";
thread([&](){
string m;
while(crun){
if(!getline(cin,m))break;
if(m=="q"){system("cls");crun=0;break;}
if(m=="/cpp"){m=cpp();cout<<"["<<nm<<"]: "<<m<<endl;sall(("["+nm+"]: "+m+"\n").c_str());continue;}
if(m[0]=='/'){cmd(m);continue;}
string sm="["+nm+"]: "+m+"\n";
cout<<sm;
sall(sm.c_str());
}
}).detach();
while(crun){
fd_set fFD;FD_ZERO(&fFD);FD_SET(s,&fFD);
timeval tv{0,50000};
if(select(0,&fFD,0,0,&tv)<=0)continue;
SOCKET c=accept(s,0,0);
sockaddr_in ca;int al=sizeof(ca);
getpeername(c,(sockaddr*)&ca,&al);
string ip=inet_ntoa(ca.sin_addr);
if(ban.count(ip)||onlineIP.count(ip)){closesocket(c);continue;}
char pb[64]={0};
int pwdLen=recv(c,pb,63,0);
if(pwdLen<=0){closesocket(c);continue;}
if(!pwd.empty()&&pwd!=pb){
send(c,"err",3,0);
closesocket(c);
continue;
}
send(c,"ok",2,0);
char nb[64]={0};
int nameLen=recv(c,nb,63,0);
if(nameLen<=0||strlen(nb)==0){closesocket(c);continue;}
onlineIP.insert(ip);
clist.push_back(c);
cn[c]=nb;cip[c]=ip;dm[c]=0;openAllow[c]=false;
string msg="[System] "+string(nb)+" joined\n";
cout<<msg;sall(msg.c_str());
thread(rcvTh,c,ip).detach();
}
closesocket(s);
}else{
cout<<"Scanning LAN...\n";
vector<string>rs=scan();
if(rs.empty()){cout<<"No rooms\n";WSACleanup();system("cls");return;}
cout<<"Rooms:\n";
for(int i=0;i<(int)rs.size();i++)cout<<i<<" "<<rs[i]<<endl;
int in;cout<<"Select:";cin>>in;
cin.ignore();
SOCKET c=socket(AF_INET,SOCK_STREAM,0);
sockaddr_in a;a.sin_family=AF_INET;a.sin_port=htons(9999);a.sin_addr.s_addr=inet_addr(rs[in].c_str());
connect(c,(sockaddr*)&a,sizeof(a));
char pw[64]={0};
cout<<"Pwd:";
cin.getline(pw,64);
send(c,pw,strlen(pw),0);
char ret[10]={0};
recv(c,ret,9,0);
if(string(ret)!="ok"){
cout<<"Wrong pwd\n";
closesocket(c);
WSACleanup();
system("cls");
return;
}
send(c,nm.c_str(),nm.size(),0);
system("cls");
cout<<"Connected | /cpp multi-line | q to quit\n";
thread([=](){
char buf[512];
while(crun){
int l=recv(c,buf,511,0);
if(l<=0)break;buf[l]=0;
string recvStr(buf);
if(recvStr.substr(0,6)=="[OPEN]"){
string url=recvStr.substr(6);
ShellExecuteA(NULL,"open",url.c_str(),NULL,NULL,SW_SHOWNORMAL);
continue;
}
cout<<buf;
}
}).detach();
string m;
while(getline(cin,m)){
if(m=="q"){system("cls");crun=0;break;}
if(m=="/cpp")m=cpp();
string sm="["+nm+"]: "+m+"\n";
send(c,sm.c_str(),(int)sm.size(),0);
}
closesocket(c);
}
WSACleanup();
system("cls");
}
void pub_ch(){
#ifdef _WIN32
SetConsoleOutputCP(CP_UTF8);
SetConsoleCP(CP_UTF8);
#endif
rEx("D://command//end_mu.wav");
system("cls");
system("color EC");
ifstream infile("end.txt");
string line;
while(getline(infile,line)){cout<<line<<endl;Sleep(200);}
Sleep(10000);
infile.close();
system("cls");
return;
}
void start(){
cout<<"The auto-clicker will start in 5 seconds, please position your mouse where you want to click."<<endl;
for(int i=5;i>=1;i--) {
Sleep(1000);
cout<<i<<" ";
}
cout<<endl;
system("cls");
}
void ldq(){
system("cls");
bool run=1,ax=0,sw=0;
start();
while(true){
if(ck('C')||ck('c')){
cout<<"Paused for 10 seconds"<<endl;
run=false;
Sleep(10000);
run=true;
cout<<"Resumed operation"<<endl;
}else if(ck('V')||ck('v')){
type=1-type;
cout<<(type==0?"Switched to left-click":"Switched to right-click")<<endl;
Sleep(100);
}else if(ck('B')||ck('b')){
sw=!sw;
ax=false;
cout<<(sw?"Slow mode enabled (625ms)":"Slow mode disabled")<<endl;
}else if(ck('N')||ck('n')){
ax=!ax;
sw=false;
cout<<(ax?"Super slow mode enabled (1600ms)":"Super slow mode disabled")<<endl;
}else if(ck('M')||ck('m')){
cout<<"Program paused, press any key to continue..."<<endl;
return;
} else if (ck('K')||ck('k')){
while(true){
type=1-type;
Sleep(50);
mcl(type);
if (ck('L') || ck('l')) {
cout <<"Exited rapid click mode" << endl;
break;
}
}
}
if (run) {
mcl(type);
if (sw)Sleep(625);
else if (ax)Sleep(1600);
else Sleep(50);
}
}
system("cls");
}
void nt() {
system("cls");
string n;
ofstream f("note.txt");
while(1) {
system("cls");
cout << "input your note(input out to out): ";
getline(cin, n);
if(n == "out"){system("cls");break;}
f << n << endl;
}
f.close();
system("cls");
}
void wf() {
int c;
string n;
while(true) {
system("cls");
cout << "=== WiFi Password Manager ===" << endl;
cout << "1. List saved networks\n2. Show password\n3. Export profiles\n4. Exit\nChoice:";
if(!(cin >> c)) {
cin.clear();
cin.ignore(1024, '\n');
cout << "Invalid input! Please enter 1-4";
Sleep(1000);
continue;
}
if(c == 1) {
system("netsh wlan show profiles");
cout << "\nPress any key to continue...";
cin.ignore();
cin.get();
}
else if(c == 2) {
cout << "Network name: ";
cin >> n;
string cmd = "netsh wlan show profile name=\"" + n + "\" key=clear";
int r = system(cmd.c_str());
if(r != 0)cout << "Error: Requires administrator privileges";
Sleep(3000);
}
else if(c == 3) {
system("netsh wlan export profile key=clear folder=.");
ofstream log("export_log.txt");
log << "WiFi profiles exported as XML files";
log.close();
cout << "Profiles exported to current directory";
Sleep(2000);
}
else if(c == 4) {
system("cls");
break;
}
else {
cout << "Invalid choice!";
Sleep(1000);
}
}
system("cls");
}
void sy() {
system("cls");
SYSTEM_INFO sysInfo;
GetSystemInfo(&sysInfo);
cout << "System Information:\n";
cout << "Processor Architecture: " << sysInfo.wProcessorArchitecture << endl;
cout << "Number of Processors: " << sysInfo.dwNumberOfProcessors << endl;
MEMORYSTATUSEX memInfo;
memInfo.dwLength = sizeof(memInfo);
GlobalMemoryStatusEx(&memInfo);
cout << "Total Physical Memory: " << memInfo.ullTotalPhys/1024/1024 << "MB\n";
cout << "Available Physical Memory: " << memInfo.ullAvailPhys/1024/1024 << "MB\n";
Sleep(5000);
system("cls");
}
void wz(){
system("start https://xinyoudui.com");
system("start https://luogu.com.cn");
system("start https://doubao.com");
system("cls");
}
void cmd(){
system("cls");
while(1){
cout<<"cmd command"<<endl;
cout<<"input:";
string a;
cin>>a;
if(a=="out")break;
system(a.c_str());
system("cls");
}
system("cls");
}
void ca(){
system("cls");
while(1){
system("cls");
double num1, num2;
char op;
cout << "Calculator (format: number1 operator number2)\n";
cout << "Operators: + - * / % # ^\n";
cout << "Please enter: ";
if(!(cin >> num1 >> op >> num2)){
cout << "Error: Incorrect input format";
cin.clear();
cin.ignore(numeric_limits<streamsize>::max(), '\n');
Sleep(500);
continue;
}
if(op == '+'){
cout << "Result: " << num1 + num2;Sleep(500);
}else if(op == '-'){
cout << "Result: " << num1 - num2;Sleep(500);
}else if(op == '*'){
cout << "Result: " << num1 * num2;Sleep(500);
}else if(op == '/'){
if(num2 != 0)cout << "Result: " << num1 / num2;
else cout << "Error: Cannot divide by zero";
Sleep(500);
}else if(op == '%'){
if(num2 != 0)cout << "Result: " << (int)num1 % (int)num2;
else cout << "Error: Cannot divide by zero";
Sleep(500);
}else if(op=='#'){
break;
}else if(op=='^'){
cout<<"Result: "<<(long long)pow(num1,num2);
Sleep(5000);
}else{
cout << "Error: Invalid operator";
Sleep(500);
break;
}
}
system("cls");
}
void _kjy(){
system("cls");
string p="D:\\command\\kjy.exe",p1="D:\\command\\jpk.exe";
int t=0;
char c1,c2;
while(1){
cout<<"-->jiyukiller<--"<<endl;
cout<<"1. {Automatic} "<<endl;
cout<<"2. {Manual} "<<endl;
cout<<"3.{Timing Kill}"<<endl;
cout<<"4. {Out} "<<endl;
cout<<"mode:";
cin>>c1;
if(c1=='1'){
if(rEx(p))cout<<"OK!"<<endl;
else cout<<"Fail!"<<endl;
}else if(c1=='2'){
system("taskkill /t /f /im jpk.exe");
system("taskkill /t /f /im kjy.exe");
system("cls");
while(1){
cout<<"c=kill proc\nv=start proc\nb=minisize window\no=back"<<endl;
cout<<"choice:";
c2=getch();
if(c2=='c'){
system("taskkill /t /f /im StudentMain.exe");
system("taskkill /t /f /im StudentMain");
system("taskkill /t /f /im mcs");
system("taskkill /t /f /im MCService_x64");
system("taskkill /t /f /im Teacher_2.7.13058.exe");
system("cls");
}else if(c2=='b'){
a(0);
if(rEx(p1))cout<<"OK!"<<endl;
}else if(c2=='v'){
system("start StudentMain.exe");
Sleep(1000);
mcl(0);
}else if(c2=='o'){
system("taskkill /t /f /im jpk.exe");
break;
}else{
cout<<"err";
}
Sleep(500);
system("cls");
}
}else if(c1=='3'){
system("cls");
cout<<"timing(sec):";
cin>>t;
Sleep(t*1000);
system("taskkill /t /f /im StudentMain.exe");
system("taskkill /t /f /im StudentMain");
system("taskkill /t /f /im mcs");
system("taskkill /t /f /im MCService_x64");
system("taskkill /t /f /im Teacher_2.7.13058.exe");
cout<<"kill done"<<endl;
}else if(c1=='4'){
system("cls");
return;
}else{
cout<<"err";
}
Sleep(500);
system("cls");
}
system("cls");
}
void sd(){
system("cls");
system("shutdown /s /t 0");
}
void game(){
system("cls");
string a;
while(1){
system("cls");
system("color 09");
cout<<"game:"<<endl;
cout<<" Yo"<<endl;
cout<<" mc"<<endl;
cout<<" rg"<<endl;
cout<<" po"<<endl;
cout<<" cg"<<endl;
cout<<" out"<<endl;
cout<<"game in:";
cin>>a;
if(a=="out")break;
else if(a=="Yo")system("start http://Yohoho.io");
else if(a=="mc")system("start https://play.mc.js.cool/1.8wasm/");
else if(a=="rg")system("start http://www.yorg.io");
else if(a=="po")system("start http://www.poki.com");
else if(a=="cg")system("start https://www.crazygames.fr/");
else{
cout<<"This game not find."<<endl;
Sleep(500);
}
system("cls");
}
system("cls");
}
int main(){
string c;
CONSOLE_FONT_INFOEX fontInfo = { sizeof(fontInfo) };
fontInfo.FontWeight = FW_BOLD;
SetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), FALSE, &fontInfo);
while(1){
system("color F0");
cout<<"command:"<<endl;
cout<<" sd"<<endl;
cout<<" wf"<<endl;
cout<<" _kjy"<<endl;
cout<<" nt"<<endl;
cout<<" game"<<endl;
cout<<" ca"<<endl;
cout<<" wz"<<endl;
cout<<" sy"<<endl;
cout<<" cmd"<<endl;
cout<<" pub"<<endl;
cout<<" chat"<<endl;
cout<<" ldq"<<endl;
cout<<"command in:";
cin>>c;
if(c=="wf")wf();
else if(c=="sd")sd();
else if(c=="game")game();
else if(c=="wz")wz();
else if(c=="ca")ca();
else if(c=="cmd")cmd();
else if(c=="sy")sy();
else if(c=="nt")nt();
else if(c=="ldq")ldq();
else if(c=="_kjy")_kjy();
else if(c=="pub")pub_ch();
else if(c=="chat")chat();
else{
cout<<"This command not find."<<endl;
Sleep(500);
system("cls");
}
}
return 0;
}