Panoptes 1.0.0
Endpoint Detection and Response
Loading...
Searching...
No Matches
Test_PanoptesPE.cpp
Go to the documentation of this file.
1#include "gtest/gtest.h"
2#include "PanoptesPE.h"
3
4namespace PE {
5
6 TEST(PEScan, GetImports) {
7 PortableExecutable* pe = new PortableExecutable("C:\\Windows\\System32\\notepad.exe");
8 std::vector<std::string> result = pe->GetImports();
9 EXPECT_GT(result.size(), 0);
10 }
11
12 TEST(PEScan, GetSections) {
13 PortableExecutable* pe = new PortableExecutable("C:\\Windows\\System32\\notepad.exe");
14 std::vector<std::pair<std::string, double>> result = pe->GetSections();
15 EXPECT_GT(result.size(), 0);
16 }
17
18 TEST(PEScan, CheckIfSigned) {
19 PortableExecutable* pe = new PortableExecutable("C:\\Windows\\System32\\notepad.exe");
20 bool result = pe->CheckIfSigned();
21 EXPECT_EQ(result, false);
22 }
23}
bool CheckIfSigned()
Check if the portable executable is signed.
Definition pe-scan.cpp:65
std::vector< std::pair< std::string, double > > GetSections()
Get the sections from the portable executable.
Definition pe-scan.cpp:45
std::vector< std::string > GetImports()
Get the imports from the portable executable.
Definition pe-scan.cpp:20
ULONG result
Definition events.cpp:22
TEST(PEScan, GetImports)