Skip to content

Instantly share code, notes, and snippets.

View richinseattle's full-sized avatar

richinseattle

View GitHub Profile
@richinseattle
richinseattle / control your media player with your voice.WSRMac
Created October 22, 2017 22:41
control your media player with your voice
<!-- By Rob Chambers -->
<!--
Have you ever wanted to control your media player with your voice? Well now you can! With today’s Macro of the Day, you can say things like “Play Hotel California”, or “Play The Eagles”, or, “Play Genre Rock”, and even “Play something by The Eagles”.
-->
@richinseattle
richinseattle / web-servers.md
Created November 12, 2017 12:00 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
/* Simple PT dumper */
/*
* Copyright (c) 2015, Intel Corporation
* Author: Andi Kleen
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
@richinseattle
richinseattle / install-api.py
Created December 4, 2017 00:22 — forked from withzombies/install-api.py
Install the Binary Ninja Python API
#!/usr/bin/env python
import os
import sys
import os.path
import site
try:
import binaryninja
print "Binary Ninja API Installed"
@richinseattle
richinseattle / TrustedHashes.csv
Created December 22, 2017 00:48 — forked from mattifestation/TrustedHashes.csv
All catalog hashes extracted from a mounted install.wim from en_windows_10_multi-edition_vl_version_1709_updated_sept_2017_x64_dvd_100090741.iso
We can't make this file beautiful and searchable because it's too large.
"Algorithm","Hash","CatalogPath","Hint"
"SHA256","71A0AEC9941BA21780C3BED570AEAF3BC5B9473BB6662F7CAF194F33C0E1B918","C:\Windows\InfusedApps\Frameworks\Microsoft.Advertising.Xaml_10.1705.4.0_x64__8wekyb3d8bbwe\AppxMetadata\CodeIntegrity.cat",
"SHA256","F5EEEC38876E48617643A9E735A30B9EC3D08D77075CD81F239A15626E3F7DD5","C:\Windows\InfusedApps\Frameworks\Microsoft.Advertising.Xaml_10.1705.4.0_x64__8wekyb3d8bbwe\AppxMetadata\CodeIntegrity.cat",
"SHA256","4BA33EC224E42FC929BA6487041C2C4275C5BCA66CD89471A09BC7F522A5661F","C:\Windows\InfusedApps\Frameworks\Microsoft.Advertising.Xaml_10.1705.4.0_x86__8wekyb3d8bbwe\AppxMetadata\CodeIntegrity.cat",
"SHA256","71A0AEC9941BA21780C3BED570AEAF3BC5B9473BB6662F7CAF194F33C0E1B918","C:\Windows\InfusedApps\Frameworks\Microsoft.Advertising.Xaml_10.1705.4.0_x86__8wekyb3d8bbwe\AppxMetadata\CodeIntegrity.cat",
@richinseattle
richinseattle / semtex.c
Created January 4, 2018 05:32 — forked from Nyangawa/semtex.c
semtex.c
/*
* linux 2.6.37-3.x.x x86_64, ~100 LOC
* gcc-4.6 -O2 semtex.c && ./a.out
* 2010 sd@fucksheep.org, salut!
*
* update may 2013:
* seems like centos 2.6.32 backported the perf bug, lol.
* jewgold to 115T6jzGrVMgQ2Nt1Wnua7Ch1EuL9WXT2g if you insist.
*/
@richinseattle
richinseattle / hax.c
Created January 4, 2018 05:33 — forked from katlogic/hax.c
//
// CVE-2006-0741 reloaded
// CVE-2014-4699 actually
// kat@lua.cz
//
#define _GNU_SOURCE
#include <sched.h>
#include <stdlib.h>
#include <sys/ptrace.h>
@richinseattle
richinseattle / peb.c
Created January 5, 2018 04:01 — forked from Wack0/peb.c
Getting a pointer to the PEB in C, for every architecture that NT was ported to (where at least one build of the port was leaked/released)
// Gets a pointer to the PEB for x86, x64, ARM, ARM64, IA64, Alpha AXP, MIPS, and PowerPC.
// This relies on MS-compiler intrinsics.
// It has only been tested on x86/x64/ARMv7.
inline PEB* NtCurrentPeb() {
#ifdef _M_X64
return (PEB*)(__readgsqword(0x60));
#elif _M_IX86
return (PEB*)(__readfsdword(0x30));
@richinseattle
richinseattle / spectre.c
Last active January 10, 2018 15:38 — forked from ErikAugust/spectre.c
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#ifdef _MSC_VER
#include <intrin.h> // for rdtscp and clflush
#pragma optimize("gt",on)
#else
#include <x86intrin.h> // for rdtscp and clflush
#endif
ulong time_page_fetch (ulong addr)
{
volatile ulong v=0;
asm volatile (
" movq %0, %%rsi \n"
:: "m"(addr)
);
asm volatile (