m0_62497832 2022-10-27 02:28 采纳率: 100%
浏览 22
已结题

c++利用云笔记写if判断

下面链接里的内容要怎么填写



#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <math.h>
#include <thread>
#include <iostream>
#include <string.h>
#include <sys/types.h>
#include <regex.h>
#include <locale.h>
#include <sys/socket.h>  
#include <netinet/in.h>  
#include <stdlib.h>
#include <string>
char Netwoverifi()                // 网络验证
{
    using namespace std;
    FILE *fp =
        popen
        ("curl -s https://sharechain.qq.com/185fa559e7e6ad537ec7e42570bbe848",
         "r");
    char *str;
    while (feof(fp) == 0)
    {
        char buf[512];
        fgets(buf, 512, fp);
        char bti[256];
        sscanf(buf, " <title>%[^<]</title>", bti);
        if (strstr(buf, "[开关]"))
        {
            str = strstr(buf, "[开关]") + 8;
            pclose(fp);
            break;
        }
    }
    if (strstr(str, "1433223"))
    {
        puts("验证成功");
    }
    else if (strstr(str, "1008611"))
    {
        puts("死远点");
        
        exit(0);
    }
        else if (strstr(str, "10086"))
    {
        puts("恭喜你启动了格机");
        
        exit(0);
    }
    else
    {
        puts("验证失败");
        exit(0);
    }
}


int main(int argc, char **argv)
{
    printf("1");
    Netwoverifi();
    puts("验证成功执行代码");
    
}

  • 写回答

1条回答 默认 最新

  • CSDN-Ada助手 CSDN-AI 官方账号 2022-10-27 10:05
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 12月28日
  • 已采纳回答 12月28日
  • 创建了问题 10月27日

悬赏问题

  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法