Exploit database

GH-0f63941fd2c8152d3d942afd9d9817e3

gh0st0ne/rdpscan-bluekeep

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2019-0708

115 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files43
gh0st0ne/rdpscan-bluekeepRevision 6b35a8919fb4

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

src/util-sockets.c

C · 930 bytes

#ifdef WIN32
#define WIN32_LEAN_AND_MEAN 
#if defined(_MSC_VER)
#pragma comment(lib, "Ws2_32.lib")
#pragma comment(lib, "libssl_static.lib")
#pragma comment(lib, "libcrypto_static.lib")
#endif
#include <WinSock2.h>
#include <WS2tcpip.h>
#include <intrin.h>
#include <process.h>
#define snprintf _snprintf
#define close(fd) closesocket(fd)
typedef int ssize_t;
#undef errno
#define errno WSAGetLastError()

#define strerror my_strerror

const char *
$strerror(int err)
{
    static char* msg = NULL;
    switch (err) {
    default:
        if (msg == NULL)
            free(msg);
        FormatMessageA(
            FORMAT_MESSAGE_ALLOCATE_BUFFER | 
            FORMAT_MESSAGE_FROM_SYSTEM |
            FORMAT_MESSAGE_IGNORE_INSERTS,
            NULL,
            err,
            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
            (LPSTR)&msg,
            0, NULL );
        return msg;
        break;
    }
}

#else
#endif