Page 1 of 1 1
Topic Options
#111118 - 2004-01-01 04:40 PM File Summary for tokenized scripts
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
When working on multiple variations of a script, one can always keep track of the variations by reviewing the code. Unfortunately, with the tokenized version that is no longer possible. Relying a naming scheme or time stamps just won't do.

It would be nice if we could have a few comment fields that would be populated in the script which would then appear as clear text in a header of the tokenized code. Possibly those same fields could also be viewed in the file Properties | Summary dialog. The fields available there are:
Title:
Subject:
Author:
Category:
Keywords:
Comments:
Source:
Revision Number:
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#111119 - 2004-01-05 02:07 PM Re: File Summary for tokenized scripts
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Having a plain text preamble is not a bad idea, but in the mean time why not just include a version print routine at the very start of your script?

Code:
If IsDeclared($ShowVersion)
"File: vinfo.kix"
"Desc: Version Info Example"
"Version: 1.0.0" ?
"Created: 5th January 2004" ?
"Creator: Richard Howarth" ?
Exit 0
EndIf



The version information will be printed when you call the script with:
Code:
kix32.exe myscript.kx $ShowVersion



Things could get a bit messy with the proposed "INCLUDE" to inline subscripts - how would you see those being represented? Collate all the info/preamble at the top of the script? Have a KiXtart switch to print the preamble/info fields?

Top
#111120 - 2004-01-05 02:18 PM Re: File Summary for tokenized scripts
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
because, you would want to know what the script is/does... you could rename the script and you wouldn't know what it does. if the tokenized script is also CRC'd you couldn't change the preamble without killing the code
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#111121 - 2004-01-05 03:38 PM Re: File Summary for tokenized scripts
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

because, you would want to know what the script is/does... you could rename the script and you wouldn't know what it does. if the tokenized script is also CRC'd you couldn't change the preamble without killing the code



I don't understand your point - perhaps you misunderstood my post, which was suggesting an interim solution.

Could you elaborate?

Top
#111122 - 2004-01-05 04:06 PM Re: File Summary for tokenized scripts
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
well, with your example, you would have to run the code to determine what it was.

My point is that a simple text header would let someone determine what the code was, if someone were to manually edit the header info, the CRC would change and then kill the code... you would have to re-tokenize from the source ... simple measure of security... prevent the code from being tampered with, or replaced with an unexpected code.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#111123 - 2004-01-05 05:00 PM Re: File Summary for tokenized scripts
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
I thought that's what you might have meant - I was actually supporting the idea of a preamble but also providing an interim solution until it becomes available.

If the version info is in the code then it is also protected by the CRC of course, although running untrustworthy code is always going to be a gamble.

I'm not sure how stopping someone changing the comment/preamble section provides much security. I assume that you think that (some of) the fields should be auto-generated rather than manually entered? That would help a little although much of the information could be spoofed and CRCs are pretty simple to manipulate if you are planning somthing underhand.

If you are really concerned about the integrity of the files you would probably be better off maintaining independant MD5 hashes.

Top
Page 1 of 1 1


Moderator:  Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 557 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.059 seconds in which 0.027 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org