-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathantivirus_checker.h
More file actions
46 lines (35 loc) · 1.47 KB
/
Copy pathantivirus_checker.h
File metadata and controls
46 lines (35 loc) · 1.47 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
#ifndef ANTIVIRUS_CHECKER_H
#define ANTIVIRUS_CHECKER_H
#include <string>
#include <vector>
struct AntivirusProductInfo {
std::string name;
bool enabled = false; // real-time protection ON hai ya nahi
bool upToDate = false; // virus definitions up to date hain ya nahi
unsigned long rawState = 0; // Windows Security Center ka raw productState value
std::string exePath;
};
struct AntivirusCheckResult {
bool wmiAvailable = false;
bool defenderServiceQueried = false;
bool defenderServiceRunning = false;
std::vector<AntivirusProductInfo> products;
std::vector<std::string> warnings;
std::vector<std::string> suggestions;
int score = 100; // 100 = safe, 0 = high risk
std::string riskLevel; // Low / Medium / High / Critical
};
class AntivirusChecker {
public:
AntivirusChecker();
// Poora scan: registered AV products + Windows Defender service + risk report
AntivirusCheckResult runFullCheck();
// Windows Security Center ka productState bitmask decode karta hai
static void decodeProductState(unsigned long state, bool& enabled, bool& upToDate);
private:
bool queryInstalledProducts(AntivirusCheckResult& result) const;
bool queryDefenderService(AntivirusCheckResult& result) const;
void evaluateRisk(AntivirusCheckResult& result) const;
void buildSuggestions(AntivirusCheckResult& result) const;
};
#endif // ANTIVIRUS_CHECKER_H