Jump to content

Recommended Posts

Posted

  scythetleppo said:

Hi I'm having a problem. I have used this on 2 different scripts and it was fast and seemed to work correctly.

I have a new script that is 5kb.

EncodeIt took 43 minutes to obfuscate it and the filesize went from 5kb to 178kb and gets an error of improperly defined function.

the script doesn't have any of the commands listed on page one of this post.

the script unobfuscated works perfectly.

if you're not able to identify where the issue is, it will be hard to help you with a work around. if you feel like sending the source of your script to Smoke_N or I (haha smoke i volunteered you) we can try to isoloate the issue and help with a fix or work around. Neither of us would release your source without your permission.
  • Replies 219
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

Just to let you know it gave me more errors than I could count: 59 is when I decided to stop counting.

My script is 4863 lines of code and about 259kb in size. :D I read about the first 5 pages of this and none of that applies to what is in my script. Anywho love the idea just doesnt work for me. And I have so much code written I just do not feal sifting through it after printing pages of it to try and find and correct the incompatabilities in my script and your obfuscation method.

On a side note it has workd on all my small scripts :D Love it.

  • Moderators
Posted

  Sublime said:

Just to let you know it gave me more errors than I could count: 59 is when I decided to stop counting.

My script is 4863 lines of code and about 259kb in size. :D I read about the first 5 pages of this and none of that applies to what is in my script. Anywho love the idea just doesnt work for me. And I have so much code written I just do not feal sifting through it after printing pages of it to try and find and correct the incompatabilities in my script and your obfuscation method.

On a side note it has workd on all my small scripts :D Love it.

Can't help you solve your issue without a script.... sorry, but glad it works on others.

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.

Posted (edited)

Yes I know you cant thats understandable was just letting you know it didnt work on yet another but I decided to spend just a tad bit of time looking at where it is having errors and trying to figure out why it is.

I have figured out some of them its called the Function "iniwrite" :D it screws up on every single one of those so far. It comes up with this for every instance of iniwrite ERROR: $FEA76BD341F960FE: undeclared global variable.

offcourse the obfuscation variable is different for each.

Ill tell you what esle as I get more time to spend on fixing the simple little issues as I get more free time to do so. As I would like to use it on my script.

Anywho I love it and the idea behind it.

BTW just out of curiosity havnt yet tried it on any of my other scripts can you run this multiple times on the same script to add more and more obfuscation?

Edited by Sublime
Posted (edited)

Hey SmOke

I searched all the pages but could'nt find an answer to this

I am working on an include file....

can a user include my obfuscatd file in their script

example

MY-File.au3

my obfuscated code

users script

#include<MY-File.au3>

msgbox(0,"Hello World", "My name is User")
; this script in not obfuscated

thanks

8)

Edited by Valuater

NEWHeader1.png

  • Moderators
Posted (edited)

  Valuater said:

Hey SmOke

I searched all the pages but could'nt find an answer to this

I am working on an include file....

can a user include my obfuscatd file in their script

example

MY-File.au3

my obfuscated code

users script

#include<MY-File.au3>

msgbox(0,"Hello World", "My name is User")
; this script in not obfuscated

thanks

8)

The problem your going to run into is it changes the Function names and if your using Global Const variables, it changes those to, and you have to know those to call them, if you do, then it's fine as long as it isn't itself dependent on the other script.

Edited by SmOke_N

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.

  • Moderators
Posted
  Sublime said:

BTW just out of curiosity havnt yet tried it on any of my other scripts can you run this multiple times on the same script to add more and more obfuscation?

No, the text encoding would get confused.

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.

Posted

  SmOke_N said:

The problem your going to run into is it changes the Function names and if your using Global Const variables, it changes those to, and you have to know those to call them, if you do, then it's fine as long as it isn't itself dependent on the other script.

Thanks

8)

NEWHeader1.png

Posted (edited)

  SmOke_N said:

