forge
Explore
Log in

Don't you dare go Hollow

yumush

Clone
★ 0

0 watching0 forksRustAGPL-3.06.8 MiB27ceb05Tahinli7 hours ago399 commits

imports.sh12 lines, 762 bytesHistoryRawDownload
1#!/usr/bin/env bash
2set -euo pipefail
3exe="${1:-$(dirname "$0")/../target/windows/yumush.exe}"
4core="advapi32 api-ms-win-core-synch-l1-2-0 api-ms-win-core-winrt-error-l1-1-0 api-ms-win-core-winrt-l1-1-0
5api-ms-win-shcore-scaling-l1-1-1 bcrypt bcryptprimitives combase comctl32 coremessaging crypt32 d3d11 dcomp
6dwmapi dwrite dxgi gdi32 gdiplus icuuc imm32 kernel32 mmdevapi msimg32 ntdll ole32 oleaut32 pdh powrprof
7propsys psapi shell32 uiautomationcore user32 userenv winmm ws2_32"
8extra=$(objdump -p "$exe" | sed -n 's/.*DLL Name: //p' | tr A-Z a-z | sed 's/\.dll$//' | sort -u |
9 grep -vxF -f <(tr ' ' '\n' <<<"$core" | grep .) || true)
10[ -z "$extra" ] && { echo "imports ok"; exit 0; }
11echo "not on every Windows, delay-load and guard it: $extra"
12exit 1