Skip to content

Commit

Permalink
3.0.176
Browse files Browse the repository at this point in the history
  • Loading branch information
Bureau Audit committed Mar 22, 2022
1 parent affff41 commit 90d9ba3
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 50 deletions.
17 changes: 11 additions & 6 deletions Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ BufferInitialize (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sUnable to open outfile '%S'%s (error %u).",
COLOR_RED, pBuffer->szFileName, COLOR_RESET, GetLastError()
"[!] %sUnable to open outfile%s '%S' (error %u).",
COLOR_RED, COLOR_RESET,
pBuffer->szFileName, GetLastError()
);
return FALSE;
}
Expand Down Expand Up @@ -95,7 +96,8 @@ BufferClose (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sUnable to save buffer%s.", COLOR_RED, COLOR_RESET
"[!] %sUnable to save buffer%s.",
COLOR_RED, COLOR_RESET
);
return FALSE;
}
Expand Down Expand Up @@ -156,7 +158,8 @@ BufferWrite (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sUnable to save buffer%s.", COLOR_RED, COLOR_RESET
"[!] %sUnable to save buffer%s.",
COLOR_RED, COLOR_RESET
);
return 0;
}
Expand Down Expand Up @@ -267,7 +270,8 @@ BufferWriteFromFile (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sCannot get file size%s (error %u).", COLOR_RED, COLOR_RESET, GetLastError()
"[!] %sCannot get file size%s (error %u).",
COLOR_RED, COLOR_RESET, GetLastError()
);
return 0;
}
Expand All @@ -286,7 +290,8 @@ BufferWriteFromFile (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sCannot read file %s (error %u).", COLOR_RED, COLOR_RESET, GetLastError()
"[!] %sCannot read file%s (error %u).",
COLOR_RED, COLOR_RESET, GetLastError()
);
break;
}
Expand Down
13 changes: 8 additions & 5 deletions Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ Process (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sDC Locator is disabled, but no domain specified%s.", COLOR_RED, COLOR_RESET
"[!] %sDC Locator is disabled, but no domain specified%s.",
COLOR_RED, COLOR_RESET
);
return FALSE;
}
Expand Down Expand Up @@ -282,8 +283,8 @@ Process (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_CRITICAL,
"[!] %sUnable to open table file '%S'%s (error %u).",
COLOR_RED, szDirectory, COLOR_RESET, GetLastError()
"[!] %sUnable to open table file%s '%S' (error %u).",
COLOR_RED, COLOR_RESET, szDirectory, GetLastError()
);
pGlobalConfig->TableFile.hFile = NULL;
return FALSE;
Expand Down Expand Up @@ -400,7 +401,8 @@ Process (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sUnable to enumerate trust (error %u).%s", COLOR_RED, dwResult, COLOR_RESET
"[!] %sUnable to enumerate trust (error %u).%s",
COLOR_RED, dwResult, COLOR_RESET
);
}
else
Expand Down Expand Up @@ -528,7 +530,8 @@ pLocateDc (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sUnable to locate DC for domain '%S'%s (error %u).", COLOR_RED, szDomainName, COLOR_RESET, dwResult
"[!] %sUnable to locate DC for domain '%S'%s (error %u).",
COLOR_RED, szDomainName, COLOR_RESET, dwResult
);
return FALSE;
}
Expand Down
3 changes: 2 additions & 1 deletion Filters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ GetFilter (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sUnknown filter '%S'.%s", COLOR_RED, szFilter, COLOR_RESET
"[!] %sUnknown filter%s '%S'.",
COLOR_RED, COLOR_RESET, szFilter
);
return FALSE;
}
Expand Down
29 changes: 18 additions & 11 deletions LDAP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ LdapProcessRequest (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sCannot allocate memory%s (error %u).", COLOR_RED, COLOR_RESET, GetLastError()
"[!] %sCannot allocate memory%s (error %u).",
COLOR_RED, COLOR_RESET, GetLastError()
);
return FALSE;
}
Expand All @@ -286,7 +287,8 @@ LdapProcessRequest (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sCannot allocate memory%s (error %u).", COLOR_RED, COLOR_RESET, GetLastError()
"[!] %sCannot allocate memory%s (error %u).",
COLOR_RED, COLOR_RESET, GetLastError()
);
return FALSE;
}
Expand Down Expand Up @@ -412,7 +414,8 @@ LdapProcessRequest (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sCannot allocate memory%s (error %u).", COLOR_RED, COLOR_RESET, GetLastError()
"[!] %sCannot allocate memory%s (error %u).",
COLOR_RED, COLOR_RESET, GetLastError()
);
return FALSE;
}
Expand Down Expand Up @@ -522,7 +525,8 @@ LdapProcessRequest (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sCannot allocate memory%s (error %u).", COLOR_RED, COLOR_RESET, GetLastError()
"[!] %sCannot allocate memory%s (error %u).",
COLOR_RED, COLOR_RESET, GetLastError()
);

