Skip to content

Instantly share code, notes, and snippets.

View rmi1974's full-sized avatar

Robert Michelsen rmi1974

  • Germany
View GitHub Profile
@rmi1974
rmi1974 / how_to_recursively_find_dllimports_using_winedump.md
Last active March 30, 2020 10:26
How to recursively find dll imports using winedump #wine #debug #commandlinefu

How to recursively find dll imports using winedump

Find a specific import in WINEPREFIX

$ grep -ralZ _SetWinRTOutOfMemoryExceptionCallback .wine/drive_c | \
      xargs -r0i bash -c "echo \"{}\" && winedump -j import \"{}\" | \
      grep _SetWinRTOutOfMemoryExceptionCallback"

.wine/drive_c/windows/syswow64/msvcr120.dll
@rmi1974
rmi1974 / how_to_validate_ms_dotnet_installation_in_wineprefix.md
Last active March 29, 2020 15:38
How to validate Microsoft .NET Frameworks installation in WINEPREFIX #wine #debug #dotnet #winetricks

How to validate Microsoft .NET Frameworks installation in WINEPREFIX

Using .NET Framework Setup Verification Tool

To verify .NET Framework installation(s) in WINEPREFIX you can always use the [.NET Framework Setup Verification Tool from Aaron Stebner (Microsoft)][1] which checks for proper installation of .NET assemblies and registry entries.

Select the .NET Framework you want to verify and evaluate the log file manually if verification failed.

Using winetricks --verify

@rmi1974
rmi1974 / wine_hack_register_registration_free_com_servers.md
Last active March 29, 2020 15:28
Hack to register registry-free COM servers #wine #hack #commandlinefu

Hack to register registry-free COM servers in Wine

Courtesy of [Wine Bugzilla #30438][1].

Only works on dlls that export DllRegisterServer and have typelib data.

$ pwd
/home/focht/.wine/drive_c/Program Files/Lexware/buchhalter/2012
@rmi1974
rmi1974 / how_to_find_dotnet_version_dependencies.md
Last active April 12, 2023 21:24
How to find .NET Framework version dependencies #wine #debug #dotnet #commandlinefu

How to find .NET Framework version dependencies

The .NET metadata pointed by CLR/CLI header always starts with BSJB signature.

Metadata Header Storage Signature:

0x424a5342 Signature (hex for "BSJB" (only backwards due to endianness))
0x0001 Major Version
0x0001 Minor Version
@rmi1974
rmi1974 / virtualbox_recipes.md
Last active March 29, 2020 15:23
VirtualBox recipes #virtualbox #commandlinefu

VirtualBox recipes

Mount shared folder

sudo mount -t vboxsf -o uid=1000,gid=1000 <sharename> <mountpoint>

Shrink windows guest Virtualbox VDI disk

@rmi1974
rmi1974 / windows_apps_arm32_arm64_wine.md
Last active November 20, 2023 18:49
Windows ARM32 and ARM64 applications for testing on Wine AArch64 #wine #arm32 #arm64 #aarch64 #winrt

Windows ARM32 and ARM64 applications for testing on Wine AArch64

Links

  • [Windows 10 SDK (archive.org)][1]
  • [Windows PowerShell Core 6.x for ARM64][2]
  • [VLC 4.0.0 ARM64 (archive.org)][3]
  • [DtWinVer - A comprehensive OS detection Class (archive.org)][4]
  • [DebugLogger - A software driver that lets you log kernel-mode debug output into a file on Windows][5]
  • [Notepad2 for ARM / ARM64 Windows][6]
@rmi1974
rmi1974 / how_to_identify_nonhotpatchable_dllimports_from_wine_trace_logs.md
Last active March 29, 2020 15:05
How to identify non-hotpatchable dll imports from Wine trace logs #wine #debug #commandlinefu

How to identify non-hotpatchable dll imports from Wine trace logs

Courtesy of [Wine Bugzilla #45703][1].

Assumption: The hooker dll uses GetProcAddress API for lookup

Create trace log:

WINEDEBUG=+seh,+relay wine ./WINWORD.EXE >>log2.txt 2>&1
@rmi1974
rmi1974 / linux_hardware_monitoring_lmsensors.md
Last active March 29, 2020 15:01
Linux hardware monitoring using lm-sensors #lmsensors

Linux hardware monitoring using lm-sensors

Courtesy of [HWMon Wiki - Lm_sensors - Linux hardware monitoring - web.archive.org][1].

Install package

Fedora:

sudo dnf install lm_sensors lm_sensors-sensord
@rmi1974
rmi1974 / how_to_use_rsync_tool_to_synchronize_directories.md
Last active March 29, 2020 14:59
How to use rsync tool to synchronize directories #rsync #commandlinefu

Use rsync to synchronize directories

# -a  : all files, with permissions, etc..
# -x  : stay on one file system
# -H  : preserve hard links (not included with -a)
# -A  : preserve ACLs/permissions (not included with -a)
# -W  : copy files whole (w/o delta-xfer algorithm) - usually faster
# -X  : preserve extended attributes (not included with -a)
# -S  : handle sparse files efficiently
@rmi1974
rmi1974 / bitbake_oe_build_artifacts_to_sdcard.md
Last active March 29, 2020 14:58
BitBake/OpenEmbedded build artifacts to SD-Card #bitbake #openembedded #commandlinefu

BitBake/OpenEmbedded build artifacts to SD-Card

Write rootfs using compressed ext4 image to partition on SD-Card

export ROOTFS_PART=/dev/mmcblk0p2
gunzip < rootfs.ext4.gz | sudo dd of=$ROOTFS_PART bs=1M status=progress conv=fdatasync

Write rootfs using compressed tarball to partition on SD-Card