Articles by Tris Forster

Resetting VBA passwords

Wed 26 May 2010

Dont waste your money on 'Password Recovery Tools'!

The following perl oneliner will change the password to 'unlocked'.

perl -pe 's/DPB="[A-F0-9]+"/DPB="B4B6182718713571358ECB723594D9F51AEB7F0E3ECB35E389309035ADD32D4F47176BF5ECD2"/' locked.xls > unlocked.xls

Tested with Excel and Word (2003). Note this is just for VBA passwords, not sheet/document protection, though I'm sure there …

Spliting strings in Bash

Tue 28 April 2009

Using string modifiers to extract part of a string

$ x=a:b:c
$ echo ${x%:*}
a:b
$ echo ${x%%:*}
a
$ echo ${x#*:}
b:c
$ echo ${x##*:}
c

« 1 2