mirror of
https://github.com/JKornev/hidden
synced 2024-06-16 12:08:05 +00:00
Removed unused code
This commit is contained in:
parent
3c19ea50d6
commit
0332732253
@ -13,23 +13,18 @@ typedef struct _EXCLUDE_FILE_LIST_ENTRY {
|
||||
LIST_ENTRY list;
|
||||
ULONGLONG guid;
|
||||
EXCULE_FILE_PATH path;
|
||||
//UINT32 dirCrc32;
|
||||
//UINT32 type;
|
||||
} EXCLUDE_FILE_LIST_ENTRY, *PEXCLUDE_FILE_LIST_ENTRY;
|
||||
|
||||
typedef struct _EXCLUDE_FILE_CONTEXT {
|
||||
LIST_ENTRY listHead;
|
||||
KSPIN_LOCK listLock;
|
||||
ULONGLONG guidCounter;
|
||||
//UINT32 IVector;
|
||||
UINT32 type;
|
||||
} EXCLUDE_FILE_CONTEXT, *PEXCLUDE_FILE_CONTEXT;
|
||||
|
||||
NTSTATUS AddExcludeListEntry(ExcludeContext Context, PUNICODE_STRING FilePath, UINT32 Type, PExcludeEntryId EntryId);
|
||||
|
||||
BOOLEAN InitFilePathByString(PEXCULE_FILE_PATH path, PUNICODE_STRING FilePath, PUINT32 DirCrc32, UINT32 iv);
|
||||
BOOLEAN FillDirectoryFromPath(PEXCULE_FILE_PATH path, PUNICODE_STRING filePath);
|
||||
//BOOLEAN InitFilePathByDirectory(PEXCULE_FILE_PATH path, PUNICODE_STRING filePath, PUINT32 DirCrc32, UINT32 iv);
|
||||
|
||||
unsigned int GetCrc32(void* buf, unsigned int size, unsigned int ivect);
|
||||
|
||||
@ -62,7 +57,6 @@ NTSTATUS InitializeExcludeListContext(PExcludeContext Context, UINT32 Type)
|
||||
KeInitializeSpinLock(&cntx->listLock);
|
||||
cntx->guidCounter = 0;
|
||||
cntx->type = Type;
|
||||
//cntx->IVector = (UINT32)&InitializeExcludeListContext;
|
||||
|
||||
*Context = cntx;
|
||||
|
||||
@ -103,7 +97,6 @@ NTSTATUS AddExcludeListEntry(ExcludeContext Context, PUNICODE_STRING FilePath, U
|
||||
KLOCK_QUEUE_HANDLE lockHandle;
|
||||
PEXCLUDE_FILE_LIST_ENTRY entry, head;
|
||||
UNICODE_STRING temp;
|
||||
//NTSTATUS status;
|
||||
SIZE_T size;
|
||||
|
||||
UNREFERENCED_PARAMETER(Type);
|
||||
@ -136,10 +129,8 @@ NTSTATUS AddExcludeListEntry(ExcludeContext Context, PUNICODE_STRING FilePath, U
|
||||
temp.Length = 0;
|
||||
temp.MaximumLength = FilePath->Length;
|
||||
|
||||
//status = RtlDowncaseUnicodeString(&temp, FilePath, FALSE);
|
||||
RtlCopyUnicodeString(&temp, FilePath);
|
||||
|
||||
//if (!InitFilePathByString(&entry->path, &temp, &entry->dirCrc32, cntx->IVector))
|
||||
if (!FillDirectoryFromPath(&entry->path, &temp))
|
||||
{
|
||||
ExFreePoolWithTag(entry, EXCLUDE_ALLOC_TAG);
|
||||
@ -147,8 +138,6 @@ NTSTATUS AddExcludeListEntry(ExcludeContext Context, PUNICODE_STRING FilePath, U
|
||||
return STATUS_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
//entry->type = Type;
|
||||
|
||||
// Push new list entry to context
|
||||
|
||||
if (Type == ExcludeRegKey || Type == ExcludeRegValue)
|
||||
@ -157,7 +146,6 @@ NTSTATUS AddExcludeListEntry(ExcludeContext Context, PUNICODE_STRING FilePath, U
|
||||
head = (PEXCLUDE_FILE_LIST_ENTRY)cntx->listHead.Flink;
|
||||
while (head != (PEXCLUDE_FILE_LIST_ENTRY)&cntx->listHead)
|
||||
{
|
||||
//INT res = StrCmpW(&entry->path.fullPath, &head->path.fullPath);
|
||||
INT res = RtlCompareUnicodeString(&entry->path.fullPath, &head->path.fullPath, TRUE);
|
||||
if (res <= 0)
|
||||
break;
|
||||
@ -236,18 +224,13 @@ BOOLEAN CheckExcludeListFile(ExcludeContext Context, PCUNICODE_STRING Path)
|
||||
KLOCK_QUEUE_HANDLE lockHandle;
|
||||
PEXCLUDE_FILE_LIST_ENTRY entry;
|
||||
BOOLEAN result = FALSE;
|
||||
//UINT32 crc32;
|
||||
|
||||
//crc32 = GetCrc32(Path->Buffer, Path->Length, cntx->IVector);
|
||||
|
||||
KeAcquireInStackQueuedSpinLock(&cntx->listLock, &lockHandle);
|
||||
|
||||
entry = (PEXCLUDE_FILE_LIST_ENTRY)cntx->listHead.Flink;
|
||||
while (entry != (PEXCLUDE_FILE_LIST_ENTRY)&cntx->listHead)
|
||||
{
|
||||
if (/*entry->type == ExcludeFile
|
||||
&& entry->dirCrc32 == crc32 // TEMPORARY DISABLED, because checksum isn't support case-insensetive string
|
||||
&&*/ RtlCompareUnicodeString(&entry->path.fullPath, Path, TRUE) == 0)
|
||||
if (RtlCompareUnicodeString(&entry->path.fullPath, Path, TRUE) == 0)
|
||||
{
|
||||
result = TRUE;
|
||||
break;
|
||||
@ -425,17 +408,6 @@ BOOLEAN FillDirectoryFromPath(PEXCULE_FILE_PATH path, PUNICODE_STRING filePath)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN InitFilePathByString(PEXCULE_FILE_PATH path, PUNICODE_STRING FilePath, PUINT32 DirCrc32, UINT32 iv)
|
||||
{
|
||||
if (!FillDirectoryFromPath(path, FilePath))
|
||||
return FALSE;
|
||||
|
||||
if (DirCrc32)
|
||||
*DirCrc32 = GetCrc32(path->dirName.Buffer, path->dirName.Length, iv);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// code from wikipedia.org
|
||||
static const unsigned int g_crc32Table [256] = {
|
||||
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535,
|
||||
|
@ -43,9 +43,9 @@
|
||||
+ Слинковать с IOCTL API lib
|
||||
- Реализовать HiddenCLI
|
||||
+ Портировать драйвер под архитектуру x64
|
||||
- Залить проект на Git
|
||||
+ Залить проект на Git
|
||||
+ Переименовать проект драйвера в Hidden
|
||||
- Привести в порядок все версии билда Release, Debug, ...
|
||||
+ Привести в порядок все версии билда Release, Debug, ...
|
||||
- Добавить в проект конфигурации для сокрытия виртуалок
|
||||
- Сокрытие VMWare Tools
|
||||
- Отреверсить установщик VMWare tools
|
||||
|
Loading…
Reference in New Issue
Block a user