CRYPT anomoly......

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
shocam
Newbie
Posts: 16
Joined: Thu Jun 08, 2006 8:03 am

CRYPT anomoly......

Post by shocam » Sun Feb 25, 2007 10:28 am

Not sure if anyone else has discovered this......

If you use the command CRYPT with particular keys it can produce strange results! An example can be seen below using a simple script I found on this site:

the script is by JRL, use the second one on there........

http://www.mjtnet.com/forum/viewtopic. ... ht=crypt

Right, If you change to 96bit encryption and then enter the key as 798757646546, in the text entry box enter 11 letters or numbers in any combination (e.g. h1n3rio7dx). Now, on the twelfth character enter lower case s. If you have VB>eval switched on you will get an error, if you turn off VB>eval, the script you will notice that it will not encrypt anything after the letter s!!!

You may be wondering how I managed to find this issue.......well, I have created a password script and kept noticing that when when reading back some of the passwords, letters were being dropped off the end. After much swearing and loss of hair, this is what I have discovered. This is not limited to only this key, before realising the pattern, I have tried various keys of different lengths and each one seems to have a failure of some sort.

Does anybody know of a fix for this, or even a key thats wont fail!!
Last edited by shocam on Sun Feb 25, 2007 12:41 pm, edited 1 time in total.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sun Feb 25, 2007 11:09 am

I don't get any errors. But then I can't enter "798757646546" in the key box as you suggest because the key box only accepts 4 chars.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

shocam
Newbie
Posts: 16
Joined: Thu Jun 08, 2006 8:03 am

Post by shocam » Sun Feb 25, 2007 11:14 am

you need to click in the radio box for 96bit encryption.....

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sun Feb 25, 2007 12:22 pm

I did.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

shocam
Newbie
Posts: 16
Joined: Thu Jun 08, 2006 8:03 am

Post by shocam » Sun Feb 25, 2007 12:38 pm

Sorry Marcus
for some reason when i paste the script into here it gets changed!!!

the script is by JRL, use the second one on there........

http://www.mjtnet.com/usergroup/viewtop ... ight=crypt

:oops:

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sun Feb 25, 2007 2:41 pm

This is just the crypt function creating a string with a character that VBScript can't handle. Need to find out what it is and try to substitute. Or what is really needed is a native version of VBScript's Escape function.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

shocam
Newbie
Posts: 16
Joined: Thu Jun 08, 2006 8:03 am

Post by shocam » Mon Feb 26, 2007 9:13 am

Not really sure how to go about that to be honest........it does seem to depend on the key being used as to what character will affect it.

:?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts