Skip to content

Instantly share code, notes, and snippets.

View donkey-hotei's full-sized avatar

isaak yansane donkey-hotei

View GitHub Profile
# This bash script contains shared logic that is used to parse
# command line arguments. It is meant to be sourced from within the
# build scripts.
# This script parses command line arguments and exposes variables such
# as $PROFILE, and $FEATURES.
#
# Variables:
#
# $PROFILE: Can contain "--release" or "". By default it is set to
# "--release".
@donkey-hotei
donkey-hotei / gist:45cf2a242c9ac14a1481e0f313ee3138
Last active October 30, 2018 23:06
`/etc/hosts` file for blocking facebook tracking
0.0.0.0 apps.facebook.com
0.0.0.0 connect.facebook.net
0.0.0.0 facebook.com
0.0.0.0 fbcdn.com
0.0.0.0 fbsbx.com
0.0.0.0 fbcdn.net
0.0.0.0 graph.facebook.com
0.0.0.0 login.facebook.com
0.0.0.0 s-static.ak.facebook.com
0.0.0.0 static.ak.connect.facebook.com

Keybase proof

I hereby claim:

  • I am donkey-hotei on github.
  • I am donkey_hotei (https://keybase.io/donkey_hotei) on keybase.
  • I have a public key ASBzQ1LoMqrkm3KlQr45IwA52K9gBBNekG9KqT2aKZyPtAo

To claim this, I am signing this object:

@donkey-hotei
donkey-hotei / dbg_with_radare2.md
Last active June 17, 2019 15:17
Using radare2 for dynamic analysis

Reverse Engineering with Radare2

Dynamic analysis using radare2 opens the floodgates into understanding how assembly programs work. Often it is useful to be able to reassure one's understanding of x86 assembly by watching the program execute step-by-step, making predictions about what one expects to happen next and verifying that it does! Below is a short how-to on using radare2 for debugging in a way familiar to those who are more familiar with gdb.

Using netcat as client with the radare2 suite

@donkey-hotei
donkey-hotei / authenticate_via_api.rb
Created October 7, 2016 18:03
Attempts at Authenticating user via JSON API
# in /controllers/api/sessions_controller.rb
module Api
class SessionsController < Devise::SessionsController
skip_before_action :verify_authenticity_token, only: [:create, :facebook]
respond_to :json
# ...
def create
@user = warden.authenticate(scope: resource_name, recall: "#{controller_path}#new")
import errno, os, socket, sys
#
# Debug python progams over network with TCP sockets.
#
#
_dbg = _socket = None
#!/usr/bin/bash
x="f(t%2)else";python3 -c"[print(t>>15&(t>>(2$x 4))%(3+(t>>(8$x 11))%4)+(t>>10)|42&t>>7&t<<9,end='')for t in range(2**20)]"|aplay -c2 -r4
@donkey-hotei
donkey-hotei / bomb.c
Last active January 3, 2016 07:49
my reversal of the CMU binary bomb
// NOTE: this code will _not_ compile
void phase_1(char ** input) {
if (input != "Public speaking is very easy.")
explode_bomb();
else
return;
}
void phase_2(char ** input) {
int ar[6];
@donkey-hotei
donkey-hotei / cam_overflow.py
Last active December 20, 2015 09:30
a solution to the scapy-hunt edurange scenario
#!/usr/bin/python
# CAM Table Overflow is all about flooding a
# switches CAM table with a lot of fake MAC
# addresses to drive the switch into HUB mode.
from scapy.all import *
from random import randint
import subprocess
# import sys
@donkey-hotei
donkey-hotei / port_scanner.py
Created December 7, 2015 04:20
a simple port scanner done up in python
#!/usr/bin/python
# -*- coding: latin-1 -*-
# a python stealth port scanner
from logging import getLogger, ERROR
getLogger("scapy.runtime").setLevel(ERROR)
from scapy.all import *
from datetime import datetime
from time import stdftime