Skip to content

Instantly share code, notes, and snippets.

genuine_ blaquee

Block or report user

Report or block blaquee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@blaquee
blaquee / thread_name.c
Created May 6, 2019 — forked from rossy/thread_name.c
MinGW-w64 set_thread_name
View thread_name.c
#include <windows.h>
#include <winnt.h>
#include <winternl.h>
#include <pshpack8.h>
typedef struct {
DWORD dwType;
LPCSTR szName;
DWORD dwThreadID;
DWORD dwFlags;
@blaquee
blaquee / main.c
Created Sep 1, 2017 — forked from hfiref0x/main.c
NtLoadEnclaveData Windows 10 RS3 DSE bypass
View main.c
// Original source link https://twitter.com/hFireF0X/status/887930221466443776
// If you are here from any other link - do know that they just steal original info without giving any credit to source
// This bug has been fixed in 16273 public build.
#include "global.h"
HINSTANCE g_hInstance;
HANDLE g_ConOut = NULL;
BOOL g_ConsoleOutput = FALSE;
WCHAR g_BE = 0xFEFF;
@blaquee
blaquee / pub_sub_cpp.cpp
Created Aug 17, 2017 — forked from makomweb/pub_sub_cpp.cpp
Fun with C++: implementing a pub/sub scenario using std::bind and other standard facilities. The approach is pretty similar to the well known .NET event mechanism.
View pub_sub_cpp.cpp
#include <iostream>
#include <map>
#include <algorithm>
#include <functional>
#include <memory>
using namespace std;
class EventArgs {
public:
@blaquee
blaquee / strstri.cpp
Last active Aug 5, 2017
strstri implementation in C++
View strstri.cpp
template<typename T, typename U>
static const T* stristr(const T* string, const T* substring, U(*tolwr)(U))
{
const T *a, *b;
b = substring;
if(*b == 0)
return string;
for(; *string != 0; string += 1)
{
@blaquee
blaquee / unicode.c
Created Aug 5, 2017
Misc Unicode helpers
View unicode.c
BOOL RtlEndsWithUnicodeString(PUNICODE_STRING Source, PUNICODE_STRING Find)
{
if (Source->Length == Find->Length ||
(Find->Length > Source->Length))
{
//do a regular RtlEqualUnicodeString?
return FALSE;
}
USHORT bytesDif = Source->Length - Find->Length;
@blaquee
blaquee / c_cpp_properties.json
Created Jul 10, 2017 — forked from chappjc/c_cpp_properties.json
VS Code C++ project properties for VS 2015 w/ Windows SDK 10.0
View c_cpp_properties.json
{
"configurations": [
{
"name": "Mac",
"includePath": ["/usr/include"],
"browse" : {
"limitSymbolsToIncludedHeaders" : true,
"databaseFilename" : ""
}
},
View Get-MS17010.ps1
<#
.Synopsis
Scans a host or network for the MS17-010 vulnerability
.DESCRIPTION
This script will use a custom NMap NSE script to scan a destination host on
port 445 for the MS17-010 vulnerability. If the host is not online or is blocking
SMB, this script will report no vulnerabilities.
View gist:3b07353b2b5710d5c19c304113742f83
OVERVIEW: LLVM 'Clang' Compiler: http://clang.llvm.org
USAGE: clang -cc1 [options] <inputs>
OPTIONS:
-### Print the commands to run for this compilation
--analyze Run the static analyzer
--migrate Run the migrator
--relocatable-pch Build a relocatable precompiled header
--serialize-diagnostics <value>
View hwbp.c
#pragma once
#include <windows.h>
enum HWBP_MODE
{
MODE_DISABLED = 0, //00
MODE_LOCAL = 1, //01
MODE_GLOBAL = 2 //10
};
View hwbp.c
#pragma once
#include <windows.h>
enum HWBP_MODE
{
MODE_DISABLED = 0, //00
MODE_LOCAL = 1, //01
MODE_GLOBAL = 2 //10
};
You can’t perform that action at this time.