Skip to content

Instantly share code, notes, and snippets.

View DavidBuchanan314's full-sized avatar
🌍
Hack the planet!

David Buchanan DavidBuchanan314

🌍
Hack the planet!
View GitHub Profile
@jimmywarting
jimmywarting / block-reader.js
Last active January 25, 2024 13:15
Memory efficient block reader of fetch- `Response.body` a.k.a `RedableStream`
/**
* Read a stream into same underlying ArrayBuffer of a fixed size.
* And yield a new Uint8Array view of the same underlying buffer.
* @param {ReadableStreamBYOBReader} reader
* @param {number} chunkSize
*/
async function* blockReader(reader, chunkSize) {
let offset = 0;
let buffer = new ArrayBuffer(chunkSize)
let done, view
@throwaway96
throwaway96 / notes.md
Last active April 23, 2024 13:26
Enabling debug and getting root on LG webOS by modifying NVM

Warnings

What you do with this information is your own responsibility. If you brick your TV trying this, it's not my fault. You should probably have some electronics experience if you want to attempt this.

This is going to involve opening your TV and attaching wires to the pins of an integrated circuit. If you're not comfortable with that, this is not for you.

This document is a work in progress.

debugstatus

LG TVs since at least the era of NetCast and "Global Platform" (webOS predecessors) have had the notion of a debug level, generally called "debugstatus". There are three modes: DEBUG, EVENT, and RELEASE. TVs normally operate in RELEASE mode. DEBUG mode enables a variety of logging and other debugging features in webOS, including access to the bootloader console and debug menus via serial. EVENT is similar to DEBUG, although it may not enable as much logging and has other relatively minor differences.

// ==UserScript==
// @name @chaoticvibing Twitter Blue Nerd - twitter.com
// @namespace Violentmonkey Scripts
// @match *://*.twitter.com/*
// @grant none
// @version 1.9.1
// @author @chaoticvibing - GH @busybox11
// @description 11/9/2022, 11:45:28 PM
// @updateURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw/twitterblue-nerd.js
// @downloadURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw/twitterblue-nerd.js
@TheBrokenRail
TheBrokenRail / README.md
Last active April 8, 2024 07:12
Jailbreak Firefox!

Jailbreak-Firefox

This script allows you to install unsigned extensions (ones that aren't approved by Mozilla) on normal Firefox builds and the official Snap! That's right, no "Firefox Developer Edition" nonsense required!

⚠️ Disclaimer ⚠️

This script is not well tested, like at all. This script might break things, possibly important things. You should probably take a backup of your Firefox profile before using it. You have been warned.

Dependencies

sudo apt install -y curl unzip zip
# Only needed when jailbreaking the Snap
@theCalcaholic
theCalcaholic / main.py
Last active January 20, 2024 00:38
PoC: Read from video capture device using xdg-desktop-portals, pipewire and gstreamer and consume the video with VidGear/OpenCV
#!/usr/bin/python3
import re
import numpy as np
import dbus
from dbus.mainloop.glib import DBusGMainLoop
from time import sleep
from vidgear.gears import WriteGear
from gstreamer import GstContext, GstPipeline, GstApp, Gst, GstVideo
@czak
czak / webos
Last active March 1, 2024 22:33
Meson cross file for webos
[constants]
arch = 'arm-webos-linux-gnueabi'
toolchain = '/home/czak/projects/webos/webos-sdk-x86_64/1.0.g'
sysroot = toolchain / 'sysroots/armv7a-neon-webos-linux-gnueabi'
[host_machine]
system = 'webos-linux'
cpu_family = 'arm'
cpu = 'armv7a'
endian = 'little'
@jam1garner
jam1garner / switch-gdb-cheatsheet.md
Last active April 10, 2024 11:10
GDB for Switch Modding Cheatsheet/Tutorial

This is a mini-tutorial of sorts for getting started with gdb on the Switch, with the target audience being people who want to mod and/or reverse games, with no prerequisite knowledge of gdb. The goal will be to walk you through some of the basic workflows needed to use a debugger on the Switch, while being brief enough for skimming for when you forget things.

If some part is unclear, your OS doesn't have install instructions, or you feel part of your workflow should be added here, feel free to comment any additions.

(If you only need a quick reference Jump to the Appendix)

Installing GDB

First off you'll need a version of GDB compatible with aarch64. This can be obtained via either a distribution of

@ryancdotorg
ryancdotorg / wzip.py
Last active April 8, 2024 14:20
Partial/streaming zip downloader
#!/usr/bin/env python3
# SPDX-License-Identifier: 0BSD or CC0-1.0 or MIT-0 or Unlicense
# Copyright (c) 2023, Ryan Castellucci, No Rights Reserved
import io, sys
import datetime
import argparse
import requests
import operator
import struct
@saagarjha
saagarjha / library_injector.cpp
Last active April 5, 2024 19:53
Load a library into newly spawned processes (using DYLD_INSERT_LIBRARIES and EndpointSecurity)
// To compile: clang++ -arch x86_64 -arch arm64 -std=c++20 library_injector.cpp -lbsm -lEndpointSecurity -o library_injector,
// then codesign with com.apple.developer.endpoint-security.client and run the
// program as root.
#include <EndpointSecurity/EndpointSecurity.h>
#include <algorithm>
#include <array>
#include <bsm/libbsm.h>
#include <cstdint>
#include <cstdlib>
@Informatic
Informatic / README.md
Last active March 30, 2024 15:59
openlgtv webOS hacking notes

This is just a dump of some interesting undocumented features of webOS (3.8 specifically, on early 2018 4k LG TV) and other development-related tips.

Homebrew app ideas