-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patharp_attacker.h
54 lines (45 loc) · 969 Bytes
/
arp_attacker.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/************************************************
*
* Auther: winway
*
* Version: 1.0
*
* Introduction: send fake arp packets to one of
* the PC or all of the PCs in your LAN to deceive
* it, so that the PC(s) can not find the geteway.
*
************************************************/
#ifndef ARP_ATTACKER_H
#define ARP_ATTACKER_H
#define ETH_LEN 6
#define MAC_LEN 6
#define IP_LEN 16
extern int ok_flag;
extern char eth[ETH_LEN];
extern char local_ip[IP_LEN];
extern char local_mac[MAC_LEN];
extern char attack_ip[IP_LEN];
extern char attack_mac[MAC_LEN];
extern char fake_ip[IP_LEN];
extern char fake_mac[MAC_LEN];
/* *
* read configuration
* */
void read_config();
/* *
* get local IP & MAC
* */
void get_local_ip_mac();
/* *
* analyse ARP reply packet to get dest MAC
* */
void arp_parse();
/* *
* send ARP request packet to dst host
* */
void build_arp_request();
/* *
* send ARP deceive packet
* */
void build_arp_reply();
#endif