Jump to content

Obfuscator (discontinued)


Jos
 Share

Recommended Posts

  • Developers

Obfuscator 1.0.17, steel the same problem compiling my scripts (including AES_Optimized.au3 script from the crypto_suite_v1.1) :

"!File contains records longer than 2047 .. stopping process."

(just a reminder, don't be mad at me !)

Thanks

Maximilian

I know ...

The Input line lenght limitation isn't changed... the issue before was that this error was given when to OUTPUT record was longer than 2047 thus being confusing. That part is fixed now (i hope)

No plans to change this limitation because the Obfuscation process creates longer ouput lines and that max ouput leght is 4096.

:)

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

I downloaded the last version and now Im not getting any error while obfuscating but when I try to run or compile the obfuscated file, I got some errors...

I also dont know why but when obfuscating the script create a .tbl file.

Same comment to you as made before: I need more info to be able to look at it :

1. Source script

2. Obfuscated Script source

3. Obfuscator.log

Send/PM them to me and I will have a look.

:)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

Yes i do.

I include a script from the Crypto Suite v 1.1 (AES_Optimized.au3) and it makes Obfuscator crash with this error.

Regards

Maximilian

I don't know why there would be a single line that would be more than that many chars... but If I were you, I'd see if I could edit it down if that file was absolutely necessary. I understand (fully at the moment) why Jdeb isn't going to increase the size of the string allowed... But at least you know the issue, and can fix it (can't imagine any one line of code needing to be that large for any specific reason).

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I don't know why there would be a single line that would be more than that many chars... but If I were you, I'd see if I could edit it down if that file was absolutely necessary. I understand (fully at the moment) why Jdeb isn't going to increase the size of the string allowed... But at least you know the issue, and can fix it (can't imagine any one line of code needing to be that large for any specific reason).

It's in these moments i'd like to be a developer smarter brain equiped ..........

Thanks anyway.

Max

Link to comment
Share on other sites

  • Moderators

It's in these moments i'd like to be a developer smarter brain equiped ..........

Thanks anyway.

Max

Here, let me help you to find out what lines you have to fix:

Using this code:

#include <file.au3>
Global $hDir = @DesktopDir & '\crypto\';Directory your .au3 files are in
Global $aArray = _FileListToArray($hDir, '*.au3')
Global $iCC, $nCC, $sHoldInfo, $sRead, $aSplit, $nLen
ConsoleWrite(@CRLF)
For $iCC = 1 To UBound($aArray) - 1
    $sRead = FileRead($hDir & $aArray[$iCC])
    $aSplit = StringSplit(StringStripCR($sRead), @LF)
    For $nCC = 1 To UBound($aSplit) - 1
        $nLen = StringLen($aSplit[$nCC])
        If $nLen > 2047 Then
            ConsoleWrite('File Name: ' & _
                $aArray[$iCC] & ' ------ Line #: ' & _
                $nCC & ' ------ Total Chars: ' & $nLen & @CRLF)
        EndIf
    Next
Next

I got this output...

File Name: AES_Optimized.au3 ------ Line #: 11 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 43 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 44 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 45 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 46 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 47 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 93 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 94 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 95 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 96 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 97 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 161 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 162 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 163 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 164 ------ Total Chars: 3091

File Name: AES_Optimized.au3 ------ Line #: 165 ------ Total Chars: 3091

File Name: Blowfish.au3 ------ Line #: 81 ------ Total Chars: 3095

File Name: Blowfish.au3 ------ Line #: 82 ------ Total Chars: 3095

File Name: Blowfish.au3 ------ Line #: 83 ------ Total Chars: 3095

File Name: Blowfish.au3 ------ Line #: 84 ------ Total Chars: 3095

That tells you the file name, the line number, and how many chars that line has ..

Someone could easily write a wrapper like the above to see if the files they are including meet the obfuscation specifications.

But at least now you know what and where to fix :) .

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Just to let everyone know, I'm trying to fix the Crypto Suite to be Obfuscation friendly. Work (i.e. the stuff I do that pays) kinda got real rough here lately, and the wife was sick as well, so I'm a lot slower on the programming than I was when I made this, but I do know how to fix it.