Dynamic behaviour... You have to go through "steps" to obfuscate or else your all over the place... and when Eval("a" & "b") = $ab how do I split up the $ab = $alkdfu0f92309uafpoie0a9su into Eval("a" & "l" & "k" & "d" & "f" & "u" & "0" & "f" & "9" & "2" & "3" & "0" & "9" & "u" & "u" & "a" & "f" & "p" & "o" & "i" & "e" & "0" & "a" & "9" & "s" & "u") properly (Just one example, I know if you look at the functions closer you'd understand out of most people). Now, I've past the point already of Encoding something ('text') or whatever, then I'd have to back track and do it all over again for these specific functions, and to be honest, It takes long enough as is.

If someone has written a UDF for things like this, and would like them to be included in EnCodeIt then by all means, but you'll find that it just isn't going to work on some of them at all.

You could do these things by doing a standrad one-way hash function, however, people who use the above menitioned functions would pose themselves a security risk as people who decompile the source code can print out the name of the variable/function before it gets through the hash function.

Just something I noticed.

#)

edit Removed unnecessary repeating repeating of the same point.

Edited by nfwu
Posted (edited)

How about the simple addition of 2 directives for EncodeIt:

#randomline-start
#randomline-end
For example, this:

#randomline-start
$a[0] = 999
$a[1] = 234
$a[2] = 461
$a[3] = 714
$a[4] = 822
$a[5] = 2345
$a[6] = 136
#randomline-endoÝ÷ Ù·¢g¬¶¬¡»â¢ë%Êß¹¸¬q«^u»­¶è­rW­«­¢+ØÀÌØílÙtôÄÌØ(ÀÌØílÑtôàÈÈ(ÀÌØílÉtôÐØÄ(ÀÌØílÁtôäää(ÀÌØílÍtôÜÄÐ(ÀÌØílÕtôÈÌÐÔ(ÀÌØílÅtôÈÌÐ

What do you think?

#)

Edited by nfwu
  • 2 weeks later...
Posted

I think your script is great, but I have had problems with a script it will not obfuscate the following code by TechDude

;===============================================================================
;
; _UniqueWoodID( $com, $no )
; Description:      Used to generate a nearly "unique" ID for a computer
; Parameter(s):     [optional] $com : name of computer to generate ID for (default=localhost)
;                   [optional] $no : shortening value used to shorten id(default: 5)
; Requirement:      AutoIt
; Return Value(s):  The ID for the computer
; Author(s):        Alexander "TechDude" Wood
; Note(s):          Use the SAME shortening value every time you call this function.
;                  I feel that _UniqueWoodID2() is more unique than this
;
;===============================================================================
Func _UniqueWoodID( $com = "localhost", $no = 5 )
;$time = TimerInit()
    $colItems = ""
    $objWMIService = ObjGet ("winmgmts:\\" & $com & "\root\CIMV2")
    $colItems = $objWMIService.ExecQuery ("SELECT * FROM Win32_Processor", "WQL", 0x10 + 0x20)
    If IsObj ($colItems) Then
        For $objItem In $colItems
            $Out1 = _StringEncrypt(1, $objItem.AddressWidth & $objItem.Architecture & $objItem.Caption, _
                    $objItem.ConfigManagerErrorCode & $objItem.ConfigManagerUserConfig & $objItem.DataWidth)
            $Out2 = _StringEncrypt(1, $objItem.Description & $objItem.DeviceID & $objItem.ExtClock, _
                    $objItem.Family & $objItem.InstallDate & $objItem.L2CacheSize)
            $Out3 = _StringEncrypt(1, $objItem.L2CacheSpeed & $objItem.Level & $objItem.Manufacturer, _
                    $objItem.MaxClockSpeed & $objItem.Name & $objItem.OtherFamilyDescription)
            $Out4 = _StringEncrypt(1, $objItem.PNPDeviceID & $objItem.ProcessorId & $objItem.ProcessorType, _
                    $objItem.Revision & $objItem.Role & $objItem.SocketDesignation)
            $Out5 = _StringEncrypt(1, $objItem.SystemCreationClassName & $objItem.SystemName & $objItem.UniqueId, _
                    $objItem.UpgradeMethod & $objItem.Version & $objItem.VoltageCaps)
            $Output = $Out1 & $Out2 & $Out3 & $Out4 & $Out5 & _WoodIDhelper2()
            $Output = _WoodIDhelper( $Output, $no )
       ;MsgBox(0, "Unique Wood's ID", $Output)
       ;MsgBox(0, "Timer", TimerDiff( $time ))
            Return $Output
            ExitLoop;;Only want first match (will have more matches for multipule processor/multithreaded systems)
        Next
    Else
        MsgBox(0, "Unique Wood's ID - ERROR", "No WMI Objects Found for class: " & "Win32_Processor")
        Exit -1
        Return
    EndIf
EndFunc ;==>_UniqueWoodID
;===============================================================================
;
; _UniqueWoodID2( $com, $no )
; Description:      Used to generate a nearly "unique" ID for a computer
; Parameter(s):     [optional] $com : name of computer to generate ID for (default=localhost)
;                   [optional] $no : shortening value (default: 2 )
; Requirement:      AutoIt
; Return Value(s):  The Wood's ID for the computer
; Author(s):        Alexander "TechDude" Wood
; Note(s):          Use the SAME shortening value every time you call this function.
;
;===============================================================================
Func _UniqueWoodID2( $com = "localhost", $no = 2 )
;$time = TimerInit()
    $colItems = ""
    $objWMIService = ObjGet ("winmgmts:\\" & $com & "\root\CIMV2")
    $colItems = $objWMIService.ExecQuery ("SELECT * FROM Win32_Processor", "WQL", 0x10 + 0x20)
    If IsObj ($colItems) Then
        For $objItem In $colItems
            $Out1 = $objItem.AddressWidth & $objItem.Architecture & $objItem.Caption & _
                    $objItem.ConfigManagerErrorCode & $objItem.ConfigManagerUserConfig & $objItem.DataWidth
            $Out2 = $objItem.Description & $objItem.DeviceID & $objItem.ExtClock & _
                    $objItem.Family & $objItem.InstallDate & $objItem.L2CacheSize
            $Out3 = $objItem.L2CacheSpeed & $objItem.Level & $objItem.Manufacturer & _
                    $objItem.MaxClockSpeed & $objItem.Name & $objItem.OtherFamilyDescription
            $Out4 = $objItem.PNPDeviceID & $objItem.ProcessorId & $objItem.ProcessorType & _
                    $objItem.Revision & $objItem.Role & $objItem.SocketDesignation
            $Out5 = $objItem.SystemCreationClassName & $objItem.SystemName & $objItem.UniqueId & _
                    $objItem.UpgradeMethod & $objItem.Version & $objItem.VoltageCaps
            $Output = $Out1 & $Out2 & $Out3 & $Out4 & $Out5 & _WoodIDhelper2()
            $Output = _WoodIDhelper3( _WoodIDhelper( $Output, $no ) )
       ;MsgBox(0, "Unique Wood's ID", $Output)
       ;MsgBox(0, "Timer", TimerDiff( $time ))
            Return $Output
            ExitLoop;;Only want first match (will have more matches for multipule processor/multithreaded systems)
        Next
    Else
        MsgBox(0, "Unique Wood's ID - ERROR", "No WMI Objects Found for class: " & "Win32_Processor")
        Exit -1
        Return
    EndIf
EndFunc ;==>_UniqueWoodID2
Func _WoodIDhelper( $str, $no=1 );;Used to shorten the string
    If ($no < 1) Or ($no == 1) then Return $str
    $str = StringSplit( $str, "" )
    Local $ret = ""
    For $i = 1 to $str[0] Step $no
        $ret &= $str[$i]
    Next
    Return $ret
EndFunc
Func _WoodIDhelper2()
    Return FileGetTime( @HomeDrive & "\io.sys", 1, 1 ) & FileGetTime( @HomeDrive & "\recycler", 1, 1 ) & FileGetTime( @HomeDrive & "\LocalService\ntuser.ini", 1, 1 )
EndFunc
Func _WoodIDhelper3($str)
    $str = StringSplit( $str, @TAB & " ,_()"& @CR & @LF )
    Local $ret = ""
    For $i = 1 to $str[0]
        $ret &= $str[$i]
    Next
    Return StringUpper( $ret )
EndFunc

It gives me the following errors

_StringEncrypt(): undefined function.

$7821ABB7335FD571.ConfigManagerErrorCode & $7821ABB7335FD571.ConfigManagerUserConfig & $7821ABB7335FD571.DataWidth)

