Page 1 of 1 1
Topic Options
#72196 - 2002-12-10 04:24 PM How to encrypt a binary file
wandan Offline
Getting the hang of it

Registered: 2000-10-05
Posts: 50
Hello.

I would like to write a kix script to encrypt (xor) a binary file.
But how can I read an write a binary file? The readline and writline dosnīt work..

Any Idea?

Regards
Danny

Top
#72197 - 2002-12-10 04:27 PM Re: How to encrypt a binary file
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
there is no way.
kix has no binary handling inbuild.
anyway, kixcrypt already has this, why you would like to code a script for this?
_________________________
!

download KiXnet

Top
#72198 - 2002-12-10 04:39 PM Re: How to encrypt a binary file
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Search for 'kixcrypt' at KiXtart BBS Search

[ 10. December 2002, 16:58: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#72199 - 2002-12-10 04:57 PM Re: How to encrypt a binary file
wandan Offline
Getting the hang of it

Registered: 2000-10-05
Posts: 50
Hello.

I need to encrypt a binary file. And with any additional software want to rebuild it on another computer. I thought about doint it with kix.

But VBScript also would work.

Any idea, how to handel it in VB?

Regards
Danny

Top
#72200 - 2002-12-10 04:59 PM Re: How to encrypt a binary file
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you would call encrypt api.
for that you should check:
http://msdn.microsoft.com
_________________________
!

download KiXnet

Top
#72201 - 2002-12-10 05:01 PM Re: How to encrypt a binary file
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Just remember that the Crypto API is not scriptable.
_________________________
There are two types of vessels, submarines and targets.

Top
#72202 - 2002-12-10 05:03 PM Re: How to encrypt a binary file
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
heh.
also, forgot that he wants to do it himself...

so, that wouldn't work anyway.

sorry wandan, if you want to crypt XOR by yourself, I think that is what you need to do.
_________________________
!

download KiXnet

Top
#72203 - 2002-12-10 05:11 PM Re: How to encrypt a binary file
wandan Offline
Getting the hang of it

Registered: 2000-10-05
Posts: 50
Hi.

Thanks for your answers. The only thing I need, is a way to binary read a file. Kix canīt do this..

Vbscript can ?

Regards
Danny

Top
#72204 - 2002-12-10 05:14 PM Re: How to encrypt a binary file
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Don't know. Who needs VBScript if there's KiXtart? [Wink]

BTW, what's so important about a binary file that it needs to be encrypted, too?
_________________________
There are two types of vessels, submarines and targets.

Top
#72205 - 2002-12-10 05:17 PM Re: How to encrypt a binary file
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
it actually looks like he has somekind of assignment from a teacher.
who else would ask how to read binary file?
if it's someone who has made the file, he would already know that.
_________________________
!

download KiXnet

Top
#72206 - 2002-12-10 05:21 PM Re: How to encrypt a binary file
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
And more importantly, how are you going to unencrypt it?

Presumably you will also unencrypt it with KiXtart, which as it is easy to read and understand will render your encryption pretty useless.

You can write a simple XOR encryptor in C in a couple of lines. Or less.

Why are you encrypting the file and how do you intend to use it?

Top
#72207 - 2002-12-10 05:24 PM Re: How to encrypt a binary file
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You could also use a password-protected packager to encrypt a file.
_________________________
There are two types of vessels, submarines and targets.

Top
#72208 - 2002-12-11 05:40 PM Re: How to encrypt a binary file
wandan Offline
Getting the hang of it

Registered: 2000-10-05
Posts: 50
Hello.

The need for it is following:

I need to send a binary file trough a SMTP Gateway with mail sweeper. He scans the header of the file... And i only have kixscript and vb on both sides of the gateway. Therefor i canīt use another tools. I need to transform the binary into a mayby text file, and then send it trough the gateway. On the other side I have to "decrypt" it. I only have standard windows 2000 tools and kix.

Regards
Danny

Top
#72209 - 2002-12-11 05:58 PM Re: How to encrypt a binary file
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Oh dear.

You probably want to post this request on a BB that doesn't have a high proportion of system administrators as this one does then.

Top
#72210 - 2002-12-11 06:07 PM Re: How to encrypt a binary file
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
In that case we might want to contact your systems Administrator and inform him of your potentially malicious intent to compromise a secured network. Unless, of course, you can give us a plausible reason why you try to send this encrypted file and what it contains.

[ 11. December 2002, 18:08: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#72211 - 2002-12-11 07:03 PM Re: How to encrypt a binary file
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I've read through this post a few times and came to a different conclusion. I think Dan wants to encrypt the file in order to get it past an email filter.

KiX is able, with the help of FSO, to read binary. A search on this board should turn up some examples. On the other hand, I think there are a lot of freeware CODEC programs that could be used. Try to Google.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#72212 - 2002-12-11 07:08 PM Re: How to encrypt a binary file
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
That is how I understand it, too. However, why defeat the filter?
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 483 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.07 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