Skip to content

Instantly share code, notes, and snippets.

@stek29
stek29 / prettyflags.py
Last active May 1, 2024 15:44
Pretty print x86 (r|e)flags register with lldb script
import lldb
import shlex
FLAGS = [
['CF', 'Carry Flag'],
[None, 'Reserved'],
['PF', 'Parity Flag'],
[None, 'Reserved'],
['AF', 'Adjust Flag'],
[None, 'Reserved'],
@stek29
stek29 / 0webosbrew-letsencrypt-ca.md
Last active April 28, 2024 11:20
fix webOS ca certificates for DST Root X3 expiry (on rooted TVs)

HowTo

  • Root via rootmy.tv
  • Install

Tested on webOS 4.5, should at least on webOS 3.5+

Installation/Update

curl -qs "https://gist.githubusercontent.com/stek29/761232c6f7e1ffbc36b98da2a3a0f4d9/raw/install.sh?$(date +%s)" | sh -
@stek29
stek29 / extract_telegram_macos.ipynb
Last active April 24, 2024 17:38
Extract Telegram messages from db_sqlite PostBox – made for Telegram for macOS, but should work with Telegram for iOS
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stek29
stek29 / pivot_root_example.c
Created April 13, 2024 18:22
example on how to use pivot_root, and demonstration of fd's still being valid after pivot
#define _GNU_SOURCE
#include <sys/syscall.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sched.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
@stek29
stek29 / 0dnstest.go
Created April 3, 2024 14:17
dnstest -- query dns from different source ports range to debug network card losing packets from specific 5tuples
package main
import (
"flag"
"fmt"
"net"
"sync"
"github.com/miekg/dns"
)
@stek29
stek29 / dreame_1c_root.md
Last active March 2, 2024 12:38
Root Dreame Robot without via uart only

These are just my notes, and described process worked for me on my 1C robot
If anything goes wrong, having USB adapter for FEL flashing might be the only way to restore your robot
this is not an official guide
oh, and I'm not responsible for any damage blah blah
and huge thanks to Dennis and Hypfer, and everyone behind this root :)

0. get uboot shell

to enter uboot shell on 1C you have to: 0. turn robot off normally

  1. hook up uart, open console
@stek29
stek29 / idevicerestore.sh
Created January 12, 2019 12:22
idevicerestore on linux (Debian-based)
sudo apt update
# sudo apt upgrade
sudo apt install -y libcurl4-openssl-dev libplist-dev libzip-dev openssl libssl-dev libusb-1.0-0-dev libreadline-dev build-essential git make automake libtool pkg-config
git clone https://github.com/libimobiledevice/libirecovery
git clone https://github.com/libimobiledevice/idevicerestore
git clone https://github.com/libimobiledevice/usbmuxd
git clone https://github.com/libimobiledevice/libimobiledevice
git clone https://github.com/libimobiledevice/libusbmuxd
git clone https://github.com/libimobiledevice/libplist
@stek29
stek29 / 0info.md
Last active January 22, 2024 22:06
UntetherHomeDepot offsets

Update

I was tired of waiting so I've just crawled kernelcaches for all avaliable devices and made one big offsets.json containing all offsets. However, they are untested. They *should* work, but refer to table below if you're afraid of bootloops.


MESSAGE TO jk9357 OR WHOEVER IS MAINTAINING WALL.SUPPLIES

Some offsets are wrong/missing on wall.supplies.
@stek29
stek29 / efirestool.c
Last active January 5, 2024 13:25
efirestool -- tool to work with APPL efires archives
#include <sys/types.h>
#include <unistd.h> // write
#include <fcntl.h> // open, close
#include <stdio.h> // fprintf
#include <string.h> // strerror, strdup, strchr
#include <stdlib.h> // free, EXIT_*
#include <sys/mman.h> // mmap, munmap
#include <sys/stat.h> // fstat
#include <errno.h> // errno
#include <dirent.h> // DIR, dirent, opendir, readdir
@stek29
stek29 / multisaber_quest.md
Last active November 29, 2023 03:55
multiple copies of beatsaber app on quest

Here's how you can have multiple versions of beat saber at the same time by having different package names.
Unfortunately, BMBF is hardcoded to use original BeatSaber package id, so it's not possible to have completely unmodded version with BMBF modded version.
If BMBF starts using this method, it would be possible to have unmodded beat saber from oculus store with multiplayer support and modded BMBF version.

I made this because BMBF modded version used to crash time to time, and I prefer to have choice between stable game and custom songs.

You'd need apktool, zipalign, apksigner – I'm on mac, so I've installed apktool from brew and used Docker for other tools: fopina/dedroid.

Grab the APK