Hello all! I've (almost) completely rewritten [libpe C library](https://github.com/merces/libpe/) into Nim to be able to built a multiplatform tool to inspect PE files. So here I'm releasing:
* [nim-libpe](https://github.com/srozb/nim-libpe) \- PE parsing library (with the original libpe API untouched) * [peni](https://github.com/srozb/peni) \- tool that allows for quick PE file inspecting, looking for specific symbols recursively, counting entropy, hashes etc. Reason I started creating those two was to be able to inspect all the Windows dlls looking for specific symbol. Another reason was to better learn Nim and stuff like FFI. At first, all I wanted was to wrap essential libpe functions but suddenly I encountered some strange deadlocks when some cygwin routines were called. Then I decided to rewrite everything from ground up - that glued me to the IDE for weeks and my endless nightmare begun. Now it's working and I can share with you. Do expect bugs though as some features are not finished and some parts of code are mindlessly translated from the original lib. Testing suite is pretty solid. **Features/Use cases** * Display comprehensive information regarding exe/dll `peni info -a [-r] <path>` * Grep the directory looking for symbol matching given regex `peni grep -IE -p "pattern" -r C:\Windows\System32` * List high entropy files within given directory `peni entropy -t 7.0 -r C:\Windows` * Count some hashes `peni hash --ssdeep --sha256 -r C:\Windows\System32` Lastly I would like to thank everybody at Nim's discord who helped me answering more or less lame questions.