KMS激活脚本生成程序(自用备份)

来源:互联网 发布:子弹算法 编辑:程序博客网 时间:2024/06/08 12:21
#include "bits/stdc++.h"using namespace std;int main(){    printf("1.Windows 10 Professional\n2.Windows 10 Professional N\n3.Windows 10 Enterprise\n4.Windows 10 Enterprise N\n5.Windows 10 Education\n6.Windows 10 Education N\n7.Windows 10 Enterprise 2015 LTSB\n8.Windows 10 Enterprise 2015 LTSB N\n");    printf("Please select your Windows 10 version,If you want to quit, please enter 'q'\n");    char choose;    cin>>choose;    if(choose=='q')        exit(0);    else    {        FILE *f;        f=fopen("./KMS_ACTIVATION.BAT","w");        fprintf(f,"slmgr /ipk ");        switch (choose)        {        case '1':            fprintf(f,"W269N-WFGWX-YVC9B-4J6C9-T83GX");            break;        case '2':            fprintf(f,"MH37W-N47XK-V7XM9-C7227-GCQG9");            break;        case '3':            fprintf(f,"NPPR9-FWDCX-D2C8J-H872K-2YT43");            break;        case '4':            fprintf(f,"DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4");            break;        case '5':            fprintf(f,"NW6C2-QMPVW-D7KKK-3GKT6-VCFB2");            break;        case '6':            fprintf(f,"2WH4N-8QGBV-H22JP-CT43Q-MDWWJ");            break;        case '7':            fprintf(f,"WNMTR-4C88C-JK8YV-HQ7T2-76DF9");            break;        case '8':            fprintf(f,"2F77B-TNFGY-69QQF-B8YKP-D69TJ");            break;        }        printf("Please enter the KMS server address,the default kms address is xykz.f3322.org\n");        char kms[99999];        kms[0]='\0';        getchar();        gets(kms);        if(kms[0]=='\0')            fprintf(f,"\nslmgr /skms xykz.f3322.org\n");        else            fprintf(f,"\nslmgr /skms %s\n",kms);        fprintf(f,"slmgr /ato");        printf("#############################################################\n");        printf("#                    Congratulations                        #\n");        printf("#   KMS_ACTIVATION.BAT has been successfully generated      #\n");        printf("#Please run KMS_ACTIVATION.BAT with administrator privileges#\n");        printf("#############################################################\n");        system("pause");    }}
原创粉丝点击