if (bBufferOpen == TRUE)
Expand Down Expand Up @@ -1080,8 +1084,8 @@ LdapProcessRequest (
else
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sUnknwon boolean value ('%S').%s",
COLOR_RED, ppValue[0], COLOR_RESET
"[!] %sUnknwon boolean value%s ('%S').",
COLOR_RED, COLOR_RESET, ppValue[0]
);
}
}
Expand Down Expand Up @@ -1277,8 +1281,8 @@ pLdapOpenConnection (
ulResult = LdapGetLastError();
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sUnable to open LDAP connection to '%S'%s (error %u: %s).",
COLOR_RED, szServerName, COLOR_RESET, ulResult, ldap_err2stringA(ulResult)
"[!] %sUnable to open LDAP connection%s to '%S' (error %u: %s).",
COLOR_RED, COLOR_RESET, szServerName, ulResult, ldap_err2stringA(ulResult)
);
return NULL;
}
Expand All @@ -1288,7 +1292,8 @@ pLdapOpenConnection (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sUnable to connect to LDAP server%s (error %u: %s).", COLOR_RED, COLOR_RESET, ulResult, ldap_err2stringA(ulResult)
"[!] %sUnable to connect to LDAP server%s (error %u: %s).",
COLOR_RED, COLOR_RESET, ulResult, ldap_err2stringA(ulResult)
);
ldap_unbind(pLdapHandle);
return NULL;
Expand Down Expand Up @@ -1367,7 +1372,8 @@ pLdapOpenConnection (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sUnable to bind to LDAP server%s (error %u: %s).", COLOR_RED, COLOR_RESET, ulResult, ldap_err2stringA(ulResult)
"[!] %sUnable to bind to LDAP server%s (error %u: %s).",
COLOR_RED, COLOR_RESET, ulResult, ldap_err2stringA(ulResult)
);
ldap_unbind(pLdapHandle);
return NULL;
Expand Down Expand Up @@ -1535,7 +1541,8 @@ pWriteTableInfo (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sData type unknown.%s", COLOR_RED, COLOR_RESET
"[!] %sData type unknown%s.",
COLOR_RED, COLOR_RESET
);
return FALSE;
}
Expand Down
3 changes: 2 additions & 1 deletion MLA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ MlaAddFileFromFile (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sCannot get file size%s (error %u).", COLOR_RED, COLOR_RESET, GetLastError()
"[!] %sCannot get file size%s (error %u).",
COLOR_RED, COLOR_RESET, GetLastError()
);
goto End;
}
Expand Down
Binary file modified ORADAD.rc
Binary file not shown.
41 changes: 24 additions & 17 deletions Sysvol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include "ORADAD.h"
#include "lz4/xxhash.h"

// In this file, errors are treated as warning (which may be legitimate for permissions on GPO
// not authorizing access) and to not worry users

#define SYSVOL_ROW_COUNT 14
#define GUID_STR_SIZE 38 // {23456789-1234-6789-1234-678901234567}

