Skip to content

Instantly share code, notes, and snippets.


Chris Rohlf struct

View GitHub Profile
struct /
Created Apr 23, 2020
Open every C source and header file in a directory and replace calls to system malloc with iso_alloc
## See
find . -name "*.[c|h]" | xargs sed -i -e 's/ malloc(/ iso_alloc(/g' \
-e 's/ realloc(/ iso_realloc(/g' \
-e 's/ calloc(/ iso_calloc(/g' \
-e 's/ free(/ iso_free(/g' \
-e 's/ strdup(/ iso_strdup(/g' \
-e 's/ strndup(/ iso_strndup(/g'
struct / osquery_smaps.patch
Created Aug 7, 2016
Patches OSQuery with support for parsing smaps
View osquery_smaps.patch
diff --git a/osquery/tables/system/linux/processes.cpp b/osquery/tables/system/linux/processes.cpp
index c507b59..3005340 100644
--- a/osquery/tables/system/linux/processes.cpp
+++ b/osquery/tables/system/linux/processes.cpp
@@ -134,6 +134,63 @@ void genProcessEnvironment(const std::string& pid, QueryData& results) {
+// This constant may change between kernels
+#define SMAPS_FIELDS 19
struct / partition_alloc_freelist_randomize_dbl_free.patch
Created Jan 9, 2016
PartitionAlloc randomization of the freelist and double free protection
View partition_alloc_freelist_randomize_dbl_free.patch
diff --git a/PartitionAlloc.cpp b/PartitionAlloc.cpp
index 1215713..3b249e2 100644
--- a/PartitionAlloc.cpp
+++ b/PartitionAlloc.cpp
@@ -32,6 +32,7 @@
#include "PartitionAlloc.h"
#include <string.h>
+#include <vector>
struct / pdfium_partitionalloc.patch
Created Sep 2, 2015
A patch to add support for PartitionAlloc in PDFIUM
View pdfium_partitionalloc.patch
diff --git a/core/include/fpdfapi/fpdf_objects.h b/core/include/fpdfapi/fpdf_objects.h
index c2d838d..099eb62 100644
--- a/core/include/fpdfapi/fpdf_objects.h
+++ b/core/include/fpdfapi/fpdf_objects.h
@@ -39,6 +39,22 @@ class IFX_FileRead;
class CPDF_Object {

Keybase proof

I hereby claim:

  • I am struct on github.
  • I am chrisrohlf ( on keybase.
  • I have a public key whose fingerprint is DE1C 04BE 35F8 6A7A 66E2 9CDB D216 3C16 6C5A B908

To claim this, I am signing this object:

View dropbox_scraper.rb
## Disclaimer: This script sucks. It is a simple page
## scraper I wrote in about 10 minutes. Dropbox has no
## API calls for checking what IP addresses have accessed
## your Dropbox. When they change their website this
## script won't work anymore. It also requires curb
## which you can install with rubygems
## @chrisrohlf
require 'rubygems'
require 'curb'
You can’t perform that action at this time.