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
from hashlib import sha1
import hmac
import binascii
import time
import struct
ploy = "..."
secret = binascii.unhexlify(b"...")
now = struct.pack(">Q", round(time.time() / 30))
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 ];
});
};
})
];
// 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 / 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.

@Informatic
Informatic / WaylandGenerateProtocols.py
Last active March 3, 2023 12:00
Ghidra script to extract wayland protocols definition from wayland-scanner generated client library. Run this on an (opened and analysed) libwebos-*-client.so library.
# This Ghidra script will attempt to extract wayland protocol/interfaces
# definitions xml from wayland-scanner-generated built client library.
#
# This should properly handler interfaces, methods and events, and their arg
# types and order. Argument names or descriptions cannot be extracted.
#
# @author infowski
# @category _NEW_
# @keybinding
# @menupath
# Looks for matching libraries in current project and automatically assigns to current program.
# "Link existing project libraries" doesn't seem to fully work when using bulk import, and this
# pretty much reimplements this.
#
# After running this script you will probably want to use FixupELFExternalSymbolsScript.java too.
#
#@author infowski
#@category Symbol
#@keybinding F11
#@menupath
networking.networkmanager = {
enable = true;
# Let's just use networkmanager for modem support for now
unmanaged = [ "wlan0" ];
};
systemd.services.NetworkManager.requires = [ "ModemManager.service" ];
systemd.services.ModemManager.requires = [ "rmtfs.service" ];

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 / 50-customca
Last active November 8, 2024 00:26
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 / 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)