All Projects → gsauthof → pe-util

gsauthof / pe-util

Licence: other
List shared object dependencies of a portable executable (PE)

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to pe-util

js-utils
🔥 A collection of some JavaScript utility functions for everyday use
Stars: ✭ 16 (-64.44%)
Mutual labels:  utility
FastDMG
Fast, no-nonsense disk image mounting for macOS
Stars: ✭ 72 (+60%)
Mutual labels:  utility
micSwitch
macOS menu bar application for the mic mute/unmute with single click or shortcut with walkie-talkie style support
Stars: ✭ 37 (-17.78%)
Mutual labels:  utility
eth-rpc-errors
Ethereum RPC Errors
Stars: ✭ 78 (+73.33%)
Mutual labels:  utility
laika
Log, test, intercept and modify Apollo Client's operations
Stars: ✭ 99 (+120%)
Mutual labels:  utility
utilsac
Utility functions
Stars: ✭ 13 (-71.11%)
Mutual labels:  utility
pdbfetch
Fetch PDB symbols directly from Microsoft's symbol servers
Stars: ✭ 33 (-26.67%)
Mutual labels:  portable-executable
ios
CoThings's iOS application. CoThings is a realtime counter for shared things.
Stars: ✭ 13 (-71.11%)
Mutual labels:  utility
black hole flutter
🛠 A package absorbing all Flutter utility functions, including extension functions and commonly used widgets
Stars: ✭ 18 (-60%)
Mutual labels:  utility
lua-shm-state-poc
Lua state in shared memory: a proof of concept
Stars: ✭ 22 (-51.11%)
Mutual labels:  shared-memory
MPSC Queue
A multi-producer single consumer queue C++ template suitable for async logging with SHM IPC support
Stars: ✭ 51 (+13.33%)
Mutual labels:  shared-memory
discord-paginationembed
A pagination utility for MessageEmbed in Discord.JS
Stars: ✭ 93 (+106.67%)
Mutual labels:  utility
vanilla-docker
A sweet Docker setup for Vanilla Forums
Stars: ✭ 34 (-24.44%)
Mutual labels:  utility
CertDump
Dump certificates from PE files in different formats
Stars: ✭ 16 (-64.44%)
Mutual labels:  portable-executable
xd-storage-helper
A little helper to make storing key-value-pairs (e.g. settings) for Adobe XD plugins easier.
Stars: ✭ 22 (-51.11%)
Mutual labels:  utility
whatsapp-jpeg-repair
A handy tool to fix jpeg files downloaded from WhatsApp and prevent errors upon opening these files in Adobe Photoshop.
Stars: ✭ 30 (-33.33%)
Mutual labels:  utility
semblance
Disassembler for Windows executables. Supports 16-bit NE (New Executable), MZ (DOS), and PE (Portable Executable, i.e. Win32) files.
Stars: ✭ 110 (+144.44%)
Mutual labels:  portable-executable
Funky
Funky is a functional utility library written in Objective-C.
Stars: ✭ 41 (-8.89%)
Mutual labels:  utility
HEAPUtil
Code for the RA-L (IROS) 2021 paper "A Hierarchical Dual Model of Environment- and Place-Specific Utility for Visual Place Recognition"
Stars: ✭ 46 (+2.22%)
Mutual labels:  utility
pelauncher
Portable Executable launcher for Windows NT bypassing loader
Stars: ✭ 49 (+8.89%)
Mutual labels:  portable-executable

List shared object dependencies of a portable executable (PE).

It uses the pe-parse library to read the PE structure.

2016, Georg Sauthoff [email protected]

Examples

Create a portable executable (PE) via cross-compiling and displays it shared object dependencies:

$ mkdir build
$ cd build
$ mingw64-cmake ..
$ mingw64-make main
$ peldd main.exe --no-wlist
ADVAPI32.dll
libboost_filesystem-mt.dll
libboost_system-mt.dll
libgcc_s_seh-1.dll
KERNEL32.dll
msvcrt.dll
libstdc++-6.dll
USER32.dll

Display the dependencies of a PE library:

$ peldd /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libstdc++-6.dll --no-wlist
libgcc_s_seh-1.dll
KERNEL32.dll
msvcrt.dll
libwinpthread-1.dll
USER32.dll

Display the dependencies of a PE binary without any well-known system libraries:

$ peldd main.exe
libgcc_s_seh-1.dll
libstdc++-6.dll

Compute the transitive closure of a binary, using the default search path:

$ peldd main.exe --all
main.exe
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgcc_s_seh-1.dll
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libstdc++-6.dll
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libwinpthread-1.dll

Error because on non whitelisted dll:

$ peldd ut.exe --all
Error: Could not resolve: WS2_32.dll

The same binary after extending the whitelist:

$ peldd ut.exe -a  -w WS2_32.dll 
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/iconv.dll
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libboost_filesystem-mt.dll
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libboost_regex-mt.dll
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libboost_system-mt.dll
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgcc_s_seh-1.dll
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libstdc++-6.dll
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libwinpthread-1.dll
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/libxml2-2.dll
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/zlib1.dll
ut.exe

There is also --ignore-errors for ignoring resolve errors.

Deploy a cross compiled binary:

$ peldd ut.exe -a | xargs cp -t /mnt/win/builds/

Build Instructions

To build peldd itself:

git clone https://github.com/gsauthof/pe-util.git
cd pe-util
git submodule update --init
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make VERBOSE=1

Or if ninja is available and enable debug mode (replace last 2 steps):

CXXFLAGS='-fsanitize=address -fsanitize=undefined -Og' cmake .. -DCMAKE_BUILD_TYPE=Debug -G Ninja
ninja -v

License

Both the library and the program are licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].