Skip to content

Instantly share code, notes, and snippets.

@brianpow
brianpow / il2cpp.h-for-ghidra.sh
Created October 9, 2021 08:54
For conversion of decompiled Unity il2cpp.h header file to Ghidra compatible format
#!/bin/bash
# Originally written by https://github.com/therealchjones
# Original Source: https://github.com/Perfare/Il2CppDumper/issues/287#issuecomment-669544385
# For conversion of decompiled Unity il2cpp.h header file to Ghidra compatible format
DEBUG=y
SOURCEFILE="$1"
NEWFILE="${2:-il2cpp-ghidra.h}"
if [ "$#" -lt 1 ]; then
IP=192.168.10.239
BUSYBOX=busybox-armv6l
TAR=tar
PS1='$(pwd)#'
download_ftp(){
ftpget $IP $1
}
@brianpow
brianpow / root-passwd-iot.md
Last active June 16, 2019 13:57
Common Root Password for IoTs

Common Root Password for Unsecure IoT

DVR

AVTECH DG1004B (Firmware 1046)

/etc/passwd

root:bn2OuGcYYgGaA:0:0:root:/root:/bin/sh
bin:x:1:1:bin:/bin:/bin/sh
@brianpow
brianpow / make-mips-arm-busybox.sh
Created June 9, 2019 16:42
Put this file in the busybox source folder and run, then it will make all variants of busybox for ARM and MIPS architecture. (A few variants cannot be built)
build()
{
if [ ! -f $1-$i ] ; then
echo Building $1-$i...
make clean > /dev/null
time make CROSS_COMPILE="$CROSS_COMPILE" CFLAGS+="$_CFLAGS" CXXFLAGS+="$_CXXFLAGS"
mv $1 $1-$i
else
echo Skipping $1-$i since the output file already exists
fi
@brianpow
brianpow / GK7102.md
Last active December 31, 2023 14:35

GK7102 Based IP Camera

Background

Just bought one unit of GK7102-based camera at US$8 (Yes, just US$8!). The seller claimed it had a 1080p sensor and three antennas but the sensor was found to be 720p and only one antenna is wired. No manufacturer information available but only a model "Y6A-WA" printed on the box.

After unboxing, the PCB was found detached from the base. Opening the base and show that the PCB has two mounting holes but only one screw was found. Moreover, the size of the mounting holes are too big for that screw!

Hardware info

CPU: ARMv6 CPU

/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\
@brianpow
brianpow / Docomo Disney Mobile DM-01H.md
Last active September 12, 2019 09:45
Docomo Disney Mobile DM-01H
@brianpow
brianpow / mkfota.c
Created October 14, 2018 05:11 — forked from tewilove/mkfota.c
/*
*
* SHARP FOTA parser DEMO
* tewilove@gmail.com, All rights reserved
*
*/
#include <sys/types.h>
#include <sys/stat.h>
//https://www.vgmusic.com/music/console/nintendo/nes/
var go = function($) {
lastHeader = ""
data = $("table tr").map(function() {
if ($(this).hasClass("header")) {
lastHeader = $(this).find("a:eq(0)").text().trim()
return ""
} else {
if ($("td:eq(0)", this).attr("colspan") == 5)
return ""
@brianpow
brianpow / bookmarklet-lego-buildinginstructions-dump.js
Created October 27, 2017 15:31
Dump all URLs of building instruction manuals and thumbnails
//https://www.lego.com/en-us/service/buildinginstructions
(function($) {
var baseUrl = "https://www.lego.com//service/biservice/searchbytheme?fromIndex={index}&onlyAlternatives=false&theme={theme}"
var themes = JSON.parse($("div.product-search").attr("data-search-themes"))
var products = []
next = function() {
if (themes.length) {
theme = themes.pop()