Jump to content
Sign in to follow this  
Innovative

_StringEncrypt is returning ""

Recommended Posts

So how.. Whats the prob -.-

P.S. : You said you wanted to SEE the result.. so i posted the image instead.

By that I meant text. Usually that is what we want when we want to see the results of something that is returned AS TEXT!

Share this post


Link to post
Share on other sites

Well that leaves

StringToBinary($v_EncryptModified)

And

$v_EncryptModified = $v_EncryptModified & Chr(BitXOR(Asc(StringMid($s_EncryptText, $i_EncryptCountG, 1)), Asc(StringMid($s_EncryptPassword, $i_EncryptCountH, 1)), 255))

As the suspect... My guess would be StringToBinary($v_EncryptModified)


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

By that I meant text. Usually that is what we want when we want to see the results of something that is returned AS TEXT!

We're going off-topic.. Lets come back =)

Well that leaves

StringToBinary($v_EncryptModified)

And

$v_EncryptModified = $v_EncryptModified & Chr(BitXOR(Asc(StringMid($s_EncryptText, $i_EncryptCountG, 1)), Asc(StringMid($s_EncryptPassword, $i_EncryptCountH, 1)), 255))

As the suspect... My guess would be StringToBinary($v_EncryptModified)

What you mean by that ? you mean the problem is with the include file ?

Share this post


Link to post
Share on other sites

Nope but try first to tell me what

$buffer = StringToBinary("Hello - ä½ å¥½")

MsgBox(4096, "String() representation" , $buffer)

$buffer = BinaryToString($buffer)

MsgBox(4096, "BinaryToString() ANSI representation" , $buffer)

gives


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

What do you get with the likes of:

$buffer = StringToBinary("1")
$output = "StringToBinary Returned: " & $buffer & @CRLF
MsgBox(4096, "String() representation" , $buffer)
$buffer = BinaryToString($buffer)
$output &= "BinaryToString Returned:" & $buffer & @CRLF
MsgBox(4096, "BinaryToString() ANSI representation" , $buffer)
ClipPut ($output)

I got:

StringToBinary Returned: 0x31
BinaryToString Returned:1

Share this post


Link to post
Share on other sites

$buffer = StringToBinary("ä")
$output = "StringToBinary Returned: " & $buffer & @CRLF
MsgBox(4096, "String() representation" , $buffer)
$buffer = BinaryToString($buffer)
$output &= "BinaryToString Returned:" & $buffer & @CRLF
MsgBox(4096, "BinaryToString() ANSI representation" , $buffer)
ClipPut ($output)

Share this post


Link to post
Share on other sites

So how.. Whats the prob -.-

P.S. : You said you wanted to SEE the result.. so i posted the image instead.

Copy and Paste the results and enclose them with quote tags.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

zzz ? you posted that again for ?

Because I changed it, and last time I checked, you were the one with the problems, not us, and we are try to help you.

Copy and Paste the results and enclose them with quote tags.

Please.

Share this post


Link to post
Share on other sites

That fails too.. Anyway, im using Avast antivirus , is there a possiblity that avast might stop the script from running or what ?

EDIT : I've tried disabling avast and try running the script.. But it still fails..

No, I don't think Avast is your problem, but even if it was, I would want to know exactly where in the script (which native AutoIt function) was effected.

You made this unnecessarily difficult by posting a screen shot instead of the console output. Please post the text from the console to make it easier to compare results. We already have a preliminary finding: There is a loop in the encryption that runs exactly twice in our example. The first time through you get the correct results, the second time through you don't. We're getting closer...

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

No, I don't think Avast is your problem, but even if it was, I would want to know exactly where in the script (which native AutoIt function) was effected.

You made this unnecessarily difficult by posting a screen shot instead of the console output. Please post the text from the console to make it easier to compare results. We already have a preliminary finding: There is a loop in the encryption that runs exactly twice in our example. The first time through you get the correct results, the second time through you don't. We're getting closer...

:)

I'm quite bad in my english .. So i dont really understand what i should do to solve this problem..

Share this post


Link to post
Share on other sites

$buffer = StringToBinary("ä")
$output = "StringToBinary Returned: " & $buffer & @CRLF
MsgBox(4096, "String() representation" , $buffer)
$buffer = BinaryToString($buffer)
$output &= "BinaryToString Returned:" & $buffer & @CRLF
MsgBox(4096, "BinaryToString() ANSI representation" , $buffer)
ClipPut ($output)
Post the results in a code box...

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...