[+] AWS and centos detection

This commit is contained in:
Reece Wilson 2023-12-21 13:20:07 +00:00
parent 2c9d19591b
commit de739b8e1f

View File

@ -171,10 +171,17 @@ namespace Aurora::SWInfo
osInfo.bIsEnterprise = false;
// redhat
if (AuFS::ReadString("/etc/system-release-cpe", a))
{
// redhat
osInfo.bIsEnterprise |= a.find("nterprise") != AuString::npos; // cpe:?????:enterprise_linux:??????
// aws
osInfo.bIsServer |= a.find("ami") != AuString::npos; // al202?-ami-202?.?.????.0-kernel-?.?-x86_64
}
else
{
// centos and similar
osInfo.bIsServer |= AuFS::FileExists("/etc/redhat-release");
}
}