mirror of https://github.com/vxunderground/VX-API
parent
0436f06a19
commit
fc578c6782
|
@ -3,7 +3,7 @@ managed by [vx-underground](https://vx-underground.org) | follow us on [Twitter]
|
|||
|
||||
# VX-API
|
||||
|
||||
Version: 2.0.364
|
||||
Version: 2.0.379
|
||||
|
||||
Developer: smelly__vx
|
||||
|
||||
|
@ -146,6 +146,7 @@ You're free to use this in any manner you please. You do not need to use this en
|
|||
| ConvertIPv4IpAddressUnsignedLongToString | smelly__vx | Networking |
|
||||
| DnsGetDomainNameIPv4AddressAsString | smelly__vx | Networking |
|
||||
| DnsGetDomainNameIPv4AddressUnsignedLong | smelly__vx | Networking |
|
||||
| GetDomainNameFromUnsignedLongIPV4Address | smelly__vx | Networking |
|
||||
|
||||
|
||||
# Todo list
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
#include "Win32Helper.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
BOOL GetDomainNameFromUnsignedLongIPV4AddressW(_In_ ULONG IpAddress, _Inout_ PWCHAR DomainName)
|
||||
{
|
||||
WSADATA WindowsSocketData = { 0 };
|
||||
BOOL bFlag = FALSE;
|
||||
SOCKADDR_IN AddressInformation = { 0 };
|
||||
|
||||
if (WSAStartup(MAKEWORD(2, 2), &WindowsSocketData) != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
|
||||
AddressInformation.sin_family = AF_INET;
|
||||
AddressInformation.sin_addr.S_un.S_addr = IpAddress;
|
||||
|
||||
if (GetNameInfoW((CONST SOCKADDR*) & AddressInformation, sizeof(SOCKADDR), DomainName, 32, NULL, 0, NI_NUMERICSERV) != ERROR_SUCCESS)
|
||||
goto EXIT_ROUTINE;
|
||||
|
||||
bFlag = TRUE;
|
||||
|
||||
EXIT_ROUTINE:
|
||||
|
||||
WSACleanup();
|
||||
|
||||
return bFlag;
|
||||
}
|
||||
|
||||
BOOL GetDomainNameFromUnsignedLongIPV4AddressA(_In_ ULONG IpAddress, _Inout_ PCHAR DomainName)
|
||||
{
|
||||
WSADATA WindowsSocketData = { 0 };
|
||||
BOOL bFlag = FALSE;
|
||||
SOCKADDR_IN AddressInformation = { 0 };
|
||||
|
||||
if (WSAStartup(MAKEWORD(2, 2), &WindowsSocketData) != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
|
||||
AddressInformation.sin_family = AF_INET;
|
||||
AddressInformation.sin_addr.S_un.S_addr = IpAddress;
|
||||
|
||||
if (GetNameInfoA((CONST SOCKADDR*) & AddressInformation, sizeof(SOCKADDR), DomainName, 32, NULL, 0, NI_NUMERICSERV) != ERROR_SUCCESS)
|
||||
goto EXIT_ROUTINE;
|
||||
|
||||
bFlag = TRUE;
|
||||
|
||||
EXIT_ROUTINE:
|
||||
|
||||
WSACleanup();
|
||||
|
||||
return bFlag;
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
#pragma once
|
||||
#define _WINSOCK_DEPRECATED_NO_WARNINGS
|
||||
#include <winsock2.h>
|
||||
#include <Windows.h>
|
||||
|
||||
#define PROCESSOR_FEATURE_MAX 64
|
||||
|
@ -1120,4 +1122,5 @@ typedef struct _FILE_PROCESS_IDS_USING_FILE_INFORMATION{
|
|||
ULONG_PTR ProcessIdList[1];
|
||||
} FILE_PROCESS_IDS_USING_FILE_INFORMATION, * PFILE_PROCESS_IDS_USING_FILE_INFORMATION;
|
||||
|
||||
typedef VOID(NTAPI* PIO_APC_ROUTINE)(PVOID ApcContext, _In_ PIO_STATUS_BLOCK IoStatusBlock, _In_ ULONG Reserved);
|
||||
typedef VOID(NTAPI* PIO_APC_ROUTINE)(PVOID ApcContext, _In_ PIO_STATUS_BLOCK IoStatusBlock, _In_ ULONG Reserved);
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ int main(VOID)
|
|||
Sei.Payload = GlobalOpenCalcPayload;
|
||||
Sei.dwLengthOfPayloadInBytes = 277;
|
||||
Sei.MethodEnum = E_DNSQUERYEX;
|
||||
|
||||
|
||||
//ShellcodeExecutionViaFunctionCallbackMain(&Sei);
|
||||
|
||||
|
|
|
@ -163,6 +163,7 @@
|
|||
<ClCompile Include="GetCurrentProcessIdFromTeb.cpp" />
|
||||
<ClCompile Include="GetCurrentUserSid.cpp" />
|
||||
<ClCompile Include="GetCurrentWindowTextFromUserProcessParameter.cpp" />
|
||||
<ClCompile Include="GetDomainNameFromUnsignedLongIPV4Address.cpp" />
|
||||
<ClCompile Include="GetFileSizeFromPath.cpp" />
|
||||
<ClCompile Include="GetKUserSharedData.cpp" />
|
||||
<ClCompile Include="GetLastErrorFromTeb.cpp" />
|
||||
|
|
|
@ -435,6 +435,9 @@
|
|||
<ClCompile Include="Ex_GetHandleOnDeviceHttpCommunication.cpp">
|
||||
<Filter>Source Files\Windows API Helper Functions\Helper Functions</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GetDomainNameFromUnsignedLongIPV4Address.cpp">
|
||||
<Filter>Source Files\Windows API Helper Functions\Network Connectivity</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Internal.h">
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "Internal.h"
|
||||
#include "StringManipulation.h"
|
||||
#include "FunctionDeclaration.h"
|
||||
#include <Ws2tcpip.h>
|
||||
#include <Dbghelp.h>
|
||||
#include <wincrypt.h>
|
||||
#include <shlwapi.h>
|
||||
|
@ -15,6 +16,7 @@
|
|||
#include <windns.h>
|
||||
|
||||
|
||||
|
||||
#pragma comment(lib, "Dnsapi.lib")
|
||||
#pragma comment(lib, "Iphlpapi.lib")
|
||||
#pragma comment(lib, "Crypt32.lib")
|
||||
|
@ -22,6 +24,7 @@
|
|||
#pragma comment(lib, "Wtsapi32.lib")
|
||||
#pragma comment(lib, "Urlmon.lib")
|
||||
#pragma comment(lib, "PowrProf.lib")
|
||||
#pragma comment(lib, "Ws2_32.lib")
|
||||
|
||||
|
||||
#ifndef NT_SUCCESS
|
||||
|
@ -305,4 +308,6 @@ BOOL ConvertIPv4IpAddressUnsignedLongToStringA(_In_ ULONG Address, _Out_ PCHAR B
|
|||
DWORD DnsGetDomainNameIPv4AddressAsStringW(_In_ PWCHAR DomainName, _Inout_ PWCHAR IPv4IPAddress);
|
||||
DWORD DnsGetDomainNameIPv4AddressAsStringA(_In_ PCHAR DomainName, _Inout_ PCHAR IPv4IPAddress);
|
||||
ULONG DnsGetDomainNameIPv4AddressUnsignedLongW(_In_ PWCHAR DomainName);
|
||||
ULONG DnsGetDomainNameIPv4AddressUnsignedLongA(_In_ PCHAR DomainName);
|
||||
ULONG DnsGetDomainNameIPv4AddressUnsignedLongA(_In_ PCHAR DomainName);
|
||||
BOOL GetDomainNameFromUnsignedLongIPV4AddressW(_In_ ULONG IpAddress, _Inout_ PWCHAR DomainName);
|
||||
BOOL GetDomainNameFromUnsignedLongIPV4AddressA(_In_ ULONG IpAddress, _Inout_ PCHAR DomainName);
|
Loading…
Reference in New Issue