-
Notifications
You must be signed in to change notification settings - Fork 30
/
UbuntuIdentifier.h
44 lines (37 loc) · 1001 Bytes
/
UbuntuIdentifier.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
#pragma once
#include "Stdafx.h"
#include "OperatingSystemIdentifier.h"
#include <unordered_map>
#include <unordered_set>
/*!
* Implements functionality for identifying Ubuntu based on service banners.
*/
class UbuntuIdentifier : public OperatingSystemIdentifier
{
public:
/*!
* Ubuntu distribution names mapped to their version numbers.
*/
static const std::unordered_map<std::string, double> VersionNames;
/*!
* OpenSSH version numbers mapped to the Ubuntu version they came with.
*/
static const std::unordered_map<std::string, double> BundledVersions;
/*!
* List of Long Term Support versions.
*/
static const std::unordered_set<double> LtsVersions;
/*!
* Processes the specified host.
*
* \param host Scanned host.
*
* \return true if the operating system was identified,
* otherwise false.
*/
bool Scan(Host* host) override;
/*!
* Frees up the resources allocated during the lifetime of this instance.
*/
~UbuntuIdentifier() override;
};