mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-04-19 13:42:55 +00:00
Fix formatting
This commit is contained in:
parent
4ec4055e4b
commit
c58f6c9742
@ -90,7 +90,8 @@ namespace
|
||||
});
|
||||
|
||||
memcpy(buffer.get(), request.source_data, request.source_data_size);
|
||||
translation_hints = generate_translation_hints(request.process_id, request.target_address, request.source_data_size);
|
||||
translation_hints = generate_translation_hints(request.process_id, request.target_address,
|
||||
request.source_data_size);
|
||||
|
||||
if (!translation_hints)
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ VOID
|
||||
KeGenericCallDpc(
|
||||
_In_ PKDEFERRED_ROUTINE Routine,
|
||||
_In_opt_ PVOID Context
|
||||
);
|
||||
);
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
@ -25,7 +25,7 @@ _IRQL_requires_same_
|
||||
VOID
|
||||
KeSignalCallDpcDone(
|
||||
_In_ PVOID SystemArgument1
|
||||
);
|
||||
);
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
@ -35,7 +35,7 @@ _IRQL_requires_same_
|
||||
LOGICAL
|
||||
KeSignalCallDpcSynchronize(
|
||||
_In_ PVOID SystemArgument2
|
||||
);
|
||||
);
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
@ -51,7 +51,7 @@ MmAllocateContiguousNodeMemory(
|
||||
_In_opt_ PHYSICAL_ADDRESS BoundaryAddressMultiple,
|
||||
_In_ ULONG Protect,
|
||||
_In_ NODE_REQUIREMENT PreferredNode
|
||||
);
|
||||
);
|
||||
#endif
|
||||
|
||||
// ----------------------------------------
|
||||
@ -61,7 +61,7 @@ VOID
|
||||
NTAPI
|
||||
RtlCaptureContext(
|
||||
_Out_ PCONTEXT ContextRecord
|
||||
);
|
||||
);
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
@ -81,7 +81,7 @@ VOID
|
||||
KeStackAttachProcess(
|
||||
__inout PEPROCESS PROCESS,
|
||||
__out PRKAPC_STATE ApcState
|
||||
);
|
||||
);
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
@ -89,7 +89,7 @@ NTKERNELAPI
|
||||
VOID
|
||||
KeUnstackDetachProcess(
|
||||
__in PRKAPC_STATE ApcState
|
||||
);
|
||||
);
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
@ -98,7 +98,7 @@ NTSTATUS
|
||||
PsLookupProcessByProcessId(
|
||||
IN HANDLE ProcessId,
|
||||
OUT PEPROCESS* Process
|
||||
);
|
||||
);
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
@ -106,7 +106,7 @@ NTKERNELAPI
|
||||
PVOID
|
||||
PsGetProcessSectionBaseAddress(
|
||||
__in PEPROCESS Process
|
||||
);
|
||||
);
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
@ -115,7 +115,7 @@ PPEB
|
||||
NTAPI
|
||||
PsGetProcessPeb(
|
||||
IN PEPROCESS Process
|
||||
);
|
||||
);
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
@ -123,7 +123,7 @@ NTKERNELAPI
|
||||
PCSTR
|
||||
PsGetProcessImageFileName(
|
||||
__in PEPROCESS Process
|
||||
);
|
||||
);
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
@ -142,7 +142,7 @@ NtCreateFile(
|
||||
_In_ ULONG CreateOptions,
|
||||
_In_reads_bytes_opt_(EaLength) PVOID EaBuffer,
|
||||
_In_ ULONG EaLength
|
||||
);
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ namespace process
|
||||
this->own_ = obj.own_;
|
||||
this->handle_ = obj.handle_;
|
||||
|
||||
if(this->own_ && this->handle_)
|
||||
if (this->own_ && this->handle_)
|
||||
{
|
||||
ObReferenceObject(this->handle_);
|
||||
}
|
||||
|
@ -134,12 +134,21 @@ namespace std
|
||||
};
|
||||
|
||||
|
||||
template<class T>
|
||||
struct remove_extent { typedef T type; };
|
||||
template <class T>
|
||||
struct remove_extent
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_extent<T[]> { typedef T type; };
|
||||
template <class T>
|
||||
struct remove_extent<T[]>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T, std::size_t N>
|
||||
struct remove_extent<T[N]> { typedef T type; };
|
||||
template <class T, std::size_t N>
|
||||
struct remove_extent<T[N]>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ std::vector<uint8_t> load_resource(const int id)
|
||||
auto* const handle = LoadResource(nullptr, res);
|
||||
if (!handle) return {};
|
||||
|
||||
const auto* data_ptr =static_cast<uint8_t*>(LockResource(handle));
|
||||
const auto* data_ptr = static_cast<uint8_t*>(LockResource(handle));
|
||||
const auto data_size = SizeofResource(nullptr, res);
|
||||
|
||||
std::vector<uint8_t> data{};
|
||||
@ -78,7 +78,7 @@ void unsafe_main(const int /*argc*/, char* /*argv*/[])
|
||||
{
|
||||
const auto driver_file = extract_driver();
|
||||
|
||||
driver driver{ driver_file, "MomoLul"};
|
||||
driver driver{driver_file, "MomoLul"};
|
||||
const driver_device driver_device{R"(\\.\HelloDev)"};
|
||||
|
||||
std::string pid_str{};
|
||||
|
Loading…
x
Reference in New Issue
Block a user