Skip to content

Instantly share code, notes, and snippets.

/*
Patches statfs() syscall* to make programs think that NFS filesystems are actually ext4.
Temporary fix for KDE Dolphin bug #452924.
More info: https://bugs.kde.org/show_bug.cgi?id=452924#c28
Compile with:
cc -fPIC -shared -ldl -o mask_statfs_nfs_as_ext4.so mask_statfs_nfs_as_ext4.c
Run Dolphin like so:
IN_LLDB = False # DO NOT MOVE THIS
import sys
import struct
import subprocess
import os
import os.path
# usage: python3 frida_patcher.py TARGET_BINARY_PATH [args...]
# spawns the specified target in a "blocked but not suspended" state that allows frida to attach.