Skip to content

Instantly share code, notes, and snippets.

View Informatic's full-sized avatar
🤔
excuse me, is this facebook

Piotr Dobrowolski Informatic

🤔
excuse me, is this facebook
View GitHub Profile
@Informatic
Informatic / README.md
Last active April 29, 2024 11:18
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

@Informatic
Informatic / README.md
Last active April 9, 2024 07:09
cloud-init "nocloud" networking setup

cloud-init is absolute cancer. Its code is horrible. It has no documentation at all.

It took me 5 fucking hours to figure out how to properly configure networking on recent cloud-init (Ubuntu 16.04 cloud image) with local datasource.

It's not mentioned anywhere you need to provide dsmode: local. (but only if you need network-config, besides that everything is fine; someone below noted that -m flag does the same thing, good to know) Of course nobody needs documentation for network-config format either. (cloudinit/net/__init__.py is a protip, enjoy the feces dive)

Oh, and by the way - no, it's not possible to provide network-config to uvt-kvm without patching shit.

@Informatic
Informatic / domain.xml
Last active April 7, 2024 23:20
How to use Windows 10 OEM license in libvirt VM (<smbios mode='host' /> does not work as Windows seems to verify UUID; apparmor/security configuration changes may be needed)
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<!-- ... -->
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/slic.bin'/>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/msdm.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_0.bin'/>
<qemu:arg value='-smbios'/>
import <nixpkgs> {
overlays = [
(final: prev: {
gst_all_1 = prev.gst_all_1 // {
gst-plugins-base = prev.gst_all_1.gst-plugins-base.overrideAttrs (p: {
buildInputs = p.buildInputs ++ [ pkgs.libdrm ];
});
};
})
];
@Informatic
Informatic / README.md
Last active February 7, 2024 07:10
awesome-hardware/awesome-bluepill/awesome-rp2040 bullshit

This is a quick list of cool payloads that can be pushed onto some common MCU boards to turn these them into actually useful everyday hacking tools.

// This ClusterRole is bound to all humans that log in via prodaccess/prodvider/SSO.
// It should allow viewing of non-sensitive data for debugability and openness.
crViewer: kube.ClusterRole("system:viewer") {
rules: [
{
apiGroups: [""],
resources: [
"nodes",
"namespaces",
"pods",
@Informatic
Informatic / 50-customca
Last active December 5, 2023 04:39
Let's Encrypt fix for webOS. Tested on 3.8 only, put this into /var/lib/webosbrew/init.d and you should be probably done.
#!/bin/sh
# Directory to store overlays in (one directory structure is created per overlay configured down below)
OVERLAY_BASE=/var/lib/webosbrew/customca
overlay() {
set -e
overlay_id="$(echo $1 | sed 's;/;__;g')"
unset TARGET SOURCE FSTYPE OPTIONS
eval $(findmnt -P $1)
@Informatic
Informatic / stunnel-transparent.sh
Created July 22, 2018 10:20
stunnel transparent proxy (server) on localhost. use transparent=source; connect=127.1.1.1:... in stunnel configuration (mostly borrowed from sslh documentation)
#!/bin/bash
set -e
# Set route_localnet = 1 on all interfaces so that ssl can use "localhost" as
# destination
sysctl -w net.ipv4.conf.default.route_localnet=1
sysctl -w net.ipv4.conf.all.route_localnet=1
# DROP martian packets as they would have been if route_localnet was zero

Advanced Recursive Diffing™

Ever needed to diff two trees of files, while doing some preprocessing on modified files? Well - we've got a solution for you. Or rather... our long friend git has.

Turns out it's perfectly legal to just use git diff --no-index on directories outside of (any) git repository. With that, we can (ab-)use built in git diff per-path/extension preprocessing feature.

@Informatic
Informatic / cursors.sh
Created April 16, 2021 18:05
simple tool to apply overlayfs over specific directories
#!/bin/sh
# Directory to store overlays in (one directory structure is created per overlay configured down below)
OVERLAY_BASE=/home/root/overlays
overlay() {
set -e
overlay_id="$(echo $1 | sed 's;/;__;g')"
unset TARGET SOURCE FSTYPE OPTIONS
eval $(findmnt -P $1)