Jump to content
Sign in to follow this  
Innovative

_StringEncrypt is returning ""

Recommended Posts

hmmmm...

Mine is:

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\francisb\Desktop\msn_test\tester.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams 
+>16:46:04 Starting AutoIt3Wrapper v.1.9.5.6    Environment(Language:0409  Keyboard:00000409  OS:WIN_XP/Service Pack 2  CPU:X86)
>Running AU3Check (1.54.10.0)  from:C:\Program Files\AutoIt3
+>16:46:04 AU3Check ended.rc:0
>Running:(3.2.10.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\francisb\Desktop\msn_test\tester.au3"   
Debug: $encrypt = 10249CAA2F88B4EB  @error = 0  @extended = 0
Debug: $dencrypt = test  @error = 0  @extended = 0
+>16:46:05 AutoIT3.exe ended.rc:0
>Exit code: 0   Time: 1.671

We do have different versions of AutoIt3Wrapper... could that be a reason?

Share this post


Link to post
Share on other sites

It's returning exactly what it should. You don't call _StringEncrypt that way.

$String = "Test This String"
_StringEncrypt(1, $String, "Test")
MsgBox(0, "Test", $String)
_StringEncrypt(0, $String, "Test")
MsgBox(0, "Test", $String)

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

It's returning exactly what it should. You don't call _StringEncrypt that way.

$String = "Test This String"
_StringEncrypt(1, $String, "Test")
MsgBox(0, "Test", $String)
_StringEncrypt(0, $String, "Test")
MsgBox(0, "Test", $String)
zz .. Firstly , you didn't #include <string.au3>

Secondly, in that way , it is only msgbox-ing the $string.. not the encrypted text

Share this post


Link to post
Share on other sites

I've updated my scite to the latest version and thats what it returned after pressing F5

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\user\Desktop\FTP_Example.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams 
+>17:16:31 Starting AutoIt3Wrapper v.1.9.5.6    Environment(Language:0409  Keyboard:00000409  OS:WIN_XP/Service Pack 2  CPU:X86)
>Running AU3Check (1.54.10.0)  from:C:\Program Files\AutoIt3
+>17:16:32 AU3Check ended.rc:0
>Running:(3.2.10.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\user\Desktop\FTP_Example.au3"   
Debug: $encrypt =   @error = 0  @extended = 0
Debug: $dencrypt =   @error = 1  @extended = 0
+>17:16:33 AutoIT3.exe ended.rc:0
>Exit code: 0   Time: 3.243

Share this post


Link to post
Share on other sites

I've updated my scite to the latest version and thats what it returned after pressing F5

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\user\Desktop\FTP_Example.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams 
+>17:16:31 Starting AutoIt3Wrapper v.1.9.5.6    Environment(Language:0409  Keyboard:00000409  OS:WIN_XP/Service Pack 2  CPU:X86)
>Running AU3Check (1.54.10.0)  from:C:\Program Files\AutoIt3
+>17:16:32 AU3Check ended.rc:0
>Running:(3.2.10.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\user\Desktop\FTP_Example.au3"   
Debug: $encrypt =   @error = 0  @extended = 0
Debug: $dencrypt =   @error = 1  @extended = 0
+>17:16:33 AutoIT3.exe ended.rc:0
>Exit code: 0   Time: 3.243
Well I'm stumped now.

Share this post


Link to post
Share on other sites

I don't know what the problem is for the OP. I expected him to see an old version, or syntax check errors for undeclared variables, or something when trying to run my code from post #8. It works fine for me and outputs:

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Program Files\AutoIt3\Scripts\Test_1.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams    
+>08:03:44 Starting AutoIt3Wrapper v.1.9.4
>Running AU3Check (1.54.10.0)  from:C:\Program Files\AutoIt3
+>08:03:45 AU3Check ended.rc:0
>Running:(3.2.10.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Program Files\AutoIt3\Scripts\Test_1.au3"  
Debug: $encrypt = 10249CAA2F88B4EB  @error = 0  @extended = 0
Debug: $dencrypt = test  @error = 0  @extended = 0
+>08:03:45 AutoIT3.exe ended.rc:0
+>08:03:46 AutoIt3Wrapper Finished
>Exit code: 0   Time: 2.336

The next thing for the OP to try is not use any external #include references. Run it this way:

$encrypt = _StringEncrypt(1, "test", "test")
ConsoleWrite("Debug: $encrypt = " & $encrypt & "  @error = " & @error & "  @extended = " & @extended & @LF)
$decrypt = _StringEncrypt(0, $encrypt, "test")
ConsoleWrite("Debug: $dencrypt = " & $decrypt & "  @error = " & @error & "  @extended = " & @extended & @LF)


;===============================================================================
;
; Function Name:    _StringEncrypt()
; Description:      RC4 Based string encryption
; Parameter(s):     $i_Encrypt - 1 to encrypt, 0 to decrypt
;                   $s_EncryptText - string to encrypt
;                   $s_EncryptPassword - string to use as an encryption password
;                   $i_EncryptLevel - integer to use as number of times to encrypt string
; Requirement(s):   None
; Return Value(s):  On Success - Returns the string encrypted (blank) times with (blank) password
;                   On Failure - Returns a blank string and sets @error = 1
; Author(s):        Wes Wolfe-Wolvereness <Weswolf at aol dot com>
;
;===============================================================================
Func _StringEncrypt($i_Encrypt, $s_EncryptText, $s_EncryptPassword, $i_EncryptLevel = 1)
    If $i_Encrypt <> 0 And $i_Encrypt <> 1 Then
        SetError(1)
        Return ''
    ElseIf $s_EncryptText = '' Or $s_EncryptPassword = '' Then
        SetError(1)
        Return ''
    Else
        If Number($i_EncryptLevel) <= 0 Or Int($i_EncryptLevel) <> $i_EncryptLevel Then $i_EncryptLevel = 1
        Local $v_EncryptModified
        Local $i_EncryptCountH
        Local $i_EncryptCountG
        Local $v_EncryptSwap
        Local $av_EncryptBox[256][2]
        Local $i_EncryptCountA
        Local $i_EncryptCountB
        Local $i_EncryptCountC
        Local $i_EncryptCountD
        Local $i_EncryptCountE
        Local $v_EncryptCipher
        Local $v_EncryptCipherBy
        If $i_Encrypt = 1 Then
            For $i_EncryptCountF = 0 To $i_EncryptLevel Step 1
                $i_EncryptCountG = ''
                $i_EncryptCountH = ''
                $v_EncryptModified = ''
                For $i_EncryptCountG = 1 To StringLen($s_EncryptText)
                    If $i_EncryptCountH = StringLen($s_EncryptPassword) Then
                        $i_EncryptCountH = 1
                    Else
                        $i_EncryptCountH += 1
                    EndIf
                    $v_EncryptModified = $v_EncryptModified & Chr(BitXOR(Asc(StringMid($s_EncryptText, $i_EncryptCountG, 1)), Asc(StringMid($s_EncryptPassword, $i_EncryptCountH, 1)), 255))
                Next
                $s_EncryptText = $v_EncryptModified
                $i_EncryptCountA = ''
                $i_EncryptCountB = 0
                $i_EncryptCountC = ''
                $i_EncryptCountD = ''
                $i_EncryptCountE = ''
                $v_EncryptCipherBy = ''
                $v_EncryptCipher = ''
                $v_EncryptSwap = ''
                $av_EncryptBox = ''
                Local $av_EncryptBox[256][2]
                For $i_EncryptCountA = 0 To 255
                    $av_EncryptBox[$i_EncryptCountA][1] = Asc(StringMid($s_EncryptPassword, Mod($i_EncryptCountA, StringLen($s_EncryptPassword)) + 1, 1))
                    $av_EncryptBox[$i_EncryptCountA][0] = $i_EncryptCountA
                Next
                For $i_EncryptCountA = 0 To 255
                    $i_EncryptCountB = Mod(($i_EncryptCountB + $av_EncryptBox[$i_EncryptCountA][0] + $av_EncryptBox[$i_EncryptCountA][1]), 256)
                    $v_EncryptSwap = $av_EncryptBox[$i_EncryptCountA][0]
                    $av_EncryptBox[$i_EncryptCountA][0] = $av_EncryptBox[$i_EncryptCountB][0]
                    $av_EncryptBox[$i_EncryptCountB][0] = $v_EncryptSwap
                Next
                For $i_EncryptCountA = 1 To StringLen($s_EncryptText)
                    $i_EncryptCountC = Mod(($i_EncryptCountC + 1), 256)
                    $i_EncryptCountD = Mod(($i_EncryptCountD + $av_EncryptBox[$i_EncryptCountC][0]), 256)
                    $i_EncryptCountE = $av_EncryptBox[Mod(($av_EncryptBox[$i_EncryptCountC][0] + $av_EncryptBox[$i_EncryptCountD][0]), 256) ][0]
                    $v_EncryptCipherBy = BitXOR(Asc(StringMid($s_EncryptText, $i_EncryptCountA, 1)), $i_EncryptCountE)
                    $v_EncryptCipher &= Hex($v_EncryptCipherBy, 2)
                Next
                $s_EncryptText = $v_EncryptCipher
            Next
        Else
            For $i_EncryptCountF = 0 To $i_EncryptLevel Step 1
                $i_EncryptCountB = 0
                $i_EncryptCountC = ''
                $i_EncryptCountD = ''
                $i_EncryptCountE = ''
                $v_EncryptCipherBy = ''
                $v_EncryptCipher = ''
                $v_EncryptSwap = ''
                $av_EncryptBox = ''
                Local $av_EncryptBox[256][2]
                For $i_EncryptCountA = 0 To 255
                    $av_EncryptBox[$i_EncryptCountA][1] = Asc(StringMid($s_EncryptPassword, Mod($i_EncryptCountA, StringLen($s_EncryptPassword)) + 1, 1))
                    $av_EncryptBox[$i_EncryptCountA][0] = $i_EncryptCountA
                Next
                For $i_EncryptCountA = 0 To 255
                    $i_EncryptCountB = Mod(($i_EncryptCountB + $av_EncryptBox[$i_EncryptCountA][0] + $av_EncryptBox[$i_EncryptCountA][1]), 256)
                    $v_EncryptSwap = $av_EncryptBox[$i_EncryptCountA][0]
                    $av_EncryptBox[$i_EncryptCountA][0] = $av_EncryptBox[$i_EncryptCountB][0]
                    $av_EncryptBox[$i_EncryptCountB][0] = $v_EncryptSwap
                Next
                For $i_EncryptCountA = 1 To StringLen($s_EncryptText) Step 2
                    $i_EncryptCountC = Mod(($i_EncryptCountC + 1), 256)
                    $i_EncryptCountD = Mod(($i_EncryptCountD + $av_EncryptBox[$i_EncryptCountC][0]), 256)
                    $i_EncryptCountE = $av_EncryptBox[Mod(($av_EncryptBox[$i_EncryptCountC][0] + $av_EncryptBox[$i_EncryptCountD][0]), 256) ][0]
                    $v_EncryptCipherBy = BitXOR(Dec(StringMid($s_EncryptText, $i_EncryptCountA, 2)), $i_EncryptCountE)
                    $v_EncryptCipher = $v_EncryptCipher & Chr($v_EncryptCipherBy)
                Next
                $s_EncryptText = $v_EncryptCipher
                $i_EncryptCountG = ''
                $i_EncryptCountH = ''
                $v_EncryptModified = ''
                For $i_EncryptCountG = 1 To StringLen($s_EncryptText)
                    If $i_EncryptCountH = StringLen($s_EncryptPassword) Then
                        $i_EncryptCountH = 1
                    Else
                        $i_EncryptCountH += 1
                    EndIf
                    $v_EncryptModified &= Chr(BitXOR(Asc(StringMid($s_EncryptText, $i_EncryptCountG, 1)), Asc(StringMid($s_EncryptPassword, $i_EncryptCountH, 1)), 255))
                Next
                $s_EncryptText = $v_EncryptModified
            Next
        EndIf
        Return $s_EncryptText
    EndIf
EndFunc   ;==>_StringEncrypt

I still get the same good output, of course, as this just copies the function from the string.au3 straight into the test script.

: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

Im such a failure .. It returned

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\user\Desktop\singlefile.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams

+>22:10:41 Starting AutoIt3Wrapper v.1.9.5.6 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 2 CPU:X86)

>Running AU3Check (1.54.10.0) from:C:\Program Files\AutoIt3

+>22:10:44 AU3Check ended.rc:0

>Running:(3.2.10.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\user\Desktop\singlefile.au3"

Debug: $encrypt = @error = 0 @extended = 0

Debug: $dencrypt = @error = 1 @extended = 0

+>22:10:46 AutoIT3.exe ended.rc:0

>Exit code: 0 Time: 12.895

Share this post


Link to post
Share on other sites

Im such a failure .. It returned

Well, your AutoIt installation is... You only are if you give up before you figure this out! :P

That's very interesting that the function doesn't work for you as a local copy. But now we can trace it down with some debug monitoring inside the function.

To start with, basic inputs and output from inside the function. Run this:

$encrypt = _StringEncrypt(1, "test", "test")
ConsoleWrite("Debug: $encrypt = " & $encrypt & "  @error = " & @error & "  @extended = " & @extended & @LF)
$decrypt = _StringEncrypt(0, $encrypt, "test")
ConsoleWrite("Debug: $dencrypt = " & $decrypt & "  @error = " & @error & "  @extended = " & @extended & @LF)

;===============================================================================
; Function Name:    _StringEncrypt()
; Description:      RC4 Based string encryption
; Parameter(s):     $i_Encrypt - 1 to encrypt, 0 to decrypt
;                   $s_EncryptText - string to encrypt
;                   $s_EncryptPassword - string to use as an encryption password
;                   $i_EncryptLevel - integer to use as number of times to encrypt string
; Requirement(s):   None
; Return Value(s):  On Success - Returns the string encrypted (blank) times with (blank) password
;                   On Failure - Returns a blank string and sets @error = 1
; Author(s):        Wes Wolfe-Wolvereness <Weswolf at aol dot com>
;===============================================================================
Func _StringEncrypt($i_Encrypt, $s_EncryptText, $s_EncryptPassword, $i_EncryptLevel = 1)
    ConsoleWrite("Debug: _StringEncrypt() inputs: $i_Encrypt = " & $i_Encrypt & @LF)
    ConsoleWrite("Debug: _StringEncrypt() inputs: $s_EncryptText = " & $s_EncryptText & @LF)
    ConsoleWrite("Debug: _StringEncrypt() inputs: $s_EncryptPassword = " & $s_EncryptPassword & @LF)
    ConsoleWrite("Debug: _StringEncrypt() inputs: $i_EncryptLevel = " & $i_EncryptLevel & @LF)
    If $i_Encrypt <> 0 And $i_Encrypt <> 1 Then
        SetError(1)
        Return ''
    ElseIf $s_EncryptText = '' Or $s_EncryptPassword = '' Then
        SetError(1)
        Return ''
    Else
        If Number($i_EncryptLevel) <= 0 Or Int($i_EncryptLevel) <> $i_EncryptLevel Then $i_EncryptLevel = 1
        Local $v_EncryptModified
        Local $i_EncryptCountH
        Local $i_EncryptCountG
        Local $v_EncryptSwap
        Local $av_EncryptBox[256][2]
        Local $i_EncryptCountA
        Local $i_EncryptCountB
        Local $i_EncryptCountC
        Local $i_EncryptCountD
        Local $i_EncryptCountE
        Local $v_EncryptCipher
        Local $v_EncryptCipherBy
        If $i_Encrypt = 1 Then
            For $i_EncryptCountF = 0 To $i_EncryptLevel Step 1
                $i_EncryptCountG = ''
                $i_EncryptCountH = ''
                $v_EncryptModified = ''
                For $i_EncryptCountG = 1 To StringLen($s_EncryptText)
                    If $i_EncryptCountH = StringLen($s_EncryptPassword) Then
                        $i_EncryptCountH = 1
                    Else
                        $i_EncryptCountH += 1
                    EndIf
                    $v_EncryptModified = $v_EncryptModified & Chr(BitXOR(Asc(StringMid($s_EncryptText, $i_EncryptCountG, 1)), Asc(StringMid($s_EncryptPassword, $i_EncryptCountH, 1)), 255))
                Next
                $s_EncryptText = $v_EncryptModified
                $i_EncryptCountA = ''
                $i_EncryptCountB = 0
                $i_EncryptCountC = ''
                $i_EncryptCountD = ''
                $i_EncryptCountE = ''
                $v_EncryptCipherBy = ''
                $v_EncryptCipher = ''
                $v_EncryptSwap = ''
                $av_EncryptBox = ''
                Local $av_EncryptBox[256][2]
                For $i_EncryptCountA = 0 To 255
                    $av_EncryptBox[$i_EncryptCountA][1] = Asc(StringMid($s_EncryptPassword, Mod($i_EncryptCountA, StringLen($s_EncryptPassword)) + 1, 1))
                    $av_EncryptBox[$i_EncryptCountA][0] = $i_EncryptCountA
                Next
                For $i_EncryptCountA = 0 To 255
                    $i_EncryptCountB = Mod(($i_EncryptCountB + $av_EncryptBox[$i_EncryptCountA][0] + $av_EncryptBox[$i_EncryptCountA][1]), 256)
                    $v_EncryptSwap = $av_EncryptBox[$i_EncryptCountA][0]
                    $av_EncryptBox[$i_EncryptCountA][0] = $av_EncryptBox[$i_EncryptCountB][0]
                    $av_EncryptBox[$i_EncryptCountB][0] = $v_EncryptSwap
                Next
                For $i_EncryptCountA = 1 To StringLen($s_EncryptText)
                    $i_EncryptCountC = Mod(($i_EncryptCountC + 1), 256)
                    $i_EncryptCountD = Mod(($i_EncryptCountD + $av_EncryptBox[$i_EncryptCountC][0]), 256)
                    $i_EncryptCountE = $av_EncryptBox[Mod(($av_EncryptBox[$i_EncryptCountC][0] + $av_EncryptBox[$i_EncryptCountD][0]), 256)][0]
                    $v_EncryptCipherBy = BitXOR(Asc(StringMid($s_EncryptText, $i_EncryptCountA, 1)), $i_EncryptCountE)
                    $v_EncryptCipher &= Hex($v_EncryptCipherBy, 2)
                Next
                $s_EncryptText = $v_EncryptCipher
            Next
        Else
            For $i_EncryptCountF = 0 To $i_EncryptLevel Step 1
                $i_EncryptCountB = 0
                $i_EncryptCountC = ''
                $i_EncryptCountD = ''
                $i_EncryptCountE = ''
                $v_EncryptCipherBy = ''
                $v_EncryptCipher = ''
                $v_EncryptSwap = ''
                $av_EncryptBox = ''
                Local $av_EncryptBox[256][2]
                For $i_EncryptCountA = 0 To 255
                    $av_EncryptBox[$i_EncryptCountA][1] = Asc(StringMid($s_EncryptPassword, Mod($i_EncryptCountA, StringLen($s_EncryptPassword)) + 1, 1))
                    $av_EncryptBox[$i_EncryptCountA][0] = $i_EncryptCountA
                Next
                For $i_EncryptCountA = 0 To 255
                    $i_EncryptCountB = Mod(($i_EncryptCountB + $av_EncryptBox[$i_EncryptCountA][0] + $av_EncryptBox[$i_EncryptCountA][1]), 256)
                    $v_EncryptSwap = $av_EncryptBox[$i_EncryptCountA][0]
                    $av_EncryptBox[$i_EncryptCountA][0] = $av_EncryptBox[$i_EncryptCountB][0]
                    $av_EncryptBox[$i_EncryptCountB][0] = $v_EncryptSwap
                Next
                For $i_EncryptCountA = 1 To StringLen($s_EncryptText) Step 2
                    $i_EncryptCountC = Mod(($i_EncryptCountC + 1), 256)
                    $i_EncryptCountD = Mod(($i_EncryptCountD + $av_EncryptBox[$i_EncryptCountC][0]), 256)
                    $i_EncryptCountE = $av_EncryptBox[Mod(($av_EncryptBox[$i_EncryptCountC][0] + $av_EncryptBox[$i_EncryptCountD][0]), 256)][0]
                    $v_EncryptCipherBy = BitXOR(Dec(StringMid($s_EncryptText, $i_EncryptCountA, 2)), $i_EncryptCountE)
                    $v_EncryptCipher = $v_EncryptCipher & Chr($v_EncryptCipherBy)
                Next
                $s_EncryptText = $v_EncryptCipher
                $i_EncryptCountG = ''
                $i_EncryptCountH = ''
                $v_EncryptModified = ''
                For $i_EncryptCountG = 1 To StringLen($s_EncryptText)
                    If $i_EncryptCountH = StringLen($s_EncryptPassword) Then
                        $i_EncryptCountH = 1
                    Else
                        $i_EncryptCountH += 1
                    EndIf
                    $v_EncryptModified &= Chr(BitXOR(Asc(StringMid($s_EncryptText, $i_EncryptCountG, 1)), Asc(StringMid($s_EncryptPassword, $i_EncryptCountH, 1)), 255))
                Next
                $s_EncryptText = $v_EncryptModified
            Next
        EndIf
        ConsoleWrite("Debug: _StringEncrypt() output: $s_EncryptText = " & $s_EncryptText & @LF)
        Return $s_EncryptText
    EndIf
EndFunc   ;==>_StringEncrypt

I get:

>"C:\Progra~1\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Temp\Test\Test1.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams  
+>09:28:24 Starting AutoIt3Wrapper v.1.9.5.6    Environment(Language:0409  Keyboard:00000409  OS:WIN_XP/Service Pack 2  CPU:X86)
>Running AU3Check (1.54.10.0)  from:C:\Program Files\AutoIt3
+>09:28:24 AU3Check ended.rc:0
>Running:(3.2.10.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Temp\Test\Test1.au3"   
Debug: _StringEncrypt() inputs: $i_Encrypt = 1
Debug: _StringEncrypt() inputs: $s_EncryptText = test
Debug: _StringEncrypt() inputs: $s_EncryptPassword = test
Debug: _StringEncrypt() inputs: $i_EncryptLevel = 1
Debug: _StringEncrypt() output: $s_EncryptText = 10249CAA2F88B4EB
Debug: $encrypt = 10249CAA2F88B4EB  @error = 0  @extended = 0
Debug: _StringEncrypt() inputs: $i_Encrypt = 0
Debug: _StringEncrypt() inputs: $s_EncryptText = 10249CAA2F88B4EB
Debug: _StringEncrypt() inputs: $s_EncryptPassword = test
Debug: _StringEncrypt() inputs: $i_EncryptLevel = 1
Debug: _StringEncrypt() output: $s_EncryptText = test
Debug: $dencrypt = test  @error = 0  @extended = 0
+>09:28:24 AutoIT3.exe ended.rc:0
>Exit code: 0   Time: 1.649

Post your console output.

: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

zz .. Firstly , you didn't #include <string.au3>

Secondly, in that way , it is only msgbox-ing the $string.. not the encrypted text

First offwhy would I bother including string .au3 in that? You aready knew to use it. Secondly Your right. I messed up that code. When I have a coffee or 2 I'll re-visit it.. thirdly when you are asked to post the results from Scite we don't usually mean take a snapshot, we mean copy the error code and paste it in.

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

Thats what it returned

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\user\Desktop\singlefile.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams

+>14:31:35 Starting AutoIt3Wrapper v.1.9.5.6 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 2 CPU:X86)

>Running AU3Check (1.54.10.0) from:C:\Program Files\AutoIt3

+>14:31:36 AU3Check ended.rc:0

>Running:(3.2.10.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\user\Desktop\singlefile.au3"

Debug: _StringEncrypt() inputs: $i_Encrypt = 1

Debug: _StringEncrypt() inputs: $s_EncryptText = test

Debug: _StringEncrypt() inputs: $s_EncryptPassword = test

Debug: _StringEncrypt() inputs: $i_EncryptLevel = 1

Debug: _StringEncrypt() output: $s_EncryptText =

Debug: $encrypt = @error = 0 @extended = 0

Debug: _StringEncrypt() inputs: $i_Encrypt = 0

Debug: _StringEncrypt() inputs: $s_EncryptText =

Debug: _StringEncrypt() inputs: $s_EncryptPassword = test

Debug: _StringEncrypt() inputs: $i_EncryptLevel = 1

Debug: $dencrypt = @error = 1 @extended = 0

+>14:31:38 AutoIT3.exe ended.rc:0

>Exit code: 0 Time: 6.099

Share this post


Link to post
Share on other sites

Try running:

$encrypt = _StringEncrypt(1, "test", "test")
ConsoleWrite("Debug: $encrypt = " & $encrypt & "  @error = " & @error & "  @extended = " & @extended & @LF)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(4) :  $decrypt = _StringEncrypt(0, $encrypt, "test")'  & @crlf);### Trace Console
$decrypt = _StringEncrypt(0, $encrypt, "test")
ConsoleWrite("Debug: $dencrypt = " & $decrypt & "  @error = " & @error & "  @extended = " & @extended & @LF)

ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(8) :   ;==============================================================================='  & @crlf);### Trace Console
;===============================================================================
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(10) :   ; Function Name:  _StringEncrypt()'  & @crlf);### Trace Console
; Function Name:    _StringEncrypt()
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(12) :   ; Description:      RC4 Based string encryption'  & @crlf);### Trace Console
; Description:    RC4 Based string encryption
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(14) :   ; Parameter(s):    $i_Encrypt - 1 to encrypt, 0 to decrypt'  & @crlf);### Trace Console
; Parameter(s):  $i_Encrypt - 1 to encrypt, 0 to decrypt
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(16) :   ;                $s_EncryptText - string to encrypt'  & @crlf);### Trace Console
;                  $s_EncryptText - string to encrypt
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(18) :   ;                $s_EncryptPassword - string to use as an encryption password'  & @crlf);### Trace Console
;                  $s_EncryptPassword - string to use as an encryption password
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(20) :   ;                $i_EncryptLevel - integer to use as number of times to encrypt string'  & @crlf);### Trace Console
;                  $i_EncryptLevel - integer to use as number of times to encrypt string
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(22) :   ; Requirement(s):   None'  & @crlf);### Trace Console
; Requirement(s):   None
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(24) :   ; Return Value(s):  On Success - Returns the string encrypted (blank) times with (blank) password'  & @crlf);### Trace Console
; Return Value(s):  On Success - Returns the string encrypted (blank) times with (blank) password
;                  On Failure - Returns a blank string and sets @error = 1
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(27) :   ; Author(s):      Wes Wolfe-Wolvereness <Weswolf at aol dot com>'  & @crlf);### Trace Console
; Author(s):        Wes Wolfe-Wolvereness <Weswolf at aol dot com>
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(29) :   ;==============================================================================='  & @crlf);### Trace Console
;===============================================================================
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(31) : Func _StringEncrypt($i_Encrypt, $s_EncryptText, $s_EncryptPassword, $i_EncryptLevel = 1)'  & @crlf);### Trace Console
Func _StringEncrypt($i_Encrypt, $s_EncryptText, $s_EncryptPassword, $i_EncryptLevel = 1)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(33) :     ConsoleWrite("Debug: _StringEncrypt() inputs: $i_Encrypt = " & $i_Encrypt & @LF)'  & @crlf);### Trace Console
    ConsoleWrite("Debug: _StringEncrypt() inputs: $i_Encrypt = " & $i_Encrypt & @LF)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(35) :     ConsoleWrite("Debug: _StringEncrypt() inputs: $s_EncryptText = " & $s_EncryptText & @LF)'  & @crlf);### Trace Console
    ConsoleWrite("Debug: _StringEncrypt() inputs: $s_EncryptText = " & $s_EncryptText & @LF)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(37) :     ConsoleWrite("Debug: _StringEncrypt() inputs: $s_EncryptPassword = " & $s_EncryptPassword & @LF)'  & @crlf);### Trace Console
    ConsoleWrite("Debug: _StringEncrypt() inputs: $s_EncryptPassword = " & $s_EncryptPassword & @LF)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(39) :     ConsoleWrite("Debug: _StringEncrypt() inputs: $i_EncryptLevel = " & $i_EncryptLevel & @LF)'  & @crlf);### Trace Console
    ConsoleWrite("Debug: _StringEncrypt() inputs: $i_EncryptLevel = " & $i_EncryptLevel & @LF)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(41) :     If $i_Encrypt <> 0 And $i_Encrypt <> 1 Then'  & @crlf);### Trace Console
    If $i_Encrypt <> 0 And $i_Encrypt <> 1 Then
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(43) :         SetError(1)'  & @crlf);### Trace Console
        SetError(1)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(45) :         Return '''''  & @crlf);### Trace Console
        Return ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(47) :     ElseIf $s_EncryptText = '''' Or $s_EncryptPassword = '''' Then'  & @crlf);### Trace Console
    ElseIf $s_EncryptText = '' Or $s_EncryptPassword = '' Then
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(49) :         SetError(1)'  & @crlf);### Trace Console
        SetError(1)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(51) :         Return '''''  & @crlf);### Trace Console
        Return ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(53) :     Else'  & @crlf);### Trace Console
    Else
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(55) :         If Number($i_EncryptLevel) <= 0 Or Int($i_EncryptLevel) <> $i_EncryptLevel Then $i_EncryptLevel = 1'  & @crlf);### Trace Console
        If Number($i_EncryptLevel) <= 0 Or Int($i_EncryptLevel) <> $i_EncryptLevel Then $i_EncryptLevel = 1
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(57) :         Local $v_EncryptModified'  & @crlf);### Trace Console
        Local $v_EncryptModified
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(59) :         Local $i_EncryptCountH'  & @crlf);### Trace Console
        Local $i_EncryptCountH
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(61) :         Local $i_EncryptCountG'  & @crlf);### Trace Console
        Local $i_EncryptCountG
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(63) :         Local $v_EncryptSwap'  & @crlf);### Trace Console
        Local $v_EncryptSwap
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(65) :         Local $av_EncryptBox[256][2]'  & @crlf);### Trace Console
        Local $av_EncryptBox[256][2]
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(67) :         Local $i_EncryptCountA'  & @crlf);### Trace Console
        Local $i_EncryptCountA
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(69) :         Local $i_EncryptCountB'  & @crlf);### Trace Console
        Local $i_EncryptCountB
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(71) :         Local $i_EncryptCountC'  & @crlf);### Trace Console
        Local $i_EncryptCountC
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(73) :         Local $i_EncryptCountD'  & @crlf);### Trace Console
        Local $i_EncryptCountD
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(75) :         Local $i_EncryptCountE'  & @crlf);### Trace Console
        Local $i_EncryptCountE
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(77) :         Local $v_EncryptCipher'  & @crlf);### Trace Console
        Local $v_EncryptCipher
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(79) :         Local $v_EncryptCipherBy'  & @crlf);### Trace Console
        Local $v_EncryptCipherBy
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(81) :         If $i_Encrypt = 1 Then'  & @crlf);### Trace Console
        If $i_Encrypt = 1 Then
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(83) :             For $i_EncryptCountF = 0 To $i_EncryptLevel Step 1'  & @crlf);### Trace Console
            For $i_EncryptCountF = 0 To $i_EncryptLevel Step 1
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(85) :                 $i_EncryptCountG = '''''  & @crlf);### Trace Console
                $i_EncryptCountG = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(87) :                 $i_EncryptCountH = '''''  & @crlf);### Trace Console
                $i_EncryptCountH = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(89) :                 $v_EncryptModified = '''''  & @crlf);### Trace Console
                $v_EncryptModified = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(91) :                 For $i_EncryptCountG = 1 To StringLen($s_EncryptText)'  & @crlf);### Trace Console
                For $i_EncryptCountG = 1 To StringLen($s_EncryptText)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(93) :                     If $i_EncryptCountH = StringLen($s_EncryptPassword) Then'  & @crlf);### Trace Console
                    If $i_EncryptCountH = StringLen($s_EncryptPassword) Then
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(95) :                         $i_EncryptCountH = 1'  & @crlf);### Trace Console
                        $i_EncryptCountH = 1
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(97) :                     Else'  & @crlf);### Trace Console
                    Else
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(99) :                         $i_EncryptCountH += 1'  & @crlf);### Trace Console
                        $i_EncryptCountH += 1
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(101) :                        EndIf'  & @crlf);### Trace Console
                    EndIf
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(103) :                        $v_EncryptModified = $v_EncryptModified & Chr(BitXOR(Asc(StringMid($s_EncryptText, $i_EncryptCountG, 1)), Asc(StringMid($s_EncryptPassword, $i_EncryptCountH, 1)), 255))'  & @crlf);### Trace Console
                    $v_EncryptModified = $v_EncryptModified & Chr(BitXOR(Asc(StringMid($s_EncryptText, $i_EncryptCountG, 1)), Asc(StringMid($s_EncryptPassword, $i_EncryptCountH, 1)), 255))
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(105) :                    Next'  & @crlf);### Trace Console
                Next
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(107) :                    $s_EncryptText = $v_EncryptModified'  & @crlf);### Trace Console
                $s_EncryptText = $v_EncryptModified
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(109) :                    $i_EncryptCountA = '''''  & @crlf);### Trace Console
                $i_EncryptCountA = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(111) :                    $i_EncryptCountB = 0'  & @crlf);### Trace Console
                $i_EncryptCountB = 0
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(113) :                    $i_EncryptCountC = '''''  & @crlf);### Trace Console
                $i_EncryptCountC = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(115) :                    $i_EncryptCountD = '''''  & @crlf);### Trace Console
                $i_EncryptCountD = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(117) :                    $i_EncryptCountE = '''''  & @crlf);### Trace Console
                $i_EncryptCountE = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(119) :                    $v_EncryptCipherBy = '''''  & @crlf);### Trace Console
                $v_EncryptCipherBy = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(121) :                    $v_EncryptCipher = '''''  & @crlf);### Trace Console
                $v_EncryptCipher = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(123) :                    $v_EncryptSwap = '''''  & @crlf);### Trace Console
                $v_EncryptSwap = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(125) :                    $av_EncryptBox = '''''  & @crlf);### Trace Console
                $av_EncryptBox = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(127) :                    Local $av_EncryptBox[256][2]'  & @crlf);### Trace Console
                Local $av_EncryptBox[256][2]
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(129) :                    For $i_EncryptCountA = 0 To 255'  & @crlf);### Trace Console
                For $i_EncryptCountA = 0 To 255
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(131) :                        $av_EncryptBox[$i_EncryptCountA][1] = Asc(StringMid($s_EncryptPassword, Mod($i_EncryptCountA, StringLen($s_EncryptPassword)) + 1, 1))'  & @crlf);### Trace Console
                    $av_EncryptBox[$i_EncryptCountA][1] = Asc(StringMid($s_EncryptPassword, Mod($i_EncryptCountA, StringLen($s_EncryptPassword)) + 1, 1))
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(133) :                        $av_EncryptBox[$i_EncryptCountA][0] = $i_EncryptCountA'  & @crlf);### Trace Console
                    $av_EncryptBox[$i_EncryptCountA][0] = $i_EncryptCountA
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(135) :                    Next'  & @crlf);### Trace Console
                Next
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(137) :                    For $i_EncryptCountA = 0 To 255'  & @crlf);### Trace Console
                For $i_EncryptCountA = 0 To 255
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(139) :                        $i_EncryptCountB = Mod(($i_EncryptCountB + $av_EncryptBox[$i_EncryptCountA][0] + $av_EncryptBox[$i_EncryptCountA][1]), 256)'  & @crlf);### Trace Console
                    $i_EncryptCountB = Mod(($i_EncryptCountB + $av_EncryptBox[$i_EncryptCountA][0] + $av_EncryptBox[$i_EncryptCountA][1]), 256)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(141) :                        $v_EncryptSwap = $av_EncryptBox[$i_EncryptCountA][0]'  & @crlf);### Trace Console
                    $v_EncryptSwap = $av_EncryptBox[$i_EncryptCountA][0]
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(143) :                        $av_EncryptBox[$i_EncryptCountA][0] = $av_EncryptBox[$i_EncryptCountB][0]'  & @crlf);### Trace Console
                    $av_EncryptBox[$i_EncryptCountA][0] = $av_EncryptBox[$i_EncryptCountB][0]
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(145) :                        $av_EncryptBox[$i_EncryptCountB][0] = $v_EncryptSwap'  & @crlf);### Trace Console
                    $av_EncryptBox[$i_EncryptCountB][0] = $v_EncryptSwap
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(147) :                    Next'  & @crlf);### Trace Console
                Next
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(149) :                    For $i_EncryptCountA = 1 To StringLen($s_EncryptText)'  & @crlf);### Trace Console
                For $i_EncryptCountA = 1 To StringLen($s_EncryptText)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(151) :                        $i_EncryptCountC = Mod(($i_EncryptCountC + 1), 256)'  & @crlf);### Trace Console
                    $i_EncryptCountC = Mod(($i_EncryptCountC + 1), 256)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(153) :                        $i_EncryptCountD = Mod(($i_EncryptCountD + $av_EncryptBox[$i_EncryptCountC][0]), 256)'  & @crlf);### Trace Console
                    $i_EncryptCountD = Mod(($i_EncryptCountD + $av_EncryptBox[$i_EncryptCountC][0]), 256)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(155) :                        $i_EncryptCountE = $av_EncryptBox[Mod(($av_EncryptBox[$i_EncryptCountC][0] + $av_EncryptBox[$i_EncryptCountD][0]), 256)][0]'  & @crlf);### Trace Console
                    $i_EncryptCountE = $av_EncryptBox[Mod(($av_EncryptBox[$i_EncryptCountC][0] + $av_EncryptBox[$i_EncryptCountD][0]), 256)][0]
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(157) :                        $v_EncryptCipherBy = BitXOR(Asc(StringMid($s_EncryptText, $i_EncryptCountA, 1)), $i_EncryptCountE)'  & @crlf);### Trace Console
                    $v_EncryptCipherBy = BitXOR(Asc(StringMid($s_EncryptText, $i_EncryptCountA, 1)), $i_EncryptCountE)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(159) :                        $v_EncryptCipher &= Hex($v_EncryptCipherBy, 2)'  & @crlf);### Trace Console
                    $v_EncryptCipher &= Hex($v_EncryptCipherBy, 2)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(161) :                    Next'  & @crlf);### Trace Console
                Next
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(163) :                    $s_EncryptText = $v_EncryptCipher'  & @crlf);### Trace Console
                $s_EncryptText = $v_EncryptCipher
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(165) :                Next'  & @crlf);### Trace Console
            Next
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(167) :            Else'  & @crlf);### Trace Console
        Else
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(169) :                For $i_EncryptCountF = 0 To $i_EncryptLevel Step 1'  & @crlf);### Trace Console
            For $i_EncryptCountF = 0 To $i_EncryptLevel Step 1
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(171) :                    $i_EncryptCountB = 0'  & @crlf);### Trace Console
                $i_EncryptCountB = 0
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(173) :                    $i_EncryptCountC = '''''  & @crlf);### Trace Console
                $i_EncryptCountC = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(175) :                    $i_EncryptCountD = '''''  & @crlf);### Trace Console
                $i_EncryptCountD = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(177) :                    $i_EncryptCountE = '''''  & @crlf);### Trace Console
                $i_EncryptCountE = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(179) :                    $v_EncryptCipherBy = '''''  & @crlf);### Trace Console
                $v_EncryptCipherBy = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(181) :                    $v_EncryptCipher = '''''  & @crlf);### Trace Console
                $v_EncryptCipher = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(183) :                    $v_EncryptSwap = '''''  & @crlf);### Trace Console
                $v_EncryptSwap = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(185) :                    $av_EncryptBox = '''''  & @crlf);### Trace Console
                $av_EncryptBox = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(187) :                    Local $av_EncryptBox[256][2]'  & @crlf);### Trace Console
                Local $av_EncryptBox[256][2]
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(189) :                    For $i_EncryptCountA = 0 To 255'  & @crlf);### Trace Console
                For $i_EncryptCountA = 0 To 255
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(191) :                        $av_EncryptBox[$i_EncryptCountA][1] = Asc(StringMid($s_EncryptPassword, Mod($i_EncryptCountA, StringLen($s_EncryptPassword)) + 1, 1))'  & @crlf);### Trace Console
                    $av_EncryptBox[$i_EncryptCountA][1] = Asc(StringMid($s_EncryptPassword, Mod($i_EncryptCountA, StringLen($s_EncryptPassword)) + 1, 1))
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(193) :                        $av_EncryptBox[$i_EncryptCountA][0] = $i_EncryptCountA'  & @crlf);### Trace Console
                    $av_EncryptBox[$i_EncryptCountA][0] = $i_EncryptCountA
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(195) :                    Next'  & @crlf);### Trace Console
                Next
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(197) :                    For $i_EncryptCountA = 0 To 255'  & @crlf);### Trace Console
                For $i_EncryptCountA = 0 To 255
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(199) :                        $i_EncryptCountB = Mod(($i_EncryptCountB + $av_EncryptBox[$i_EncryptCountA][0] + $av_EncryptBox[$i_EncryptCountA][1]), 256)'  & @crlf);### Trace Console
                    $i_EncryptCountB = Mod(($i_EncryptCountB + $av_EncryptBox[$i_EncryptCountA][0] + $av_EncryptBox[$i_EncryptCountA][1]), 256)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(201) :                        $v_EncryptSwap = $av_EncryptBox[$i_EncryptCountA][0]'  & @crlf);### Trace Console
                    $v_EncryptSwap = $av_EncryptBox[$i_EncryptCountA][0]
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(203) :                        $av_EncryptBox[$i_EncryptCountA][0] = $av_EncryptBox[$i_EncryptCountB][0]'  & @crlf);### Trace Console
                    $av_EncryptBox[$i_EncryptCountA][0] = $av_EncryptBox[$i_EncryptCountB][0]
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(205) :                        $av_EncryptBox[$i_EncryptCountB][0] = $v_EncryptSwap'  & @crlf);### Trace Console
                    $av_EncryptBox[$i_EncryptCountB][0] = $v_EncryptSwap
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(207) :                    Next'  & @crlf);### Trace Console
                Next
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(209) :                    For $i_EncryptCountA = 1 To StringLen($s_EncryptText) Step 2'  & @crlf);### Trace Console
                For $i_EncryptCountA = 1 To StringLen($s_EncryptText) Step 2
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(211) :                        $i_EncryptCountC = Mod(($i_EncryptCountC + 1), 256)'  & @crlf);### Trace Console
                    $i_EncryptCountC = Mod(($i_EncryptCountC + 1), 256)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(213) :                        $i_EncryptCountD = Mod(($i_EncryptCountD + $av_EncryptBox[$i_EncryptCountC][0]), 256)'  & @crlf);### Trace Console
                    $i_EncryptCountD = Mod(($i_EncryptCountD + $av_EncryptBox[$i_EncryptCountC][0]), 256)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(215) :                        $i_EncryptCountE = $av_EncryptBox[Mod(($av_EncryptBox[$i_EncryptCountC][0] + $av_EncryptBox[$i_EncryptCountD][0]), 256)][0]'  & @crlf);### Trace Console
                    $i_EncryptCountE = $av_EncryptBox[Mod(($av_EncryptBox[$i_EncryptCountC][0] + $av_EncryptBox[$i_EncryptCountD][0]), 256)][0]
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(217) :                        $v_EncryptCipherBy = BitXOR(Dec(StringMid($s_EncryptText, $i_EncryptCountA, 2)), $i_EncryptCountE)'  & @crlf);### Trace Console
                    $v_EncryptCipherBy = BitXOR(Dec(StringMid($s_EncryptText, $i_EncryptCountA, 2)), $i_EncryptCountE)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(219) :                        $v_EncryptCipher = $v_EncryptCipher & Chr($v_EncryptCipherBy)'  & @crlf);### Trace Console
                    $v_EncryptCipher = $v_EncryptCipher & Chr($v_EncryptCipherBy)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(221) :                    Next'  & @crlf);### Trace Console
                Next
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(223) :                    $s_EncryptText = $v_EncryptCipher'  & @crlf);### Trace Console
                $s_EncryptText = $v_EncryptCipher
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(225) :                    $i_EncryptCountG = '''''  & @crlf);### Trace Console
                $i_EncryptCountG = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(227) :                    $i_EncryptCountH = '''''  & @crlf);### Trace Console
                $i_EncryptCountH = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(229) :                    $v_EncryptModified = '''''  & @crlf);### Trace Console
                $v_EncryptModified = ''
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(231) :                    For $i_EncryptCountG = 1 To StringLen($s_EncryptText)'  & @crlf);### Trace Console
                For $i_EncryptCountG = 1 To StringLen($s_EncryptText)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(233) :                        If $i_EncryptCountH = StringLen($s_EncryptPassword) Then'  & @crlf);### Trace Console
                    If $i_EncryptCountH = StringLen($s_EncryptPassword) Then
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(235) :                            $i_EncryptCountH = 1'  & @crlf);### Trace Console
                        $i_EncryptCountH = 1
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(237) :                        Else'  & @crlf);### Trace Console
                    Else
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(239) :                            $i_EncryptCountH += 1'  & @crlf);### Trace Console
                        $i_EncryptCountH += 1
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(241) :                        EndIf'  & @crlf);### Trace Console
                    EndIf
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(243) :                        $v_EncryptModified &= Chr(BitXOR(Asc(StringMid($s_EncryptText, $i_EncryptCountG, 1)), Asc(StringMid($s_EncryptPassword, $i_EncryptCountH, 1)), 255))'  & @crlf);### Trace Console
                    $v_EncryptModified &= Chr(BitXOR(Asc(StringMid($s_EncryptText, $i_EncryptCountG, 1)), Asc(StringMid($s_EncryptPassword, $i_EncryptCountH, 1)), 255))
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(245) :                    Next'  & @crlf);### Trace Console
                Next
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(247) :                    $s_EncryptText = $v_EncryptModified'  & @crlf);### Trace Console
                $s_EncryptText = $v_EncryptModified
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(249) :                Next'  & @crlf);### Trace Console
            Next
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(251) :            EndIf'  & @crlf);### Trace Console
        EndIf
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(253) :            ConsoleWrite("Debug: _StringEncrypt() output: $s_EncryptText = " & $s_EncryptText & @LF)'  & @crlf);### Trace Console
        ConsoleWrite("Debug: _StringEncrypt() output: $s_EncryptText = " & $s_EncryptText & @LF)
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(255) :            Return $s_EncryptText'  & @crlf);### Trace Console
        Return $s_EncryptText
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(257) :        EndIf'  & @crlf);### Trace Console
    EndIf
ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(259) :    EndFunc  ;==>_StringEncrypt'  & @crlf);### Trace Console
EndFunc  ;==>_StringEncrypt

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...