Skip to content

Instantly share code, notes, and snippets.

@h-x-z
h-x-z / 14IIL05_lid_switch_fix.sh
Last active March 23, 2026 09:37
Fix for IdeaPad 3 14IIL05 EC not sending lid switch signals (not sleeping on lid close)
#!/bin/bash
# "Fix" for the IdeaPad 3 14IIL05 EC not sending lid switch signals (doesn't sleep on lid close)
# Sets ec_sys kernel module to load on boot
# Creates script in /usr/local/bin/ec-poller.sh that polls EC memory every 0.5s
# Creates systemd service that runs the script on boot
# Enables and starts service
if [ "$EUID" -ne 0 ]; then
echo "Run as root"
@h-x-z
h-x-z / windows_uac_bypass.py
Last active March 23, 2026 09:48
UAC Bypass by abusing .NET profiler DLL loading
# Tested on Windows 10 Pro v10.0.19044.2130 (the latest version as of 08/11/2022)
# Prerequisites: Windows 10 Pro, Administrator account
# Demo: https://www.youtube.com/watch?v=0hQvejo5Os4
# Reference: https://offsec.almond.consulting/UAC-bypass-dotnet.html
import subprocess
import tempfile
import base64
import uuid