Skip to content

Instantly share code, notes, and snippets.

View ReneNyffenegger's full-sized avatar

Rene Nyffenegger ReneNyffenegger

View GitHub Profile
@ReneNyffenegger
ReneNyffenegger / peb.c
Created March 21, 2021 19:50 — 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));
@ReneNyffenegger
ReneNyffenegger / Create-Mdb.ps1
Created March 6, 2020 22:12 — forked from zippy1981/Create-Mdb.ps1
A powershell script that demonstrates using PInvoke to create an access database.
# Copyright (c) 2011 Justin Dearing <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
@ReneNyffenegger
ReneNyffenegger / HttpClientApproach.cs
Created November 5, 2019 15:47 — forked from acamino/HttpClientApproach.cs
4 Ways to Parse a JSON API with C#
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
namespace HttpClientApproach
{
internal class Contributor
{
public string Login { get; set; }
@ReneNyffenegger
ReneNyffenegger / HttpClientApproach.cs
Created November 5, 2019 15:47 — forked from acamino/HttpClientApproach.cs
4 Ways to Parse a JSON API with C#
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
namespace HttpClientApproach
{
internal class Contributor
{
public string Login { get; set; }