Main reason the lines are that long: That's where I was initializing some Arrays, that only contain 256 elements... each. Since each one is "0x00000000" in length, it gets lengthy really quick, especially when obfuscating it. I tried to make the lines in question shorter with continuation characters, but it apparantly is a problem not with the length of the line in script, it's a problem of the total length AutoIt tries to parse. So, no matter how I break it up, AutoIt still crashes. Interesting problem, no doubt.

Simplest solution I came up with: instead of assigning the array values upon initialization, I assign them right after, one after the other. Makes the script really long, but also makes it work. I'm currently working through all the other files, and making sure they all are Obfuscation friendly. Haven't made it all the way through yet, but I will soon.

Link to comment
Share on other sites

Problem with Global Enum Step * 2 _

(try to obfuscate ie.au3)

[u]My Programs:[/u]Word Search Creator - Make your own Word SearchShortHand - Hide a secret message in a jpg fileHex Editor - Edit your Binary fileIncrease file size - Increase the size of any filesArt Generator - A program that generate random picture[u]My Functions:[/u]16-Bits Hash - My Hash function similar to MD5Probabilities - My probabilities function (factorial, permuation, combination)_GetDate() - Convert a date to a day of the week_Base(), _Dec() - Convert a number in any base (bin, oct, hex, dec). Create your own!

Link to comment
Share on other sites

  • Moderators

Just to let everyone know, I'm trying to fix the Crypto Suite to be Obfuscation friendly. Work (i.e. the stuff I do that pays) kinda got real rough here lately, and the wife was sick as well, so I'm a lot slower on the programming than I was when I made this, but I do know how to fix it.

Main reason the lines are that long: That's where I was initializing some Arrays, that only contain 256 elements... each. Since each one is "0x00000000" in length, it gets lengthy really quick, especially when obfuscating it. I tried to make the lines in question shorter with continuation characters, but it apparantly is a problem not with the length of the line in script, it's a problem of the total length AutoIt tries to parse. So, no matter how I break it up, AutoIt still crashes. Interesting problem, no doubt.

Simplest solution I came up with: instead of assigning the array values upon initialization, I assign them right after, one after the other. Makes the script really long, but also makes it work. I'm currently working through all the other files, and making sure they all are Obfuscation friendly. Haven't made it all the way through yet, but I will soon.

Quick and dirty... see if this helps:
#include <file.au3>
Global $hDir = @DesktopDir & '\crypto\';Directory your .au3 files are in
Global $aArray = _FileListToArray($hDir, '*.au3')
Global $iCC, $nCC, $sHoldInfo, $sRead, $iUbound
Global $aSplit, $nLen, $xCC, $iElemD1, $aSRE, $bFound = True
For $iCC = 1 To UBound($aArray) - 1
    $sRead = FileRead($hDir & $aArray[$iCC])
    $aSplit = StringSplit(StringStripCR($sRead), @LF)
    For $nCC = 1 To UBound($aSplit) - 1
        $nLen = StringLen($aSplit[$nCC])
        If $nLen > 2047 Then
            $iElemD1 = StringRegExp($aSplit[$nCC], '(?i).*?\$(.*?)\[(\d+)\s*\]\s*\[*(.*?)\]*', 3)
            If IsArray($iElemD1) Then
                If UBound($iElemD1) = 3 And $iElemD1[2] <> "" Then
                    MsgBox(16, 'Error', 'This is only set up for 1 Dim Arrays because I am lazy.')
                ElseIf UBound($iElemD1) < 2 Then
                    MsgBox(16, 'Error', 'For some reason we did not get the name of the array, or the number of elements.')
                ElseIf StringIsInt(StringStripWS($iElemD1[1], 8)) = 0 Then
                    MsgBox(16, 'Error', 'Variables are not going to work as identifiers.')
                Else
                    StringReplace($aSplit[$nCC], '[', '')
                    If @extended > 1 Then
                        $aSRE = StringRegExp($aSplit[$nCC], '(?i)' & $iElemD1[0] & '\s*\[\s*' & $iElemD1[1] & '\s*\].*?\[(.*?)\]', 3)
                        If IsArray($aSRE) Then
                            $aSRE = StringRegExp($aSRE[0], '(?i)(.*?)(?m:$|,)', 3)
                            If IsArray($aSRE) Then
                                $sHoldInfo &= 'DIM $' & $iElemD1[0] & '[' & UBound($aSRE) - 1 & ']' & @CRLF
                                For $xCC = 0 To UBound($aSRE) - 2
                                    $sHoldInfo &= '$' & $iElemD1[0] & '[' & $xCC & '] = ' & $aSRE[$xCC] & @CRLF
                                Next
                                $bFound = False
                            EndIf
                        EndIf
                    EndIf
                EndIf
            EndIf
        EndIf
        If $bFound Then
            $sHoldInfo &= $aSplit[$nCC] & @CRLF
        Else
            $bFound = True
        EndIf
    Next
    Local $hBackup = StringLeft($aArray[$iCC], StringInStr($aArray[$iCC], '.', 0, -1)) & '__Converted.au3'
    FileClose(FileOpen($hBackup, 2))
    FileWrite($hDir & $hBackup, $sHoldInfo)
    $sHoldInfo = ""
