Skip to content

Instantly share code, notes, and snippets.

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

Joshua J. Drake jduck

🏠
Working from home
View GitHub Profile
#!/bin/sh
IMG=zImage
[ -n "$1" ] && IMG="$1"
binwalk -y gzip -e "$IMG"
mv _"$IMG".extracted/* piggy && rmdir _"$IMG".extracted
if [ -f piggy ]; then
ls -l piggy
[ -f piggy ] && ( strings piggy | grep 'Linux version' )
@jduck
jduck / nexus-ota-updates-2016-02-01.md
Last active September 28, 2023 12:26
February 2016 Nexus OTA Updates - Security Level 2016-02-01

LICENSE/DISCLAIMER - This information is provided as is and without warranty. Permission to repost this information is granted so long as it is properly attributed to "droidsec.org" and/or "jduck". Thank you for your consideration.

Pixel C MXB48T from MXB48J
Pixel C MXB48T from MXB48K
Nexus 6P MMB29Q from MMB29P
Nexus 5X MMB29Q from MMB29P
Nexus 6 MMB29Q from MMB29S
Nexus

@jduck
jduck / nexus-ota-updates-2016-01-01.md
Last active September 28, 2023 12:26
January 2016 Nexus OTA Updates - Security Level 2016-01-01
#!/usr/bin/env python
#
# liars and cheats plaidctf 2021 challenge
#
# -jduck
import socket
import select
import sys
import time
@jduck
jduck / default.xml
Last active November 22, 2020 00:45
Manually created AOSP mirror manifest
<!-- remove this part!
Place this in $AOSPMIRROR/.repo/manifests/default.xml
Created with:
$ cd ~/android/source
$ repo init -u $AOSPMIRROR/platform/manifest.git -b android-4.4_r1
$ cd $AOSPMIRROR/.repo/manifests
$ cat ~/android/source/.repo/manifests/default.xml | sed -E 's/ path=\"[^\"]+\"//g' | ^Cd -E 's/ groups=\"[^\"]+\"//g' > default.xml
#!/usr/bin/env python
import sys
sys.path.append('/home/jdrake/public/tools/00_people/aquynh/capstone/bindings/python')
import argparse
import capstone
import struct
def arm_mode(string):
From 6b4eba818a99db7cd0b268d5410b0b2e1aa1aab9 Mon Sep 17 00:00:00 2001
From: "Joshua J. Drake" <github.jdrake@qoop.org>
Date: Wed, 12 Nov 2014 19:31:56 -0600
Subject: [PATCH] rebase http-proxy patch
---
lib/rex/io/stream_server.rb | 9 ++
lib/rex/proto.rb | 2 +
lib/rex/proto/http/server.rb | 7 +
lib/rex/proto/proxy.rb | 77 +++++++++++
angler/mda89d/uname.txt:Linux 3.10.73-g9b6596d
angler/mdb08k/uname.txt:Linux 3.10.73-gcf36678
angler/mdb08l/uname.txt:Linux 3.10.73-gcf36678
angler/mdb08m/uname.txt:Linux 3.10.73-gcf36678
angler/mhc19i/uname.txt:Linux 3.10.73-g3b5cc28
angler/mhc19q/uname.txt:Linux 3.10.73-g8c0675f
angler/mmb29m/uname.txt:Linux 3.10.73-g9741316
angler/mmb29n/uname.txt:Linux 3.10.73-g9741316
angler/mmb29p/uname.txt:Linux 3.10.73-g9741316
angler/mmb29q/uname.txt:Linux 3.10.73-gda330d0
@jduck
jduck / adis.py
Last active February 2, 2017 15:28
Sample utility to disassemble a raw ARM bytecode file using Capstone.
#!/usr/bin/env python
#
# Simple utility to disassemble a raw bytecode file using Capstone.
#
# -jduck
#
import argparse
import capstone
import struct
From d45ffefae10a9a0fba279fb9ab249a70bd52e060 Mon Sep 17 00:00:00 2001
From: "Joshua J. Drake" <android-open-source@qoop.org>
Date: Sat, 15 Aug 2015 07:37:55 -0500
Subject: [PATCH] Correct the length calculation
In some cases the utf16_to_utf8_length incorrectly increments the src pointer.
This results in the length of the utf8 string being incorrect and can lead to
buffer problems in calling code.
Change-Id: Id1170658aa5b1d56acfd3d882e788632ca42b7eb