Skip to content

Commit

Permalink
Merge pull request #11 from riverar/apisetmap/feature/show-sealed-nam…
Browse files Browse the repository at this point in the history
…espaces

Print API set namespace sealed status
  • Loading branch information
zodiacon authored Jan 2, 2019
2 parents 3bdb36c + b6d4af8 commit 0cb3514
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
6 changes: 4 additions & 2 deletions APISetMap/APISetMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

void PrintHeader() {
printf("ApiSetMap - list API Set mappings - version 1.0\n");
printf("(C)2017 Alex Ionescu and Pavel Yosifovich\n");
printf("(c) Alex Ionescu, Pavel Yosifovich, and Contributors\n");
printf("http://www.alex-ionescu.com\n\n");
}

Expand All @@ -22,13 +22,15 @@ int main() {
UNICODE_STRING nameString, valueString;

for (ULONG i = 0; i < apiSetMap->Count; i++) {
auto isSealed = nsEntry->Flags & API_SET_SCHEMA_ENTRY_FLAGS_SEALED != 0;

//
// Build a UNICODE_STRING for this contract
//
nameString.MaximumLength = static_cast<USHORT>(nsEntry->NameLength);
nameString.Length = static_cast<USHORT>(nsEntry->NameLength);
nameString.Buffer = reinterpret_cast<PWCHAR>(apiSetMapAsNumber + nsEntry->NameOffset);
printf("%56wZ.dll -> {", &nameString);
printf("%56wZ.dll -> %s{", &nameString, (isSealed ? "s" : "" ));

//
// Iterate the values (i.e.: the hosts for this set)
Expand Down
7 changes: 1 addition & 6 deletions APISetMap/ApiSet.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#pragma once

LONG
RtlCompareUnicodeString(
_In_ PUNICODE_STRING Src1,
_In_ PUNICODE_STRING Src2,
_In_ BOOLEAN CaseInSensitive
);
#define API_SET_SCHEMA_ENTRY_FLAGS_SEALED 1

typedef struct _API_SET_NAMESPACE {
ULONG Version;
Expand Down

0 comments on commit 0cb3514

Please sign in to comment.