-
Notifications
You must be signed in to change notification settings - Fork 0
/
nodes.h
89 lines (76 loc) · 1.53 KB
/
nodes.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#ifndef NODES_H
#define NODES_H
#include <QString>
#include <QList>
namespace Node
{
typedef struct Location
{
double x;
double y;
} Location;
typedef struct Security
{
int level;
int traceTime;
int proxyTime;
int portsToCrack;
QString adminIP;
} Security;
typedef struct Admin
{
QString type;
bool resetPass;
bool isSuper;
} Admin;
typedef struct Firewall
{
int complexity;
QString solution;
int additionalDelay;
} Firewall;
typedef struct User
{
QString name;
QString pass;
int type;
bool known;
} User;
typedef struct Computer
{
int index;
QString name;
QString ip;
typedef enum Type : int
{
CORPORATE = 1,
HOME = 2,
SERVER = 3,
EMPTY = 4,
EOS = 5
} Type;
Type type;
QString spec;
QString id;
Location location;
bool known;
Security security;
Admin admin;
QList<int> links;
Firewall firewall;
typedef enum Port : int
{
SSH = 22,
FTP = 21,
SMTP = 25,
HTTP = 80,
BLIZZARD = 3724,
SQL = 1433,
MEDICAL = 104,
EOSCON = 3659
} Port;
QList<Port> portsOpen;
QList<User> users;
} Computer;
}
#endif // NODES_H