本地IP防御

复制代码
/////////////////////////////////////////////////////////// 编译 release ’发布版本‘



#include<Windows.h>
#include<stdlib.h>
#pragma comment(lib,"WS2_32.lib")
#include <corecrt_wstdlib.h>
#include <iostream>
#include<stdio.h>
#include <Windows.h>
#include<list>
#include<iostream>
#include<istream>
#include<ostream>
#include <fstream>
#include<string>
using namespace std;

////////////////////////////////////////////////////////////

// GLOBALE DATa
class CAtk
{
public:
    WSADATA wsd;
    list<SOCKET> m_socket;

    int retVal;//调用Socket函数的返回值
    char buf[255];

    CAtk() {};
    ~CAtk() {
    
    };

    void Release()
    {
        m_socket.clear();
    }

    void Init()
    {
        if (WSAStartup(MAKEWORD(2, 2), &wsd) != 0) {
            printf("WSAStartup failed!\n");
        }

        sprintf_s(buf, " 0,3, (* -1.0f); 鸟人猪守屎 & 烫烫 & 很甜懒子很园 4 / 0 / 7; *(-1)/3*0.0000001f; ; 0 *; int 3; & Math_PI ';' ");

        std::ifstream file("ip.txt");
        std::string line;

        Sleep(2);

        if (file.is_open()) 
        {
            printf("of load ip data this work Not Click R & M \n");

            while ((std::getline(file, line)))
            {

                inster_List(line.c_str());
                printf(line.c_str());
                printf("\n");
                line.clear();
                
            }
            
            file.close();
        }
        
        

    };

    void inster_List(const char* IP)
    {
        if (IP == "")
        {
            return;
        }

        SOCKADDR_IN ins;
        ins.sin_addr.S_un.S_addr = (ULONG)IP;
        ins.sin_family = AF_INET;
        ins.sin_port = htons(80);

        SOCKET soc;
        soc = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
        connect(soc, (LPSOCKADDR)&ins, sizeof(ins));

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

        m_socket.push_back(soc);

    };


    void loopSend()
    {
        list<SOCKET>::iterator it = m_socket.begin();
        bool a = false;
    AS:

        if (it == m_socket.end())
        {
            it = m_socket.begin();
        
        }

        
        recv(*it, buf, 255, 0);
        //printf(buf); 
        //printf("\n");

        sprintf_s(buf, "0");
        send(*it, buf, 257, 0);

        if(buf != "")
        {
            ZeroMemory(buf,255);
            recv(*it, buf, 255, 0);
            ZeroMemory(buf, 255);
            recv(*it, buf, 255, 0); ZeroMemory(buf, 255);
            recv(*it, buf, 255, 0); ZeroMemory(buf, 255);
            recv(*it, buf, 255, 0); ZeroMemory(buf, 255);
            recv(*it, buf, 255, 0); ZeroMemory(buf, 255);
            recv(*it, buf, 255, 0); ZeroMemory(buf, 255);

sprintf_s(buf, "0");
            send(*it, "17", 255, 0);
            send(*it, "13", 255, 0);
            recv(*it, buf, 255, 0); ZeroMemory(buf, 255);
            send(*it, buf, 255, 0);
        }
        
        recv(*it, buf, 255, 0);
        recv(*it, buf, 255, 0);

        if (a == true) {
            send(*it, buf, 255, 0);
            sprintf_s(buf, "/70000003007;");
            recv(*it, buf, 255, 0); ZeroMemory(buf, 255);
            a = false;
        }
        else 
        {
            a = true;
            send(*it, buf, 255, 0);
            recv(*it, buf, 255, 0); ZeroMemory(buf, 255);
            sprintf_s(buf, "0");
            recv(*it, buf, 257, 0); ZeroMemory(buf, 255);
            send(*it, buf, 257, 0);
        }

    
sprintf_s(buf, "0");
        send(*it, buf, 257, 0);
        send(*it, buf, 259, 0);
        recv(*it, buf, 268, 0); ZeroMemory(buf, 255);
        recv(*it, buf, 257, 0); ZeroMemory(buf, 255);
        recv(*it, buf, 257, 0); ZeroMemory(buf, 255);

    
        Sleep(2);
        it++;
        
goto AS;


    };
};



CAtk g_atk;

void main()
{

    g_atk.Init();
    g_atk.loopSend();



    return;
};
复制代码

 

posted on   草丛有头猪  阅读(6)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 通过 API 将Deepseek响应流式内容输出到前端
· AI Agent开发,如何调用三方的API Function,是通过提示词来发起调用的吗
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示