> For the complete documentation index, see [llms.txt](https://kashz.gitbook.io/kashz-jewels/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kashz.gitbook.io/kashz-jewels/tricks/kali-exploit-compilation.md).

# kali exploit compilation

## Linux

```bash
# sudo apt install gcc-multilib g++-multilib

# x86
gcc -m32 [-Wl,--hash-style=both] FILE.c -o FILE
```

## Windows

```bash
# x64
i686-w64-mingw32-gcc exploit.c -o exploit

# x86
i686-w64-mingw32-gcc exploit.c -o exploit -lws2_32 
```
