-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (27 loc) · 688 Bytes
/
main.cpp
File metadata and controls
33 lines (27 loc) · 688 Bytes
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
// FOR EXAMPLE PURPOSE ONLY!
#include "port-scanner.hpp"
using namespace std;
int main() {
vector <PortStatus> ports;
PortStatus port;
port.port = 22;
ports.push_back(port);
port.port = 43;
ports.push_back(port);
port.port = 57;
ports.push_back(port);
port.port = 80;
ports.push_back(port);
port.port = 443;
ports.push_back(port);
port.port = 3306;
ports.push_back(port);
port.port = 26666;
ports.push_back(port);
PortScanner::TCP tcp = PortScanner::TCP();
tcp.scan("127.0.0.1", &ports, 500, 2, false);
for (auto &v: ports) {
printf("PORT: %i STATUS: %i\n", v.port, v.status);
}
return 0;
}