This repository was archived by the owner on Jul 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathApp.h
More file actions
56 lines (45 loc) · 1.17 KB
/
Copy pathApp.h
File metadata and controls
56 lines (45 loc) · 1.17 KB
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
55
56
#pragma once
#include <pcapplusplus/Device.h>
class App
{
public:
static constexpr uint16_t DEFAULT_PORT_LOGIN = 15100;
static constexpr uint16_t DEFAULT_PORT_GAME = 15001;
inline const std::string& GetLogFileName() const {
return _logFileName;
}
inline const std::string& GetLogFileExt() const {
return _logFileExt;
}
inline uint16_t GetDstPortLogin() const {
return _dstPortLogin;
}
inline uint16_t GetDstPortGame() const {
return _dstPortGame;
}
inline bool UseOldEncryptionHeaders() const {
return _useOldEncryption;
}
inline bool AlwaysUsePKWareCompression() const {
return _alwaysUsePKWareCompression;
}
App();
int run(int argc, const char* argv[]);
int parse_command_line(int argc, const char* argv[]);
int load_pcapng();
int capture();
int analyse();
void print_usage();
protected:
std::string _pcapngFile;
std::string _logFileName;
std::string _logFileExt;
std::string _interface;
std::string _interfaceIP;
std::string _dstIP;
uint16_t _dstPortLogin = DEFAULT_PORT_LOGIN;
uint16_t _dstPortGame = DEFAULT_PORT_GAME;
bool _useOldEncryption = false;
bool _alwaysUsePKWareCompression = false;
pcpp::RawPacketVector _capturedPackets;
};