首页 > 其他分享 >阻塞外挂 TCP 端口 让外挂服务器做附加处理

阻塞外挂 TCP 端口 让外挂服务器做附加处理

时间:2024-03-30 22:34:18浏览次数:21  
标签:外挂 socket socket2 端口 send TCP 4200 buf socket3

// 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

相关文章

  • Java基础 TCP协议下,收发数据代码实现
     --------------------------------------------------------------------------------------------------------------------------------- 代码实现:1.发送数据:publicstaticvoidmain(String[]args)throwsException{//1.创建Socket对象。细节:在创建对象的同......
  • 总结TCP各类知识点
    前言本篇博客博主将详细地介绍TCP有关知识点,坐好板凳发车啦~一.TCP特点1.有连接TCP传输的过程中类似于打电话的各个过程2.可靠传输通过TCP自身的多种机制来保证可靠传输3.面向字节流内容是以字节的方式来进行发送与接收4.缓冲区TCP有接收缓冲区,也有发送缓冲区全双工......
  • nbtstat /?命令参数 显示使用NBT(NetBIOS over TCP/IP)的协议统计信息和当前TCP/IP连接
    NBTSTAT(NetBIOSoverTCP/IPStatistics)是一个用于显示和更新NetBIOS名称缓存、NetBIOS名称表和NetBIOS会话表的Windows命令行实用程序。它允许用户查看当前网络上的NetBIOS名称信息,以便诊断网络连接问题和执行基本的网络故障排除。NetBIOS是一种用于在局域网中进行通信的协议,它......
  • tcp三次握手
    tcp是可靠的传输协议。为什么这么说?首先我们得了解一下他的报文格式。源端口号和目的端口号,数据根据这两个端口号决定发给哪个应用。2.序号,只是让包有序一点而已。3.确认序列呢。顾名思义,就是确认对方有没有收到。如果对方没收到,要重新发送,直到送达。解决丢包问题的。4.还......
  • CAPL如何使用socket套接字实现TCP通信(数据传输)
    书接上回《CAPL如何使用socket套接字实现TCP通信(建立连接)》,当TCP建立连接后,就可以传输数据了。不管是client还是server,都是使用相同的函数传输应用层数据。tcpSend(clientSocket,"12345",5);但这里有一点值得注意:server端传输数据的socket是serverDataSocket,而不是s......
  • TCP三次握手、四次挥手出现意外情况时,如何保证稳定可靠?
    TCP作为一个靠谱的协议,在传输数据的前后,需要在双端之间建立连接,并在双端各自维护连接的状态。TCP并没有什么特别之处,在面对多变的网络情况,也只能通过不断的重传和各种算法来保证可靠性。建立连接前,TCP会通过三次握手来保证双端状态正确,然后就可以正常传输数据了。当数据传......
  • TCP/IP:互联网通信的核心协议
    引言在当今数字化时代,互联网已经成为人类社会不可或缺的一部分,而TCP/IP协议则是支撑互联网运作的关键。无论是发送电子邮件、浏览网页,还是进行视频通话,TCP/IP协议都在背后默默地发挥着作用。本文将引领读者深入了解TCP/IP协议的核心概念,从其起源、结构到应用,全方位解析这一......
  • 用docker创建nginx反向代理tcp流量
    有这样一个需求,需要反向代理一个tcp连接,我打算用nginx来做,比较简单的实现掉./conf/nginx.conf配置文件usernginx;worker_processesauto;error_log/var/log/nginx/error.lognotice;pid/var/run/nginx.pid;events{worker_connections1024;}......
  • Linux下TCP/IP编程--TCP实战
    之前尝试过windows下的简单TCP客户端服务器编写,这次尝试下一下Linux环境下的TCP客户端代码#include<stdio.h>#include<stdlib.h>#include<string.h>#include<unistd.h>#include<sys/socket.h>#include<netinet/in.h>#include<arpa/inet.h>structC......
  • 在Linux中,如何追踪TCP连接和网络数据包,如使用tcpdump或Wireshark?
    在Linux环境中,追踪TCP连接和网络数据包主要通过使用命令行工具tcpdump和图形化网络分析软件Wireshark来实现。以下是详细的操作步骤:1.使用tcpdumptcpdump是一个强大的命令行网络抓包工具,用于实时捕获和分析网络流量。以下是如何使用tcpdump追踪TCP连接和数据包:1.基本用法......