mirror of https://github.com/vxunderground/VX-API
parent
83ea0dc52a
commit
20e4829b77
|
@ -3,7 +3,7 @@ managed by [vx-underground](https://vx-underground.org) | follow us on [Twitter]
|
|||
|
||||
# VX-API
|
||||
|
||||
Version: 2.0.342
|
||||
Version: 2.0.347
|
||||
|
||||
Developer: smelly__vx
|
||||
|
||||
|
@ -141,6 +141,7 @@ You're free to use this in any manner you please. You do not need to use this en
|
|||
| ConvertIPv4IpAddressStructureToString | smelly__vx | Network Connectivity |
|
||||
| ConvertIPv4StringToUnsignedLong | smelly__vx | Network Connectivity |
|
||||
| SendIcmpEchoMessageToIPv4Host | smelly__vx | Network Connectivity |
|
||||
| ConvertIPv4IpAddressUnsignedLongToString | smelly__vx | Network Connectivity |
|
||||
|
||||
|
||||
# Todo list
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
#include "Win32Helper.h"
|
||||
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 6101)
|
||||
BOOL ConvertIPv4IpAddressUnsignedLongToStringW(_In_ ULONG Address, _Out_ PWCHAR Buffer)
|
||||
{
|
||||
#pragma warning( pop )
|
||||
RTLIPV4ADDRESSTOSTRINGW RtlIpv4AddressToStringW = NULL;
|
||||
HMODULE hModule = NULL;
|
||||
WCHAR DisposeableObject[32] = { 0 };
|
||||
IN_ADDR InAddress = { 0 };
|
||||
|
||||
if (Address == 0)
|
||||
return FALSE;
|
||||
|
||||
InAddress.S_un.S_addr = Address;
|
||||
|
||||
if (Buffer == NULL)
|
||||
return FALSE;
|
||||
|
||||
hModule = GetModuleHandleEx2W(L"ntdll.dll");
|
||||
if (hModule == NULL)
|
||||
return FALSE;
|
||||
|
||||
RtlIpv4AddressToStringW = (RTLIPV4ADDRESSTOSTRINGW)GetProcAddressA((DWORD64)hModule, "RtlIpv4AddressToStringW");
|
||||
if (!RtlIpv4AddressToStringW)
|
||||
return FALSE;
|
||||
|
||||
RtlIpv4AddressToStringW(&InAddress, Buffer);
|
||||
|
||||
RtlIpv4AddressToStringW = NULL;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 6101)
|
||||
BOOL ConvertIPv4IpAddressUnsignedLongToStringA(_In_ ULONG Address, _Out_ PCHAR Buffer)
|
||||
{
|
||||
#pragma warning( pop )
|
||||
RTLIPV4ADDRESSTOSTRINGA RtlIpv4AddressToStringA = NULL;
|
||||
HMODULE hModule = NULL;
|
||||
CHAR DisposeableObject[32] = { 0 };
|
||||
IN_ADDR InAddress = { 0 };
|
||||
|
||||
if (Address == 0)
|
||||
return FALSE;
|
||||
|
||||
InAddress.S_un.S_addr = Address;
|
||||
|
||||
if (Buffer == NULL)
|
||||
return FALSE;
|
||||
|
||||
hModule = GetModuleHandleEx2W(L"ntdll.dll");
|
||||
if (hModule == NULL)
|
||||
return FALSE;
|
||||
|
||||
RtlIpv4AddressToStringA = (RTLIPV4ADDRESSTOSTRINGA)GetProcAddressA((DWORD64)hModule, "RtlIpv4AddressToStringA");
|
||||
if (!RtlIpv4AddressToStringA)
|
||||
return FALSE;
|
||||
|
||||
RtlIpv4AddressToStringA(&InAddress, Buffer);
|
||||
|
||||
RtlIpv4AddressToStringA = NULL;
|
||||
|
||||
return TRUE;
|
||||
}
|
|
@ -136,6 +136,7 @@
|
|||
<ClCompile Include="CharStringToWCharString.cpp" />
|
||||
<ClCompile Include="CheckRemoteDebuggerPresentEx.cpp" />
|
||||
<ClCompile Include="ConvertIPv4IpAddressStructureToString.cpp" />
|
||||
<ClCompile Include="ConvertIPv4IpAddressUnsignedLongToString.cpp" />
|
||||
<ClCompile Include="ConvertIPv4StringToUnsignedLong.cpp" />
|
||||
<ClCompile Include="CopyMemoryEx.cpp" />
|
||||
<ClCompile Include="CreateFileFromDsCopyFromSharedFile.cpp" />
|
||||
|
|
|
@ -420,6 +420,9 @@
|
|||
<ClCompile Include="ConvertIPv4IpAddressStructureToString.cpp">
|
||||
<Filter>Source Files\Windows API Helper Functions\Network Connectivity</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ConvertIPv4IpAddressUnsignedLongToString.cpp">
|
||||
<Filter>Source Files\Windows API Helper Functions\Network Connectivity</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Internal.h">
|
||||
|
|
|
@ -293,4 +293,6 @@ BOOL SendIcmpEchoMessageToIPv4HostA(_In_ PCHAR IpAddress, _Inout_ PDWORD Status,
|
|||
ULONG ConvertIPv4StringToUnsignedLongW(_In_ PWCHAR IpAddress);
|
||||
ULONG ConvertIPv4StringToUnsignedLongA(_In_ PCHAR IpAddress);
|
||||
BOOL ConvertIPv4IpAddressStructureToStringW(_In_ PIN_ADDR Address, _Out_ PWCHAR Buffer);
|
||||
BOOL ConvertIPv4IpAddressStructureToStringA(_In_ PIN_ADDR Address, _Out_ PCHAR Buffer);
|
||||
BOOL ConvertIPv4IpAddressStructureToStringA(_In_ PIN_ADDR Address, _Out_ PCHAR Buffer);
|
||||
BOOL ConvertIPv4IpAddressUnsignedLongToStringW(_In_ ULONG Address, _Out_ PWCHAR Buffer);
|
||||
BOOL ConvertIPv4IpAddressUnsignedLongToStringA(_In_ ULONG Address, _Out_ PWCHAR Buffer);
|
Loading…
Reference in New Issue