Skip to content

Instantly share code, notes, and snippets.

Isaac Garzón iscgar

Block or report user

Report or block iscgar

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
from __future__ import print_function
import os
import requests
from datetime import datetime
def _format_size(s):
SIZES = ('B', 'KiB', 'MiB', 'GiB')
f = 0
s = float(s)
while s > 1024:
iscgar /
Created Sep 26, 2018
REALbasic (Xojo) Reverse-Engineering Helper Script
# IDA REALbasic reverse engineering helper script
# It seems that every version of REALbasic (Xojo) the loader
# has a different behaviour (especially with regard to parsing
# the imports table), so I'm documenting here that this script
# was created based on a 2009r5 executable.
# iscgar, 2018-09-26
# Based on the REALbasic OVERLAY resolver
# XpoZed @, 2017-07-16
iscgar / murmur_hash3_constexpr.cpp
Created Jul 6, 2018
A C++11 constexpr implementation of 32-bit MurmurHash3
View murmur_hash3_constexpr.cpp
#include <stddef.h>
#include <stdint.h>
#include <limits>
#include <type_traits>
namespace detail
template<size_t R, class T>
static inline constexpr T rotl(const T v)
iscgar /
Created Jun 22, 2018
Quick and dirty Rust ditribution (rustup) mirror script (prints are now messed up due to added parallelism)
from __future__ import print_function
import os
import sys
import re
from datetime import datetime, timedelta
import pickle
from multiprocessing import cpu_count
from multiprocessing.dummy import Pool as ThreadPool
import toml
import requests
iscgar / is_compatible.hpp
Created Feb 10, 2018
C++ Version of __builtin_types_compatible_p
View is_compatible.hpp
#include <stddef.h>
namespace detail
template<class, class> struct is_compatible { enum { value = 0 }; };
template<class T> struct is_compatible<T, T> { enum { value = 1 }; };
template<class T, size_t N> struct is_compatible<T[], T[N]> { enum { value = 1 }; };
template<class T, size_t N> struct is_compatible<T[N], T[]> { enum { value = 1 }; };
iscgar /
Last active Oct 17, 2017
Rust `offsetof` prototype (`offset_of` and `span_of`)
pub use std::mem
macro_rules! offset_of {
($sty:ty, $($field:tt)+) => ({
unsafe {
let root: $sty = $crate::mem::uninitialized();
let base = &root as *const _ as usize;
let end = &root.$($field)* as *const _ as usize;
end - base
View ghe-revealer.rb
#!/usr/bin/sudo ruby
# revealer.rb -- Deobfuscate GHE .rb files.
# This is simple:
# Every obfuscated file in the GHE VM contains the following code:
# > require ""
# > __ruby_concealer__ "..."
iscgar / HyperV-off.cmd
Created Aug 12, 2016
Turns Hyper-V off
View HyperV-off.cmd
@echo off
if "%1" == "" (set "BCDREC={current}") else (set "BCDREC=%1")
echo Setting Hyper-V off for %BCDREC%...
bcdedit /set %BCDREC% hypervisorlaunchtype off
if errorlevel 1 (goto fail)
echo Rebooting into No Hyper-V Mode
echo ==============================
echo Press any key to restart or CTRL-C to restart manually
iscgar / typelist-abuse.cpp
Last active Feb 15, 2016
Abusing type lists for easier generic development
View typelist-abuse.cpp
#include <stdio.h>
#include <string.h>
#include <ctype.h>
namespace detail
template<typename T>
bool detail_echo(const T *obj, const char *arg)
if (!obj)
iscgar / enum-inherit.cpp
Created Aug 2, 2015
"Inheritable" enums
View enum-inherit.cpp
#include <iostream>
struct BaseEnum
operator int() const { return this->type_; }
inline BaseEnum(int type) : type_(type) {}
You can’t perform that action at this time.