Page 4 of 5 <12345>
Topic Options
#98101 - 2003-01-20 09:44 AM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Patrick,
  • "-t" option is for use with the encrypted program "crypted.exe", not with kixcrypt. If you do "crypted.exe /?" (or -h) you will see it documented - you won't see it documented in the kixcrypt message as it is not relevant in that mode.
  • "-f" option - you are quite right, I missed it off the usage message. Will be fixed in the next release.
  • "^s" is an alias for "%s" and is documented in this thread somewhere. I will be writing new documentation at some time, but the GUI interface sounds like a lot more fun [Wink] As the "%s" format is deprecated because it can cause problems I will change the message.
  • Version history - "kixcrypt -v" will give you a full version history. All my errors made public.
The console thing. This comes up a lot, and I really don't have the answer [Frown]
A crypted.exe created with "wkxcrypt" does not create a console when it it executed. Unfortunately, the "system()" call that I use to execute the unencrypted script does create a console.
If anyone has an idea how to execute arbitrary DOS commands from a MinGW compiled exe without creating a console please give me a shout and let me know.

Top
#98102 - 2003-01-20 05:19 PM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
KiXcrypt GUI interface.

As a response to the huge number of request (Hi Shawn) I've knocked together a simple GUI interface to the KiXcrypt utility.

It is basically a KiXtart script using IE COM calls, and some JavaScript.

I'm not posting the script here as it is chock-a-block full of HTML code so it'll be a real problem to post to this forum.

This is beta quality - not all KiXcrypt options are supported, there are no instructions and garbage-in will get you garbage-out.

However it seems to work OK, so I'm looking for some feedback. I'd like to know of any problems, extra features it needs, and whether it is worth me spending any more time on it.

Instructions for use:
1) Download the script from here
2) Ensure that kixcrypt.exe is in an executable location, i.e. your PATH or the current directory
3) Run "kix32.exe kcgen.kix"
4) Fill in the blanks and then hit the "Execute" button.
5) Keep generating the crypted.exe until you are happy (or bored), then close the IE window when you are done.

A temporary file kcgen.html will be created in your %TEMP% directory and removed when your done.

Please let me know how you get on.

Top
#98103 - 2003-01-23 04:49 PM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
What, no takers?

Maybe a screenshot will whet your appetite:
 -

Top
#98104 - 2003-01-23 07:51 PM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
Neat, I suggest you get one of our members to post your code on their site. If it is easier to get more people will take it for a ride.
_________________________
Jack

Top
#98105 - 2003-01-23 08:02 PM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I placed the code in general as it has html disabled:
http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=14&t=000376

{edit}
now also later in this thread.
{/edit}

