-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharpspoof.h
38 lines (33 loc) · 927 Bytes
/
arpspoof.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
#ifndef ARPSPOOF_H
#define ARPSPOOF_H
#define WPCAP
#define HAVE_REMOTE
#include <pcap.h>
#include <QThread>
#include <QMutex>
#include <Packet32.h>
#include <synchapi.h>
#include <structure.h>
using namespace std;
class SpoofThread : public QThread
{
Q_OBJECT
public:
SpoofThread(pcap_t *adhandle, pcap_if_t *dev, u_long gate_ip, u_long victim_ip, u_char * gate_mac, u_char * victim_mac);
void makeSpoofpacket(arp_packet &product,u_long tellee_ip, u_long victim_ip, u_char * tellee_mac);
pcap_if_t * dev; pcap_t *adhandle;
u_long gate_ip; u_long victim_ip; u_char gate_mac[6]; u_char victim_mac[6];
int getMac();
arp_packet arppacket_HOST;
arp_packet arppacket_GATE;
u_char selfMac[6];
void stop();
protected:
void run();
private:
QMutex m_lock;
volatile bool stopped;
signals:
void spoofSent(QString);
};
#endif // ARPSPOOF_H