Skip to content

Instantly share code, notes, and snippets.

View david942j's full-sized avatar
🏠
Working from home

david942j david942j

🏠
Working from home
View GitHub Profile
@david942j
david942j / key.md
Created December 14, 2018 16:46
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

@david942j
david942j / yolo.c
Created June 27, 2018 14:39 — forked from saelo/yolo.c
Exploit for IPWnKit: a macOS IOKit exploit challenge from Defcon Qualifier CTF 2018
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <sys/mman.h>
#include <IOKit/IOKitLib.h>
#include <CoreFoundation/CFPropertyList.h>
const char* kMyDriversIOKitClassName = "io_oooverflow_IPwnKit";
@david942j
david942j / xocopy.c
Created January 15, 2018 18:26 — forked from FelixMartel/xocopy.c
xocopy.c variation for 64 bit elf
/* xocopy - Program for copying an executable with execute but no read perms.
* Copyright (C) 2002, 2003 Dion Mendel.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@david942j
david942j / db_truncate_x.rb
Created September 6, 2017 16:18 — forked from kazukeyan/db_truncate_x.rb
add rake task "db:truncate:x" and "db:truncate:all"
namespace :db do
def detect_env
ENV['RAILS_ENV'] || 'development'
end
def truncate(table)
begin
case @config["adapter"]
when "mysql", "mysql2"
ActiveRecord::Base.connection.execute("TRUNCATE #{table}")
puts "Table #{table} truncated!"
#!/usr/bin/sudo sh
## ruby_revealer.sh -- decrypt obfuscated GHE .rb files. 2.0.0 to 2.3.1+.
## From `strings ruby_concealer.so`:
##
## > This obfuscation is intended to discourage GitHub Enterprise customers
## > from making modifications to the VM.
##
## Well, good, as long as its not intended to discourage *me* from doing this!