Skip to content

Instantly share code, notes, and snippets.

View jskrnbindra's full-sized avatar

Jaskaran Bindra jskrnbindra

  • Bangalore, India
View GitHub Profile
@Hermann-SW
Hermann-SW / picoload
Last active January 7, 2022 22:32
load a file to topmost flash location of Raspberry Pico, appended with 4-byte length
#!/bin/bash
len=`wc --bytes $1 | cut -f1 -d\ `
hex=`printf "%08x" $len`
ofs=$(((256+2)*1024*1024-4-len))
ofshex=`printf "%08x" $ofs`
cp $1 /tmp/picoload.bin
printf "\x${hex:6:2}\x${hex:4:2}\x${hex:2:2}\x${hex:0:2}" >> /tmp/picoload.bin
sudo picotool load /tmp/picoload.bin -o $ofshex
@ryhanson
ryhanson / ExcelXLL.md
Last active July 22, 2024 15:25
Execute a DLL via .xll files and the Excel.Application object's RegisterXLL() method

DLL Execution via Excel.Application RegisterXLL() method

A DLL can be loaded and executed via Excel by initializing the Excel.Application COM object and passing a DLL to the RegisterXLL method. The DLL path does not need to be local, it can also be a UNC path that points to a remote WebDAV server.

When delivering via WebDAV, it should be noted that the DLL is still written to disk but the dropped file is not the one loaded in to the process. This is the case for any file downloaded via WebDAV, and they are stored at: C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp\TfsStore\Tfs_DAV\.

The RegisterXLL function expects an XLL add-in which is essentially a specially crafted DLL with specific exports. More info on XLL's can be found on MSDN

The XLL can also be executed by double-clicking the .xll file, however there is a security warning. @rxwx has more notes on this here inc