Skip to content

Instantly share code, notes, and snippets.

@Phantomn
Phantomn / wsl-kvm.sh
Created March 5, 2024 12:05 — forked from afmiguez/wsl-kvm.sh
Script to enable KVM in WSL2
#Fully based on https://boxofcables.dev/accelerated-kvm-guests-on-wsl-2/
if [ -z "$1" ]
then
echo "Must supply your Windows 10 username"
exit
fi
WIN_USERNAME=$1
#package updates and installations
@Phantomn
Phantomn / hax.c
Last active March 9, 2022 04:15 — forked from apsun/hax.c
Hook main() using LD_PRELOAD
/*
* LD_PRELOAD를 사용하여 main()을 연결하세요. 왜 안되나요?
* 이 코드는 포터블하지 않다. 사용할때 리스크는 자신이 감당해라.
*
* Compile using 'gcc hax.c -o hax.so -fPIC -shared -ldl'
* Then run your program as 'LD_PRELOAD=$PWD/hax.so ./a.out'
*/
#define _GNU_SOURCE
#include <stdio.h>