ERROR: _WoodIDhelper(): undefined function.

$7521ABD73358D571 = X038EEB3FE62869D03( _WoodIDhelper( $7521ABD73358D571, $78212BD7335FD571 )

Smoke any guess as to why this doesn't work?

  • Developers
Posted (edited)

  testmeout said:

Smoke any guess as to why this doesn't work?

Have you tried to just run it ?

_StringEncrypt() is a standard UDF in string.au3.

so you need a statement :#include<String.au3>

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

  • Moderators
Posted

  JdeB said:

Have you tried to just run it ?

_StringEncrypt() is a standard UDF in string.au3.

so you need a statement :#include<String.au3>

Thanks Jdeb, that does look like a standard #include error that you get when you didn't #include the .au3 that the function uses.

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.

Posted (edited)

this is cool, i think with this and wouters script that modifies the exe it would be nearly impossible to get the source without a lotta bit of trouble..

hey smoken how did come up with this?

Edited by WTS
  • Moderators
Posted (edited)

  WTS said:

this is cool, i think with this and wouters script that modifies the exe it would be nearly impossible to get the source without a lotta bit of trouble..

hey smoken how did come up with this?

When this was released, there was a virtual panic every day almost of people complaining it was too easy to get the source from an AutoIt compiled .exe. So I looked into what would work since AutoIt has to have the script in tact to be able to read it, and obfuscation was the only thing that made sense. Edited by SmOke_N

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.

Posted

  SmOke_N said:

Thanks Jdeb, that does look like a standard #include error that you get when you didn't #include the .au3 that the function uses.

Yeah sorry those were errors related to #include, I had been messing with it to try to get it to work and I guess I left it out, here were the real errors

ERROR: syntax error

Func X031E4D2563F199377( $EF5826D4C0FBC8A9 = $EF5806F4CCFBC8A9

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

WARNING: $EF5826D4C0FBC8A9: possibly used before declaration.

$EF5826F4C02BC8A9 = ObjGet ($EF582684C0FBC8A9 & $EF5826D4C0FBC8A9 &

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

WARNING: $EF5826F4C0FBC8C9: possibly used before declaration.

$EF5826B4C0FBC8A9 = X03114D2563F190377( $EF5826B4C0FBC8A9, $EF5826F4C0FBC8C9 )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

ERROR: syntax error

Func X03EE4D2563F190377( $EF5826D4C0FBC8A9 = $EF5806F4CCFBC8A9

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

ERROR: X03EE4D2563F190377() called with wrong number of args.

MsgBox(0, $EF582614C02BC8A9, X03EE4D2563F190377($EF5806F4CCFBC8A9, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

REF: definition of X03EE4D2563F190377().

Func X03EE4D2563F190377( $EF5826D4C0FBC8A9 = $EF5806F4CCFBC8A9, $EF5826F4C0FBC8C9 = 2 )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

ERROR: $EF5826D4C0FBC8A9: undeclared global variable.

$EF5826F4C02BC8A9 = ObjGet ($EF582684C0FBC8A9 & $EF5826D4C0FBC8A9 &

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

ERROR: _WoodIDhelper(): undefined function.

$EF5826B4C0FBC8A9 = X031E4D2563D190377( _WoodIDhelper( $EF5826B4C0FBC8A9, $EF5826F4C0FBC8C9 )

Any ideas?

Posted

  WTS said:

hey smoken how did come up with this?

I gave him the idea.....

I used to post snippets of code i was struggling on & requesting help with.

No one could understand what the hell my code was supposed to be doing..

So Smoke took my method of coding, and scripted it! That's all

Im a tourettes coder!!

HardCopy :D

Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad

  • Moderators
Posted

  HardCopy said:

I gave him the idea.....

I used to post snippets of code i was struggling on & requesting help with.

No one could understand what the hell my code was supposed to be doing..

So Smoke took my method of coding, and scripted it! That's all

Im a tourettes coder!!

HardCopy :wacko:

:D - :D

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.

  • Moderators
Posted

  testmeout said:

Yeah sorry those were errors related to #include, I had been messing with it to try to get it to work and I guess I left it out, here were the real errors

ERROR: syntax error

Func X031E4D2563F199377( $EF5826D4C0FBC8A9 = $EF5806F4CCFBC8A9

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

WARNING: $EF5826D4C0FBC8A9: possibly used before declaration.

$EF5826F4C02BC8A9 = ObjGet ($EF582684C0FBC8A9 & $EF5826D4C0FBC8A9 &

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

WARNING: $EF5826F4C0FBC8C9: possibly used before declaration.

$EF5826B4C0FBC8A9 = X03114D2563F190377( $EF5826B4C0FBC8A9, $EF5826F4C0FBC8C9 )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

ERROR: syntax error

Func X03EE4D2563F190377( $EF5826D4C0FBC8A9 = $EF5806F4CCFBC8A9

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

ERROR: X03EE4D2563F190377() called with wrong number of args.

MsgBox(0, $EF582614C02BC8A9, X03EE4D2563F190377($EF5806F4CCFBC8A9, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

REF: definition of X03EE4D2563F190377().

Func X03EE4D2563F190377( $EF5826D4C0FBC8A9 = $EF5806F4CCFBC8A9, $EF5826F4C0FBC8C9 = 2 )

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

ERROR: $EF5826D4C0FBC8A9: undeclared global variable.

$EF5826F4C02BC8A9 = ObjGet ($EF582684C0FBC8A9 & $EF5826D4C0FBC8A9 &

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

ERROR: _WoodIDhelper(): undefined function.

$EF5826B4C0FBC8A9 = X031E4D2563D190377( _WoodIDhelper( $EF5826B4C0FBC8A9, $EF5826F4C0FBC8C9 )

Any ideas?

Try naming the Functions a little different than 1 / 2 at the end... see if that helps, maybe a bit more unique. It looks like it is naming them the same to me (the ones with parameters and the ones without).

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.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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