Page 1 of 1 1
Topic Options
#198981 - 2010-07-12 02:49 PM KX Files
KevinBugg Offline
Fresh Scripter

Registered: 2010-07-12
Posts: 5
Loc: UK
Hi,

I am new to Kix Scripting and inherited a network that runs kix scripts for everything. Im trying to get into the scripts to see what they say and do etc but the file is called logon.kx. I was expecting a *.kix file. Further research shows that it appears this has been compiled with an additional exe file. How do I get into these files? What program do I use? Is it even possible for me to uncomplile these?

Help would be appreciated as google isn't helping at the moment!

Regards
Kev

Top
#198982 - 2010-07-12 02:56 PM Re: KX Files [Re: KevinBugg]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Hi, and welcome to the board.

It is not possible to decrypt a KX file. That would defeat the purpose of encrypting it :-)
The original author will most likely have been smart enough to keep his source files somewhere.

Top
#198983 - 2010-07-12 03:18 PM Re: KX Files [Re: Arend_]
KevinBugg Offline
Fresh Scripter

Registered: 2010-07-12
Posts: 5
Loc: UK
Thanks for the response. I had a feeling you would say that! Being new to this, does the *.kx file then contain a range of *.kix scripts that are called? The reason why I ask is that we have some hard copy of the main script but it referes to a file path / structure that we do not see, this this structure likely to be contained in the *.kx file or the kix.exe file?

Kev

Top
#198984 - 2010-07-12 03:56 PM Re: KX Files [Re: KevinBugg]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
The *.kx file is a tokenised version of the original plaintext *.kix file.

It may well include CALLs to other scripts (which may or may not be tokenised themselves). These are read in at run time as the CALL statement is executed.

It may also originally have had INCLUDEs, which pull other files in at tokenisation time and create a monolithic stand-alone script.

Path information is not hard-coded into the kix32.exe intepreter.

Top
#198985 - 2010-07-12 04:25 PM Re: KX Files [Re: Richard H.]
KevinBugg Offline
Fresh Scripter

Registered: 2010-07-12
Posts: 5
Loc: UK
Thanks, I am even more confused then. For example, (my print out copy)shows that the script sets a variable

Call '@LSERVER\netlogon\kixtart Files\site.kix'

I am not seeing this structure anywhere. I can browse to my netlogon share but the structure of kixtart Files\site.kix does not exist.

Where am I going wrong?

Top
#198986 - 2010-07-12 04:44 PM Re: KX Files [Re: KevinBugg]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
 Originally Posted By: KevinBugg

Thanks, I am even more confused then. For example, (my print out copy)shows that the script sets a variable

Call '@LSERVER\netlogon\kixtart Files\site.kix'

I am not seeing this structure anywhere. I can browse to my netlogon share but the structure of kixtart Files\site.kix does not exist.

Where am I going wrong?


The line above calls the site.kix script from the netlogon\kixtart files folder on the current logon server (@LSERVER). @LSERVER can be any of your domain controlers so the file should exist on all domain controllers in the netlogon\kixtart files folder. This folder is replicated so if replication isnw0rking ok it should exist on all DC's. If the file does not exist the call command will fail and continue to the next step in the script.

Kixtart sets some default variables at startup. They are called macros and start with @.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#198987 - 2010-07-12 05:46 PM Re: KX Files [Re: Mart]
KevinBugg Offline
Fresh Scripter

Registered: 2010-07-12
Posts: 5
Loc: UK
Thanks for your response Mart. I have been to each DC and can confirm that this location doesn't exist, I have no idea how this is all pieced together. Are there any ways in which *.kix script files are hidden within a *.kx compiled file?/ Thats my only other explanation
Top
#198993 - 2010-07-13 12:07 AM Re: KX Files [Re: KevinBugg]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Try going in at the SYSVOL level and looking for ALL .KIX .KX .UDF files.

Click on START - RUN \\servername\SYSVOL

Top
#198994 - 2010-07-13 10:10 AM Re: KX Files [Re: NTDOC]
KevinBugg Offline
Fresh Scripter

Registered: 2010-07-12
Posts: 5
Loc: UK
thanks, I have tried this and nothing is found. Its obviously working but I am unsure how it all pieces together...i will have to keep digging.
Top
#198995 - 2010-07-13 10:13 AM Re: KX Files [Re: KevinBugg]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
 Originally Posted By: KevinBugg
I have been to each DC and can confirm that this location doesn't exist, I have no idea how this is all pieced together. Are there any ways in which *.kix script files are hidden within a *.kx compiled file?/ Thats my only other explanation


No, not in the way that you mean.

*.kix files are plain text, so of course any KiXtart script can create another KiXtart script file on the fly and CALL it. However your users won't have write access to the netlogon share so it won't be true in this case.

Another technique is to include multiple "scripts" in a single file as discrete code and then get the script to create new instances of itself by using SHELL or RUN, passing parameters to control what code is executed in the new instance (kind of like forking in other languages but without preserving the run time environment).

I don't think either of these applies in your case, it's more likely that someone has moved, renamed or deleted the script directory and that change has replicated to all your DCs.

Top
#198997 - 2010-07-13 10:29 AM Re: KX Files [Re: KevinBugg]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
 Originally Posted By: KevinBugg
...Its obviously working...


You sure? CALL will not generate an abend if the file (or path) does not exist.

Older versions of KiXtart (e.g. 4.53) will set @ERROR, but it is up to you to decide if it is significant or not.

So the script may be running to completion without error but if your missing files were supposed to be doing something useful then they are not doing it any more.

The missing files could of course be optional or obsolete code, in which case the fact that they are missing is not significant.

Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 1172 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.067 seconds in which 0.031 seconds were spent on a total of 13 queries. Zlib compression enabled.

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