On 8/31/2012 16:18, Mark Morgan Lloyd wrote:
waldo kitty wrote:

i also used this technique to store registration data and options settings
directly in the executable instead of having a separate and external
configuration file...

i can post those old sources if anyone is interested... they only need ask...
the sources are dated May 1993 and i likely saved them from the Fidonet PASCAL
echo (message area)... they might have even ended up in the SWAG archives but
i don't know ;) -=B-)

I did this sort of thing back in the days of MZ files, where there was a simple
length field in the header.

and that's one of the thing this main routine uses to jump to the end real quickly... but there's also a set of starting and ending markers... plus the fact that the data is a "Typed Constant" is another factor... i don't recall for sure, but i think i've been told that FPC doesn't have typed constants???

I believe that NE files similarly had an accessible overall length, but they
also had a checksum field even though this was rarely (if ever) used.

interesting... this routine has a checksum item built into it... IIRC, it was so we could detect if the executable had been modified and abort operation if true...

Later Windows formats (PE etc.) might use signing/blessing/branding/checksumming
to varying extents, and I also think there was discussion of unix-style signing
in this (or a related) list a few weeks ago.

Which leaves me thinking that the safest way of doing it would be to look for an
"official" program, i.e. from MS or from unix binutils, which- if a program was
already signed- might request some sort of key before it would change anything.

Of course, an even safer way would be to leave the executable alone and to put
an early check in the startup code that a subsidiary key file existed, and for
that key to include something that identified the machine or site on which the
program was entitled to run.

true... but as i recall, one of the goals of this capability was to not have extra files laying about... i remember the days of dongles and never liked them at all...
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to