|
|
|||||||
Has there been any previous suggestion (I've already looked and can't find any...which doesn't mean it doesn't exist) regarding kix and i/o streams. Specifically, modifying kix so that it will accept either a file or a generic i/o stream. If it's able to accept a stream, then it would be trivial to provide custom encryption/obfuscation/protection for scripts. |
||||||||
|
|
|||||||
Yes, see for example Suggestion: Binary file operations |
||||||||
|
|
|||||||
Notepad and KiXtart can create and access NTFS streams. Notepad must do it from the commandline. Create a file with notepad.exe called "test.txt". add some text and save. Then use the line below to create a stream. Add some text and save. Check your directory there will be only test.txt. Reopen the file and the stream with notepad to verify their existence. code:Now run this code with KiXtart.notepad test.txt:stream1.txt KiXtart 4.02 can read streams. code:IF Open(3, "c:\data\scripts\test.txt:stream1.txt") = 0 [ 19. July 2003, 22:18: Message edited by: Howard Bullock ] |
||||||||
|
|
|||||||
Kixtart creating, writing, and reading an NTFS stream. KiXtart is not required to have the ".txt" as part of the stream name, but if you want to verify the stream with notepad.exe you will have to include the ".txt". [ 19. July 2003, 22:19: Message edited by: Howard Bullock ] |
||||||||
|
|
|||||||
More info about using streams. quote: |
||||||||
|
|
|||||||
Ok, for anyone else (like me) who saw this and got interested - NTFS streams are not the answer. When Stevie is asking about reading from IO streams, what he is specifically referring to is what in the *nix world would be stdin. This is normally attached to keyboard input but can be attched to the output of another program where the operating system supports pipes. NTFS streams are not IO streams as most people understand them They are simply named file sections. You cannot use them to communicate between processes, or "pipe" information. Note, KiXtart can read piped input using GetS, but it is kludgy and there is no way to reconnect input back to the keyboard. Some ways of achieving this:
|
||||||||
|
|
|||||||
quote:That sounds most appealing to me. It's also the most straightforward. Before I get all carried away, is this even something Ruud would consider adding? |
||||||||
|
|
|||||||
Forgive for being thick. what would be the application for: quote: |
||||||||
|
|
|||||||
The bottom line on this is that it would allow you to send a script to kix32 without that script needing to be a file. A possible usage of this would be to have an encrypted script file decrypted by some external process (kixcrypt perhaps??) and then sent directly to kix without having to create an unencrypted version of the file. It would make script encryption/obfuscation even more secure. Another possible use would be to dynamically create a script and spawn it via a second instance of kix without writing it out to a file first. |