Archive: GRC Perfect Paper Password


GRC Perfect Paper Password
I'm trying to get Steve Gibson's Perfect Paper Passwords ppp.dll to work within NSIS using the System plugin. Thus far with no success.

I'm pretty sure it's something simple, AKA my Stupid is showing.

FYI:
* I copied the ppp.dll to my nsi's OutFile path.
* I'm focusing on getting the "ConvertAsciiTo128BitDecimal" function to work first as it can produce re-creatable results.

Documentation per the GRC site:

ConvertAsciiTo128BitDecimal
---------------------------
BinaryBuffer : Pointer to a 128-bit (16-byte) buffer which will receive the result of an ASCII to decimal conversion
AsciiString : Pointer to a null-terminated ASCII string containing only ASCII digits 0-9 and possibly commas.
Returns: 1 : Successful conversion with non-zero result.
0 : Zero result.
-1 : Invalid characters in string.
-2 : Overflow - binary conversion would have required more than 128-bits.

"ConvertAsciiTo128BitDecimal" performs an ASCII to decimal conversion upon a null-terminated input string which may contain commas (which will be ignored).
The 32-bit (signed) return value indicates the outcome of the operation.

(Why did you not post the code you already have?)

The docs on GRC are wrong, its not pascal, but stdcall, anyways, try:


!include LogicLib.nsh
Outfile test.exe
ShowInstDetails show
Section
Initpluginsdir
Setoutpath $pluginsdir
File ppp.dll
System::Alloc 16
pop $1
System::Call '$pluginsdir\ppp.dll::ConvertAsciiTo128BitDecimal(i r1,m "123,456")i.r0'
DetailPrint "return=$0"
${If} $0 >= 0
${For} $2 0 15
IntOp $0 $1 + $2
System::Call '*$0(&i1.r3)'
DetailPrint "Byte #$2 = $3"
${Next}
${EndIf}
System::Free $1
Setoutpath $temp
SectionEnd

Sorry about not posting what I had... by the time I posted on the forum I had deleted my working copy and was tinkering with something else to as I was just getting frustrated.


I'll try to avoid this in the future ^_^

I'll take a look at your example when I return to work tomorrow. Thanks for the quick reply. ;o)