Skip to content

Instantly share code, notes, and snippets.

@5ec1cff
5ec1cff / README.md
Created August 20, 2025 13:36
My mpv scripts
@5ec1cff
5ec1cff / buildcleaner.py
Created June 12, 2025 06:36
Build Cleaner
import os
import shutil
from pathlib import Path
from traceback import print_exc
def rmall(p: Path):
print('removing', p)
try:
if os.path.isdir(p):
shutil.rmtree(p)
@5ec1cff
5ec1cff / cmd_wrapper.c
Created January 11, 2025 02:23
cmd_wrapper
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <signal.h>
@5ec1cff
5ec1cff / find_zip_entry.cpp
Created April 16, 2024 16:15
Find zip entry by offset
#include <cstdio>
#include <fcntl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <cstring>
#include <cerrno>
#include <string>
#include <utility>
@5ec1cff
5ec1cff / bootloader_miui.java
Created November 22, 2023 15:29 — forked from sopanatx/bootloader_miui.java
Xiaomi Bootloader Bind API
package com.android.settings.bootloader;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import com.android.settings.AESUtil;
import com.android.settings.bootloader.Utils;
@5ec1cff
5ec1cff / jdwp.py
Last active November 21, 2023 15:28
ptrace inject source code of pwn-tv
#!/usr/bin/python
################################################################################
#
# Universal JDWP shellifier
#
# @_hugsy_
#
# And special cheers to @lanjelot
# https://github.com/IOActive/jdwp-shellifier/blob/e82ec26193861ba58179aae7f3fa93654b7abc8a/jdwp-shellifier.py
@5ec1cff
5ec1cff / CorePatchDetector.kt
Created August 3, 2023 15:31
CorePatch detector
package io.github.a13e300.demo.maho
import android.app.PendingIntent
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.content.pm.PackageInstaller
import android.content.pm.PackageInstaller.EXTRA_STATUS
import android.content.pm.PackageInstaller.STATUS_PENDING_USER_ACTION
@5ec1cff
5ec1cff / background.js
Last active August 3, 2023 13:23
Yet Another Saucenao Search Extension
function injector(url) {
console.log("injected");
let im = document.querySelector("img");
function loaded() {
let canvas = document.createElement("canvas");
canvas.width = im.naturalWidth;
canvas.height = im.naturalHeight;
var ctx = canvas.getContext("2d");
ctx.drawImage(im, 0, 0);
@5ec1cff
5ec1cff / generate.py
Last active April 3, 2023 11:35
Generate windows registry of context menu of IDEs in JB ToolBox
import os
# find icons in %AppData%\Microsoft\Windows\Start Menu\Programs\JetBrains Toolbox
template_add = r'''Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\{prog_name}]
@="Open with {name}"
"Icon"="\"{current}\\icons\\{prog_name}.ico\""