Instantly share code, notes, and snippets.

View dumped.txt
bootrom.elf: file format elf64-littleriscv
SYMBOL TABLE:
0000000000010000 l d .data 0000000000000000 .data
0000000000010000 g .data 0000000000000000 _binary_bootrom_bin_start
0000000000013068 g .data 0000000000000000 _binary_bootrom_bin_end
0000000000003068 g *ABS* 0000000000000000 _binary_bootrom_bin_size
View avatars.db.dump
{
"$archiver" => "NSKeyedArchiver"
"$objects" => [
0 => "$null"
1 => {
"$class" => <CFKeyedArchiverUID 0x7fb2a4c0d8d0 [0x7fffa1485af0]>{value = 12}
"domains" => <CFKeyedArchiverUID 0x7fb2a4c0d890 [0x7fffa1485af0]>{value = 2}
"records" => <CFKeyedArchiverUID 0x7fb2a4c0d8b0 [0x7fffa1485af0]>{value = 8}
}
2 => {
View crash.swift
// crashes Xcode 10 beta 4.
// the last line is supposed to error, not trigger a compiler segfault
import Foundation
import ObjectiveC
typealias BundleForClass_Type = @convention(c) (AnyClass, Selector, AnyClass) -> Bundle
private func AVTUIEnvironment_storeLocation_hook(bundleClass: AnyClass, selector: Selector) -> NSURL {
abort()
}
View treesort_nestedfunctions.py
#!/usr/bin/env python3
# https://en.wikipedia.org/wiki/Tree_sort#Example
opRead = 0
opWrite = 1
varVal = 0
varLeft = 1
varRight = 2
# learned this was possible from https://aphyr.com/posts/340-reversing-the-technical-interview
View serialout
iBoot version:
corecrypto_kext_start called
FIPSPOST_KEXT [64144875] fipspost_post:156: PASSED: (4 ms) - fipspost_post_integrity
FIPSPOST_KEXT [64366750] fipspost_post:162: PASSED: (1 ms) - fipspost_post_hmac
FIPSPOST_KEXT [64504187] fipspost_post:163: PASSED: (0 ms) - fipspost_post_aes_ecb
FIPSPOST_KEXT [64659750] fipspost_post:164: PASSED: (0 ms) - fipspost_post_aes_cbc
FIPSPOST_KEXT [72129500] fipspost_post:165: PASSED: (117 ms) - fipspost_post_rsa_sig
FIPSPOST_KEXT [76481625] fipspost_post:166: PASSED: (67 ms) - fipspost_post_ecdsa
FIPSPOST_KEXT [77264187] fipspost_post:167: PASSED: (11 ms) - fipspost_post_ecdh
View gist:907ed33729d0bf7a30425f49f2dbec1e
$ /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld -o why -iosmac_version_min 12.0 why.o
ld: warning: Auto-Linking library not found for -lswiftCore
ld: warning: Auto-Linking library not found for -lswiftSwiftOnoneSupport
$ /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l why
why:
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
0xfeedfacf 16777223 3 0x00 2 14 920 0x00000085
Load command 0
cmd LC_SEGMENT_64
View iosmac.txt
$ grep -r iosmac .
Binary file ./Developer/Platforms/AppleTVOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/tvOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore matches
Binary file ./Developer/Platforms/AppleTVOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/tvOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/RemoteTextInput.framework/RemoteTextInput matches
Binary file ./Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/RemoteTextInput.framework/RemoteTextInput matches
Binary file ./Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Applications/News.app/News matches
Binary file ./Developer/Platforms/WatchOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resource
View modem-crash.txt
<6>[ 1968.201609] subsys-restart: __subsystem_get(): Changing subsys fw_name to modem
<6>[ 1968.201625] IPA received MPSS BEFORE_POWERUP
<6>[ 1968.201629] IPA BEFORE_POWERUP handling is complete
<6>[ 1968.279767] pil-q6v5-mss fc880000.qcom,mss: modem: loading from 0x0000000007000000 to 0x000000000ca00000
<3>[ 1968.280478] M-Notify: General: 6
<6>[ 1968.296224] pil-q6v5-mss fc880000.qcom,mss: MBA: loading from 0x00000000c6300000 to 0x00000000c6400000
<6>[ 1968.364897] pil-q6v5-mss fc880000.qcom,mss: MBA boot done
<6>[ 1969.758085] pil-q6v5-mss fc880000.qcom,mss: modem: Brought out of reset
<6>[ 1969.822542] msm8994-asoc-snd fe034000.sound: msm8994_asoc_machine_probe: No hdmi audio support
<3>[ 1969.823033] msm8994-asoc-snd fe034000.sound: ASoC: CODEC tomtom_codec not registered
View exportit.sh
set -e
mkdir pmOS_boot pmOS_root || true
umount pmOS_boot || true
umount pmOS_root || true
kpartx -as /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/home/user/rootfs/huawei-angler.img
mount `findfs LABEL="pmOS_boot"` pmOS_boot
mount `findfs LABEL="pmOS_root"` pmOS_root
service nfs-kernel-server restart
View bcmdhd_wifiup.sh
echo -n "/tmp/bcm4358.bin" >/sys/module/bcmdhd/parameters/firmware_path
echo -n "/tmp/bcm_nvram.txt" >/sys/module/bcmdhd/parameters/nvram_path
ifconfig wlan0 up