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

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日

悬赏问题

  • ¥15 远程桌面文档内容复制粘贴,格式会变化
  • ¥15 关于#java#的问题:找一份能快速看完mooc视频的代码
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”
  • ¥15 网络设备配置与管理这个该怎么弄
  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题