Esempio n. 1
0
bool CNetworkDetectionBase::SetHost(const rho::String& szHost)
{
	if (szHost.length() > 7 && szHost.compare(0, 7, "http://") == 0)
		m_szHost = szHost.substr(7);
	else if (szHost.length() > 8 && szHost.compare(0, 8, "https://") == 0)
		m_szHost = szHost.substr(8);
	else
		m_szHost = szHost;
	return true;
}
Esempio n. 2
0
DWORD ConvertToType(rho::String neonType)
{
	std::transform(neonType.begin(), neonType.end(), neonType.begin(), ::tolower);
	if (neonType.compare("string") == 0)
		return 1;
	else if (neonType.compare("binary") == 0)
		return 3;
	else if (neonType.compare("dword") == 0)
		return 4;
	else if (neonType.compare("multisz") == 0)
		return 7;
	else
	{
		LOG(WARNING) + "Unrecognised registry type, received " + neonType;
		return 1;
	}
}
Esempio n. 3
0
HKEY ConvertToHKEY(rho::String neonKey)
{
	std::transform(neonKey.begin(), neonKey.end(), neonKey.begin(), ::tolower);
	if (neonKey.compare("hkcr") == 0)
		return HKEY_CLASSES_ROOT;
	else if (neonKey.compare("hkcu") == 0)
		return HKEY_CURRENT_USER;
	else if (neonKey.compare("hklm") == 0)
		return HKEY_LOCAL_MACHINE;
	else if (neonKey.compare("hku") == 0)
		return HKEY_USERS;
	else
	{
		LOG(WARNING) + "Unrecognised hive value, received " + neonKey;
		return HKEY_USERS;
	}
}