-
Notifications
You must be signed in to change notification settings - Fork 30
/
BannerProcessor.h
48 lines (42 loc) · 1.38 KB
/
BannerProcessor.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
#pragma once
#include "Stdafx.h"
#include "Service.h"
/*!
* Represents a banner processor.
*/
class BannerProcessor
{
public:
/*!
* Processes the banner of a service.
*
* \param service Scanned service.
*/
void Scan(Service* service);
/*!
* Processes the specified service banner.
*
* \param banner Service banner.
* \param processVendor Whether to process vendor level patches appended to the end of the version
* number. This removes the patch level from the CPE version and appends it to
* the end via a semicolon separator.
*
* \return Matching CPE entries.
*/
virtual std::vector<std::string> Scan(const std::string& banner, bool processVendor = true) = 0;
/*!
* Tries to processes the specified service banner with all known implementations of this class.
*
* \param banner Service banner.
* \param processVendor Whether to process vendor level patches appended to the end of the version
* number. This removes the patch level from the CPE version and appends it to
* the end via a semicolon separator.
*
* \return Matching CPE entries.
*/
static std::vector<std::string> AutoProcess(const std::string& banner, bool processVendor = true);
/*!
* Frees up the resources allocated during the lifetime of this instance.
*/
virtual ~BannerProcessor();
};