Skip to content

Instantly share code, notes, and snippets.

View tayler-king's full-sized avatar

Tayler King tayler-king

View GitHub Profile
@tayler-king
tayler-king / Specification.md
Last active March 26, 2021 02:26
Lightweight uWebSocket.js client

Introduction

The specification for the WebSocket implementation is fairly simple. It consists of two parts:

  • Socket authentication
  • Message format

Specification

Socket authentication

Socket authentication is performed in a "hacky" way. This is intentional as it meets the following criteria:

  • Being stateless, i.e. not using cookies to provide an authentication token
  • Preventing authentication tokens from being leaked in the URI
#include <ntdef.h>
#include <ntifs.h>
#include "Types.h"
PLOAD_IMAGE_NOTIFY_ROUTINE NotifyImageLoadCallback(PUNICODE_STRING FullImageName, HANDLE ProcessID, PIMAGE_INFO w_ImageInfo)
{
if (wcsstr(FullImageName->Buffer, L"\\Win64\\TslGame.exe"))
{
DbgPrintEx(0, 0, "\n[PUBG]: Hooked to %ls \n", FullImageName->Buffer);
const minimist = require('minimist');
const beautify = require('js-beautify').js_beautify;
const fs = require('fs');
const randomWord = require('random-word');
const path = require('path');
var marked = require('marked');
var TerminalRenderer = require('marked-terminal');
marked.setOptions({
// Define custom renderer