Next

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Developers

Problem with Global Enum Step * 2 _

(try to obfuscate ie.au3)

Any details / test script that shows the probelm etc ?

I will only look at issues when all specifics are given because it will take to much time for me to try to find it out myself.

:)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

If i try to call something in an #include ie

call($var)

it doesn't work and the sucky part is that it's a major part of my script lmao.

So as a temp solution i just copied the entire #include into my script and replaced that line with Call("funcname")

Edited by SleepyXtreme
Link to comment
Share on other sites

  • Developers

If i try to call something in an #include ie

call($var)

it doesn't work and the sucky part is that it's a major part of my script lmao.

So as a temp solution i just copied the entire #include into my script and replaced that line with Call("funcname")

Have you tried the latest posted version ? (requires separate download and copy to the Obfuscator directory)

:)

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Any details / test script that shows the probelm etc ?

I will only look at issues when all specifics are given because it will take to much time for me to try to find it out myself.

:)

#include <ie.au3>

Obfuscate this.

[u]My Programs:[/u]Word Search Creator - Make your own Word SearchShortHand - Hide a secret message in a jpg fileHex Editor - Edit your Binary fileIncrease file size - Increase the size of any filesArt Generator - A program that generate random picture[u]My Functions:[/u]16-Bits Hash - My Hash function similar to MD5Probabilities - My probabilities function (factorial, permuation, combination)_GetDate() - Convert a date to a day of the week_Base(), _Dec() - Convert a number in any base (bin, oct, hex, dec). Create your own!

Link to comment
Share on other sites

  • Developers

#include <ie.au3>

Obfuscate this.

Done that ... and then ???

#include<ie.au3>

>"C:\Program Files\AutoIt3\SciTE\Obfuscator\Obfuscator.exe" "C:\Development\test.au3" 
+> Obfuscator v1.0.17 finished obfuscating 3124 lines. created:C:\Development\test_Obfuscated.au3
>Exit code: 0   Time: 1.587
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Ok... see what you mean now ...

the 2 is gone after obfuscation... Will have a look at that ....

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Ok... see what you mean now ...

the 2 is gone after obfuscation... Will have a look at that ....

Uploaded v 1.0.18 of Obfuscator that should fix this issue.

v1.0.18: Fixed: issue with number before Continuation character making IE.AU3 fail.

:)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

yes i tried the latest version and it comes out of obfuscation without errors but just doesn't work and it works before i obfuscate.

Please post a snippet that shows the problem to me ....

:)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Ok folks,

I have made a thinking error here assuming Obfuscator could ever support $vars in Special functions like Call()

This will never ever work and the Warning is back in version 1.0.19.0 of Obfuscator.

Things like this will never work:

$test = "test"

Call($test)

Func Test()
    Msgbox(0,"test","test")
EndFunc

The simple reason is that Obfuscator will never know that the content of $test is used as a FuncName and Obfuscator will rename All FuncNames to a Random name. Obviously UDF "Test" will not be there anymore after Obfuscator renamed it.

I hope I made that clear enough... but let me know when not ...

:)

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

why not add an exception list to the obfuscator, that would fix the problems.

like when you start the .exe, just a simple msg box asking if you want to add exceptions, and ppl would have to enter in things not to replace into an inputbox, you don't need anything fancy.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...