Expand Down Expand Up @@ -129,8 +132,8 @@ ProcessSysvol (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sUnable to logon with explicit credentials (error %u).%s",
COLOR_RED, GetLastError(), COLOR_RESET
"[!] %sUnable to logon with explicit credentials%s (error %u).",
COLOR_RED, COLOR_RESET, GetLastError()
);
goto End;
}
Expand Down Expand Up @@ -172,8 +175,8 @@ ProcessSysvol (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sUnable to logon with explicit credentials (error %u).%s",
COLOR_RED, GetLastError(), COLOR_RESET
"[!] %sUnable to logon with explicit credentials%s (error %u).",
COLOR_RED, COLOR_RESET, GetLastError()
);
goto End;
}
Expand Down Expand Up @@ -432,9 +435,9 @@ pProcessSysvolFile (
dwInitialError = GetLastError();
Log(
__FILE__, __FUNCTION__, __LINE__,
(dwInitialError == ERROR_ACCESS_DENIED) ? LOG_LEVEL_VERBOSE : LOG_LEVEL_ERROR,
"[!] %sCannot open sysvol file '%S'%s (error %u).",
COLOR_RED, szFileName, COLOR_RESET, dwInitialError
(dwInitialError == ERROR_ACCESS_DENIED) ? LOG_LEVEL_VERBOSE : LOG_LEVEL_WARNING,
"[!] %sCannot open sysvol file%s '%S' (error %u).",
COLOR_YELLOW, COLOR_RESET, szFileName, dwInitialError
);
bHaveFileSecurityInfo = FALSE;
}
Expand All @@ -443,9 +446,9 @@ pProcessSysvolFile (
if (bResult == FALSE)
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sCannot get file attributes for '%S'%s (error %u).",
COLOR_RED, szFileName, COLOR_RESET, GetLastError()
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_WARNING,
"[!] %sCannot get file attributes%s for '%S' (error %u).",
COLOR_YELLOW, COLOR_RESET, szFileName, GetLastError()
);
bHaveFileInfo = FALSE;
}
Expand Down Expand Up @@ -476,8 +479,9 @@ pProcessSysvolFile (
if (dwRet != ERROR_SUCCESS)
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sCannot get security descriptor for '%S' (error %u).%s", COLOR_RED, szFileName, dwRet, COLOR_RESET
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_WARNING,
"[!] %sCannot get security descriptor%s for '%S' (error %u).",
COLOR_YELLOW, COLOR_RESET, szFileName, dwRet
);
bHaveFileSecurityInfo = FALSE;
}
Expand All @@ -487,8 +491,9 @@ pProcessSysvolFile (
if (bResult == FALSE)
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sCannot get security descriptor control for '%S' (error %u).%s", COLOR_RED, szFileName, GetLastError(), COLOR_RESET
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_WARNING,
"[!] %sCannot get security descriptor control%s for '%S' (error %u).",
COLOR_YELLOW, COLOR_RESET, szFileName, GetLastError()
);
bHaveFileSecurityInfo = FALSE;
}
Expand All @@ -505,7 +510,8 @@ pProcessSysvolFile (
// SD should never be absolute, if necessary, should convert it here. For now, fail.
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_WARNING,
"[!] %sSecurity descriptor for '%S' is not relative.%s", COLOR_YELLOW, szFileName, COLOR_RESET
"[!] %sSecurity descriptor for '%S' is not relative%s.",
COLOR_YELLOW, szFileName, COLOR_RESET
);
bHaveFileSecurityInfo = FALSE;
}
Expand Down Expand Up @@ -657,8 +663,9 @@ pProcessSysvolFile (
{
dwErrorCode = GetLastError();
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sCannot open sysvol file '%S' for read (error %u).%s", COLOR_RED, szFileName, dwErrorCode, COLOR_RESET
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_WARNING,
"[!] %sCannot open sysvol file%s '%S' for read (error %u).",
COLOR_YELLOW, COLOR_RESET, szFileName, dwErrorCode
);
}
else
Expand Down
3 changes: 2 additions & 1 deletion Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ LPWSTRtoLPSTR (
Fail:
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sLPWSTRtoLPSTR(%S) failed.%s", COLOR_RED, szToConvert, COLOR_RESET
"[!] %sLPWSTRtoLPSTR(%S) failed%s.",
COLOR_RED, szToConvert, COLOR_RESET
);

return NULL;
Expand Down
3 changes: 2 additions & 1 deletion XML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,8 @@ pXmlParseRequest (
{
Log(
__FILE__, __FUNCTION__, __LINE__, LOG_LEVEL_ERROR,
"[!] %sCannot allocate memory%s (error %u).", COLOR_RED, COLOR_RESET, GetLastError()
"[!] %sCannot allocate memory%s (error %u).",
COLOR_RED, COLOR_RESET, GetLastError()
);
break;
}
Expand Down
Loading

0 comments on commit 90d9ba3

Please sign in to comment.