Skip to content

Instantly share code, notes, and snippets.

@binarycraft007
binarycraft007 / udev-hid-bpf.c
Last active July 11, 2026 19:21
udev hid bpf cli tool
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <ftw.h>
#include <libudev.h>
#include <bpf/libbpf.h>
@binarycraft007
binarycraft007 / hid-asus-vivobook-s15.c
Last active July 11, 2026 18:53
HID driver for ASUS Vivobook S15 S5507 Keyboard
// SPDX-License-Identifier: GPL-2.0-only
/*
* HID driver for ASUS Vivobook S15 S5507 Keyboard
*
* Copyright (c) 2024 Elliot Huang (keep.it.sns@gmail.com)
*
* This driver handles special function keys for keyboard backlight control,
* Fn-Lock, and re-maps certain vendor-specific keys to standard consumer
* control usages (e.g., display brightness). It also handles suspend and
* resume by turning off the backlight on suspend and restoring the full
@Cypheriel
Cypheriel / _srp.py
Last active June 23, 2024 10:51
Limited RFC 5054-compatibile client-side implementation of the Secure Remote Password protocol. Designed to work with Apple's GrandSlam Authentication API.
"""Copyright (c) 2024 Cypheriel.
Secure Remote Password protocol implementation.
This module provides an implementation of the Secure Remote Password protocol, as defined in RFC 5054.
For now, only the client-side implementation is provided.
This implementation is designed to be compatible with the Apple SRP implementation, as used in the GrandSlam framework.
See:
- https://datatracker.ietf.org/doc/html/rfc5054
@moyix
moyix / DecompileToJson.java
Created January 27, 2024 06:16
Ghidra scripts to produce JSON files with decompilation / disassembly for each function in an binary
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import ghidra.app.script.GhidraScript;
import ghidra.app.decompiler.DecompInterface;
@Cypheriel
Cypheriel / $mitmproxy for macOS internal services.md
Last active December 17, 2025 14:53
Guide for installing and setting up both mitmproxy and Frida mainly for use with sniffing HTTP(S) traffic internal to macOS.

Install mitmproxy

  1. Follow the instructions to install mitmproxy and launch either mitmproxy or mitmweb. If you plan on sniffing traffic from a macOS VM, it is probably preferable to install mitmproxy on the host OS.
  2. Change your proxy settings in macOS to use your local IPv4 address with port 8080 (by default).
    • System SettingsNetworkAdvancedHTTP and HTTPS proxies
  3. Install the mitmproxy certificate by navigating to http://mitm.it/
  4. Disable SSL verification.
    • On mitmweb, this is toggled in OptionsDon't verify server certificates

Install Frida

#include "Crypto.h"
#include "clock.h"
#include "global_config.h"
#include "log.h"
#include "string.h"
#include "PhysicalLayer.h"
#include "Zigbee.h"
#include "OSAL.h"
@nicolas17
nicolas17 / gist:559bec0d8e636f93f62cca844ee94ada
Last active August 25, 2026 06:19
Apple IDS payload keys
c: command
cc: commandContext
v: version
P: payload
N: bulkedPayload
fP: fanoutPayload
aP: additionalPayload
Pm: payloadMetadata
i: messageId
U: messageUUID
@ZenithalHourlyRate
ZenithalHourlyRate / GUD.md
Last active September 14, 2026 21:00
Use old phone as a second display: USB GUD with postmarketOS

Demo

Xiaomi Redmi 2 with resolution 1280x720 (GUD RGB565 with compression)

9.mp4
10.mp4

@ksopyla
ksopyla / install_cuda_11_ubuntu_2004.md
Last active February 19, 2026 05:05
How to install CUDA toolkit 11 at ubuntu 20.04

Step by step instruction how to install CUDA 11 Ubuntu 20.04

NVidia Ubuntu 20.04 repository for CUDA 11

If you need CUDA Tolkit 11 with nvcc, other tools and libraries you can install it from NVIDIA Ubunutu 20.04 repository.

Add Ubuntu 20.04 repository

@mwufi
mwufi / install_docker_in_colab.sh
Last active August 4, 2026 03:25
Install Docker in Google Colab!
# First let's update all the packages to the latest ones with the following command
sudo apt update -qq
# Now we want to install some prerequisite packages which will let us use HTTPS over apt
sudo apt install apt-transport-https ca-certificates curl software-properties-common -qq
# After that we will add the GPG key for the official Docker repository to the system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# We will add the Docker repository to our APT sources