[ 27. January 2003, 05:56: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#98106 - 2003-01-24 05:04 AM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Tan Bandradi Offline
Fresh Scripter

Registered: 2001-04-17
Posts: 31
Dear Richard,

Does the "-k" option on KiXcrypt version 2.16b also applicable to prevent support file deletion (file that added with "-f" option) including the primary script file deletion?

Because I would prefer to delete the support file from the script alternatively, the support file deletion by KiXcrypt sometime fail, and the unpacking process on KiXcrypt will be aborted at the next execution, and the final result is KiXtart script execution will fail.

What I did is to include file kix32.exe, kx16.dll, kx32.dll, and kx95.dll together with the primary script by using the "-f" option. This support file will be unpacked and the kix32.exe will be executed to run the primary script.

I did this because I don't want to put KiXtart files on netlogon share, the script replication on domain controllers sometime fail because the .dll file is in use.

Thank you in advance,
Tan

Top
#98107 - 2003-01-24 05:23 AM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Richard, your appz are gui, gui good. Well done.
Top
#98108 - 2003-01-24 10:21 AM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Richard H. Administrator Offline
Administrator
*****

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

The file deletion process is as follows:
[1] For the primary file only (which is normally your KiXtart script) some extra KiXtart script is tacked onto your script. This extra code immediately attempts first to overwrite, then to delete itself. This works because the entire script is read into memory so the file can be removed. The purpose of this is to leave the unencrypted file around for as short a time as possbile. Once the overwrite/delete has completed control is passed to your own script.

[2] Once your script has finished running the calling program (crypted.exe) checks to see if your script is still present i.e. the delete failed. You will get an warning message that the file is still present, and crypted.exe will itself attempt to overwrite then delete the file.

[3] All support files are then deleted.

In summary, the support files are not deleted until the script has finished running, so you can delete them yourself, rename them, copy them or open/read them in your script.

The only exception to this is if your script "escapes" the controlling crypted.exe, in which case it will think the script has finished and delete the files while the script is running.

You could escape control by RUNning a new process and exiting the original script for instance, or by using the "START" command.

The "-k" option disables step [1] only.
This is useful if your primary file is not a KiXtart script. You might have packaged an executable, an Excel spreadsheet or a DOS batch file in which case adding KiXtart script to the file would render it useless.

Top
#98109 - 2003-01-25 02:00 AM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
trying the code in here.

{edit}
code removed as not sure who's code had the error.
{/edit}

[ 27. January 2003, 04:24: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#98110 - 2003-01-27 04:51 AM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, I checked my code poster and can't find anything wrong in it. so re-posting the code

{edit}
did I say I hate this board?
{/edit}

[ 27. January 2003, 05:05: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#98111 - 2003-01-27 05:14 AM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK


Break On

;
; Gui interface for creating encrypted KiXtart packages.
;
; This is BETA quality - no serious bugs, but not yet completed.
;
; Enjoy!
;
; Richard Howarth (rhowarth@sgb.co.uk)
;

Global $HTMLFILE
$HTMLFILE="%TEMP%\kcgen.html"

Del $HTMLFILE

"Generating HTML File..." ?
Call fnMakeHTML()

"Starting IE instance..." ?
$oIE = CreateObject("InternetExplorer.Application")
$oIE.Visible=1
$oIE.Navigate($HTMLFILE)
; Wait for page to stop loading...
While $oIE.busy AND $oIE.readystate <4 AND @ERROR = 0 Loop
$oDoc=$oIE.document

$nul=SetConsole("HIDE")
$iStatus=$oDoc.frmMain.Status.value
While @ERROR=0
 If $iStatus=1
  $oDoc.frmMain.Status.value=0
  $nul=SetConsole("SHOW")
  $nul=SetConsole("FOREGROUND")
  Cls
  "Generating crypted.exe - check below for errors..." ?
  "-----OUTPUT BEGINS-----" ?
  Shell $oDoc.frmCommand.textCommand.value
  "-----END OF OUTPUT-----" ?
  "Hit return to continue: " Gets $nul ?
  $nul=SetConsole("HIDE")
  Cls
 EndIf
 Sleep(0.5)
 $iStatus=$oDoc.frmMain.Status.value
Loop
$nul=SetConsole("SHOW")
$nul=SetConsole("FOREGROUND")

; Clean up and exit.
Del $HTMLFILE
Exit 0

Function fnMakeHTML()
    $nul=RedirectOutput($HTMLFILE)
    "<HTML>
     <SCRIPT Language=JAVASCRIPT>
     function fnAddSupportFile() {
      if(fnSelectionExists(frmMain.selFiles,frmAddSupport.fileSupport.value)==false) {
       if(frmAddSupport.fileSupport.value!='') {
           frmMain.selFiles.options[frmMain.selFiles.options.length]=new Option(frmAddSupport.fileSupport.value)
       }
      }
      fnMakeCommand();
      return true;
     }
   
     function fnDeleteSupportFile() {
      var iLoop
      for(iLoop=frmMain.selFiles.options.length;iLoop--;) {
       if(frmMain.selFiles.options[iLoop].selected){
        frmMain.selFiles.options[iLoop]=null
       }
      }
      frmAddSupport.reset();
      fnMakeCommand();
      return true;
     }
   
     function fnSelectionExists(selList,sValue) {
      var iLoop
      for(iLoop=selList.options.length;iLoop--;) {
       if(selList.options[iLoop].text==sValue)
        return true
      }
      return false
     }
   
     function fnMakeCommand() {
      var iLoop
      frmCommand.textCommand.value=''
      if(frmPrimaryFile.filePrimary.value=='')
       return false;
      frmCommand.textCommand.value='kixcrypt';
      if(frmOptions.radioDebug[0].checked==true)
       frmCommand.textCommand.value=frmCommand.textCommand.value + ' -d'
      if(frmOptions.radioIsKix[0].checked==false)
       frmCommand.textCommand.value=frmCommand.textCommand.value + ' -k'
      if(frmOptions.radioUseCOMSPEC[0].checked==false)
       frmCommand.textCommand.value=frmCommand.textCommand.value + ' -c'
      if(frmOptions.textPassword.value!='')
       frmCommand.textCommand.value=frmCommand.textCommand.value+' -p "
 '"' "'+frmOptions.textPassword.value + '" '"' "'
      for(iLoop=frmMain.selFiles.options.length;iLoop--;) {
       frmCommand.textCommand.value=frmCommand.textCommand.value+' -f "
 '"' "'+frmMain.selFiles.options[iLoop].text + '" '"' "'
      }
      frmCommand.textCommand.value=frmCommand.textCommand.value+' -m "
 '"' "'+frmOptions.textMessage.value + '" '"' "'
      frmCommand.textCommand.value=frmCommand.textCommand.value+' "
 '"' "'+frmPrimaryFile.filePrimary.value + '" '"' "'
      if(frmOptions.textProgram.value!=''){
       frmCommand.textCommand.value=frmCommand.textCommand.value+' '
       if(frmOptions.radioExeInPackage[0].checked==true){
        frmCommand.textCommand.value=frmCommand.textCommand.value + '%%%%KIXCRYPTDIR%%%%\\'
       }
       frmCommand.textCommand.value=frmCommand.textCommand.value+frmOptions.textProgram.value
      }
      return true;
     }
   
     function fnExecuteCommand() {
      frmMain.Status.value=1
     }
   
     </SCRIPT>
    <HEAD>
     <TITLE>KiXcrypt command line generator</TITLE>
    </HEAD>
    <BODY>
     <TABLE Align=Center>
     <FORM Name=frmPrimaryFile>
      <TR BGCOLOR=LightBlue>
       <TD>Primary file to encrypt:</TD>
       <TD><INPUT Type=FILE Name=filePrimary onChange='fnMakeCommand();'></TD>
      </TR>
     </FORM>
     <FORM Name=frmOptions>
      <TR>
       <TD>Is this a KiXtart script file?</TD>
       <TD>
        Y<INPUT Type=RADIO Name=radioIsKix Checked onclick ='fnMakeCommand()' onChange='fnMakeCommand()'>
        N<INPUT Type=RADIO Name=radioIsKix onclick ='fnMakeCommand()' onChange='fnMakeCommand()'>
       </TD>
      </TR>
      <TR BGCOLOR=LightBlue>
       <TD>Display DEBUG output?</TD>
       <TD>
        Y<INPUT Type=RADIO Name=radioDebug onclick ='fnMakeCommand()' onChange='fnMakeCommand()'>
        N<INPUT Type=RADIO Name=radioDebug Checked onclick ='fnMakeCommand()' onChange='fnMakeCommand()'>
       </TD>
      </TR>
      <TR>
       <TD>Include %COMSPEC% in command line?</TD>
       <TD>
        Y<INPUT Type=RADIO Name=radioUseCOMSPEC Checked onclick ='fnMakeCommand()' onChange='fnMakeCommand()'>
        N<INPUT Type=RADIO Name=radioUseCOMSPEC onclick ='fnMakeCommand()' onChange='fnMakeCommand()'>
       </TD>
      </TR>
      <TR BGCOLOR=LightBlue>
       <TD>Password:</TD>
       <TD><INPUT Type=TEXT Name=textPassword Size=20 Value='' onChange='fnMakeCommand()'></TD>
      </TR>
      <TR>
       <TD>
        Start up message:<BR>
        <FONT SIZE=-1>You may include the following in your text:<BR>
        &nbsp;&nbsp;$s : Replaced with the program name<BR>
        &nbsp;&nbsp;$v : Replaced with the program version<BR>
        &nbsp;&nbsp;$n : Replaced with a newline<BR></FONT>
       </TD>
       <TD VALIGN=Top><INPUT Type=TEXT Name=textMessage Size=40 Value='' onChange='fnMakeCommand()'></TD>
      </TR>
      <TR BGCOLOR=LightBlue>
       <TD>
        Command to execute unencrypted file:<BR>
        <FONT SIZE=-1>&nbsp;&nbsp;The '^s' will be replaced with the unencrypted filename</FONT>
       </TD>
       <TD VALIGN=Top><INPUT Type=TEXT Name=textProgram Size=40 Value='kix32.exe ^s' onChange='fnMakeCommand()'></TD>
      </TR>
      <TR>
       <TD>Is interpreter (e.g. kix32.exe) included in package?</TD>
       <TD>
        Y<INPUT Type=RADIO Name=radioExeInPackage onclick ='fnMakeCommand()' onChange='fnMakeCommand()'>
        N<INPUT Type=RADIO Name=radioExeInPackage Checked onclick ='fnMakeCommand()' onChange='fnMakeCommand()'>
       </TD>
      <TR>
     </FORM>
     <TR BGCOLOR=LightBlue>
      <TD Valign=TOP>Additional support files:</TD>
      <TD>
       <FORM Name=frmAddSupport>
       <INPUT Type=FILE Name=fileSupport Value='abcd' onSelect='fnAddSupportFile()' onChange='fnAddSupportFile()'>
       </FORM>
       <FORM Name=frmMain>
       <INPUT Type=HIDDEN Name=Status Value=0>
       <SELECT Name=selFiles Size=3 Multiple WIDTH=40></SELECT><BR>
       <INPUT Type=BUTTON Value='Remove Selected Files' onclick ='fnDeleteSupportFile()'>
       </FORM>
      </TD>
     </TR>
     <FORM Name=frmCommand>
      <TR>
       <TD ColSpan=2 Align=CENTER>
        <TEXTAREA Name=textCommand ROWS=3 COLS=70 onFocus='this.blur();'>
        </TEXTAREA>
       </TD>
      </TR>
      <TR>
       <TD ColSpan=2 ALIGN=CENTER>
        <INPUT Type=BUTTON Name=btnExecute Value='Execute Command!' onclick ='fnExecuteCommand()'>
       </TD>
     </FORM>
     </TABLE>
    </BODY>
    </HTML>"

    $nul=RedirectOutput("")
    Return
EndFunction

_________________________
!

download KiXnet

Top
#98112 - 2003-01-28 09:30 AM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Any particular reason that this has been moved into General Discussions?
Top
#98113 - 2003-01-28 10:12 AM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
[Eek!]

Hehe ... this is probably the first Topic in General that has html Code inside (See Jooels Reply)

Maybe the control meachanisms aren't that good when topics are moved !
_________________________



Top
#98114 - 2003-01-28 03:39 PM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Actually, two reasons. KiXCrypt is not a script example and does not contain (KiXtart) scripts. Also, as a utility/tool it would be better served in the 'General' forum as it does not qualify for any of the other forums.
_________________________
There are two types of vessels, submarines and targets.

Top
#98115 - 2003-01-28 03:44 PM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
but this GUI peace separately in it's own topic/thread would fit to scripts...

better to com though.
_________________________
!

download KiXnet

Top
#98116 - 2003-01-28 03:46 PM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Then you might want to post the GUI script into it's own thread. I'd prefer it that way anyway. Call it KiXCrypt GUI and refer to the KiXCrypt thread for the .EXE package.

[ 28. January 2003, 15:48: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#98117 - 2003-01-28 04:53 PM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
I guessed that was the reason, I just wanted to make sure it hadn't been moved in error - I didn't spot the notice edited onto the first post.

First posted in November 2001 - do you remember when we only had three (four?) forums, and KiXtart COM automation was only attempted by Absinthe drinking pot smokers who weren't entirely sane.

Top
#98118 - 2003-01-28 04:55 PM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Yeah, the good old times...drifting away soaking in nearly-lost memories of times long gone...
_________________________
There are two types of vessels, submarines and targets.

Top
#98119 - 2003-01-28 04:56 PM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Those were the Times !

But what would several Absynth drinking Pot smoking people do without being able to COM [Eek!] [Razz]
_________________________



Top
#98120 - 2003-01-28 05:17 PM Re: UTILITY: KiXcrypt 2.16b - KiXtart encryption
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
j, you asking from me?

ofcourse drink some more!
_________________________
!

download KiXnet

Top
Page 4 of 5 <12345>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, 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.075 seconds in which 0.026 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