Jump to content

Recommended Posts

  • Developers
Posted

Posted Image

Pushing my luck here now, but what about saving the state of a users bookmarks when SciTE is closed then re-opened?

Doesn't it do that already?

Option session.bookmarks=1 was introduced a while ago that saves the bookmark state in the SciTE.session file.

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

  • Replies 299
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Developers
Posted

I'm running the latest SciTE4AutoIt3 version out there, with the beta Tidy.exe

Edit: Should also add that, no, it doesn't save them for me.

It does for me. When I close SciTE and then start SciTE it will reload my last session thus open all files that were open and place the bookmarks.

This will not work when you double click on a x.au3 file as that will start a new session and you will loose the previous session info.

Check to see what you have for these parameters in SciTEGlobal.properties and SciTEUser.properties:

save.session=1
save.position=1
session.bookmarks=1
session.folds=1

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

  • 3 weeks later...
Posted (edited)

Something I missed in relation to the Obfuscator /obfuscate_minimum option? (ICYC, help says /ObfuscateMinumum.)

The obfuscate minimum option seems to not do anything anymore, at this end at least. (Including other command variations I could think off.)

(solved -> see #109+#110)

CodeDump (removed)

Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

  • Moderators
Posted

MvGulik,

I had this very conversation with Jos a while ago. It seems that /SO overrides all other parameters and so you need to specify the equivalent parameters to /SO in full to get the /OM to act.

Original script:

#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
Example()
Func Example()
    Local $abc = "cde"
    $abc &= $abc
EndFunc

and obfuscated:

_3_()
Func _3_()
Local $a4 = "cde"
$a4 &= $a4
EndFunc

I hope that helps. :x

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

Removing the nice indentation is minimal obfuscation.

:P

Next problem.

I had this very conversation with Jos a while ago. It seems that /SO overrides all other parameters and so you need to specify the equivalent parameters to /SO in full to get the /OM to act.

#Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0

I hope that helps. :shifty:

Yes, Now I at least have something that works to test with.

The /SO option itself seems to be not the whole story, I'm missing something ...

... arggggg ...

Coin dropped.

- /cf 0/1 : 0=No Func rename (1=default)

- /cv 0/1 : 0=No Var rename (1=default)

Or /cf and /cv take precedents over /mo.

:x

Thanks Melba.

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

  • Developers
Posted (edited)

/so or /striponly implies:

StripOnly = 1

StripOnlyIncludes = 0

StripUnUsedFunc = 1

StripUnUsedVars = 1

ConvStrings = 0

ConvNumerics = 0

ConvFuncs = 0

ConvVars = 0

/soi or /striponlyincludes implies:

StripOnly = 0

StripOnlyIncludes = 1

StripUnUsedFunc = 1

StripUnUsedVars = 1

ConvStrings = 0

ConvNumerics = 0

ConvFuncs = 0

ConvVars = 0

The /OM or /obfuscate_minimum is just telling Obfuscator when any obfuscation is done to make the variables and funcnames as short as possible.

Jos

Edited by Jos

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

  • 3 weeks later...
Posted (edited)

(thanks)

- Obfuscator -

If you use #NoTrayIcon in your script. It gets passed to the <scriptname>_Obfuscated.au3 file.

But the same is not true for #NoAutoIt3Execute. (test confirmed its not active on Obfuscated builds while it is active on none Obfuscated builds, same initial source code of course.)

Should #NoAutoIt3Execute not also work the same as #NoTrayIcon?

[edit]version check: 1.0.28.11 == beta[/edit]

Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

  • Moderators
Posted

Jos,

Thanks. :x

.....

Now go ski and forget us for a while! :P

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

  • 4 weeks later...
Posted (edited)

Hi!

I have two bugs with Obfuscator v1.0.28.7.

1. I have two files with the same names (for example, winapi.au3, the first is placed in the script's folder and the second is in the C:\Program Files\AutoIt3\Include\). The Obfuscator uses the file from C:\Program Files\AutoIt3\Include\ folder, but it must use the file from the script's folder.

2. when I include a some file in my script, which use any functions from inside yourself, my script doesn't use those functions, Obfuscator with key /sf 1 removes those functions and compiled script breaks out. I think Obfuscator uses bad algoritm for checking used functions.

Can I offer my ideas for this algoritm by example:

#Include <File.au3>
#include <Array.au3>

$start_file='start.au3' ;script for Obfuscator
$new=@WorkingDir&'\tinyn\' ;folder for temp files
Dim $inc[1][4]; include/number string/file name/num func
$inc_c=0; count of include's files
Dim $fa[1][4]
Dim $fl
Dim $fc
$inc_t=0
$inc_st=''
parse_inc($start_file) ; searching of include's files in start file
;start check include for include
If $inc_c>0 Then

        While 1
                $name=$inc[$inc_t][0]
                If Not(FileExists($name)) Then $name='C:\Program Files\AutoIt3\Include\'&$name
                 ;chech include for include
                parse_inc($name)
                $inc_t+=1
                If $inc_t==$inc_c Then ExitLoop
        WEnd
EndIf
;all include's collected, go to start used functions
;start check func
$do=True
While $do
        $do=False
        For $k=0 To $inc_c-1
                If $inc[$k][3]==0 Then ContinueLoop ; enough for this include if uses is 0
                $inc[$k][3]-=1 ; decrease uses of this include
                $do=True
                parse_fun($inc[$k][0],$inc[$k][2]) ; check function
        Next

WEnd

_ArrayDisplay($inc)

Func parse_inc($fn)
        If Not(FileExists($fn)) Then Return
        ReDim $inc[$inc_c+1][4]
        Local $fl
        local $name
        $name=$fn
        If StringRegExp($fn,'\\',0) Then
                $b=StringRegExp($fn,'(?i)(?<=\\)[^\\]*?\.au3$',2);(?i)[_|[:alpha:]]*(?=\()
                If @error==0 Then $name=$b[0]
        EndIf
        _FileReadToArray($fn,$fl)
        For $i=1 To $fl[0]
                $b=StringRegExp($fl[$i],'(?i)(?<=(?<!;)\#include\ (<|")).*?\.au3(?=(>|"))',2);(?i)[_|[:alpha:]]*(?=\()
                If @error==0 Then
                        If StringRegExp($b[0],'(?i)Constants',0) Then ContinueLoop ; skip include's file with constants
                        If StringInStr($inc_st,$b[0])>0 Then ;check for include's was found now into include's found before
                                $j=0
                                While Not($b[0]=$inc[$j][0]) ; searching index of this include
                                        $j+=1
                                WEnd
                                                $inc[$j][2]&=' '&$name ; adding name of calling include
                                                $inc[$j][3]+=1 ;increase count of uses this include
                        Else
                                $inc_st&=$b[0] ; adding new include
                                $inc[$inc_c][0]=$b[0] 
                                $inc[$inc_c][1]=$i
                                $inc[$inc_c][2]=$name ; saving first calling include
                                $inc[$inc_c][3]=1 ; set count of uses is 1
                                $inc_c+=1 ; increase count of includes
                                ReDim $inc[$inc_c+1][4] ;increase array
                        EndIf
                EndIf
        Next
        ReDim $inc[$inc_c][4]
        ;save new file
        FileCopy($fn,$new&$name,9) ; copy include to the temp folder
        FileSetAttrib($new&$name,"-R") ; for files from C:\Program Files\AutoIt3\Include\
EndFunc

Func parse_fun($fn,$str)
$fs=$new&$fn ; file name of include

_FileReadToArray($fs,$fl)

Dim $fa[Ceiling($fl[0]/3)][4] ; array for store func
Dim $fu[10][2] ; array for store indexes and names of used functions
$fc=0
$fu_c=0
Local $i
$comm=False
For $i=1 To $fl[0]
        If StringRegExp($fl[$i],'(?i)#cs') Then ;skip comments for searching
                $comm=True
                ContinueLoop
        EndIf

        If StringRegExp($fl[$i],'(?i)#ce') Then
                $comm=False
                ContinueLoop
        EndIf
        If $comm Then ContinueLoop

        If StringInStr($fl[$i],'OnAutoItExit',2)>0 Then ; special command for using function, we take it (self used)
                $fu[$fu_c][0]='OnAutoItExit'
                        $fu[$fu_c][1]=$i
                        $fu_c+=1
        EndIf
        $b=StringRegExp($fl[$i],'(?<=Func )[^\(]*(?=\()',2);(?i)[_|[:alpha:]]*(?=\() ;check word func

                If @error==0 Then
                        $fa[$fc][0]=$b[0] ; name
                        $fa[$fc][1]=$i+1  ; start func
                        $fa[$fc][3]=0     ; end func, will be filled after
                        $fc+=1            ; count
                        ContinueLoop
                EndIf


        If StringInStr($fl[$i],'GUIRegisterMsg(',2)>0 Then ; special command for using function, we take it (self used)
        $b=StringRegExp($fl[$i],'(?<=")[^"]*',2)

                If @error==0 Then
                        $fu[$fu_c][0]=$b[0]
                        $fu[$fu_c][1]=$i
                        $fu_c+=1
                EndIf
                ContinueLoop
        EndIf


        If StringInStr($fl[$i],'EndFunc',2)>0 Then $fa[$fc-1][2]=$i-1

Next
;file check for func finished
        ReDim $fa[$fc][4]
        $s1=''
        If $fu_c>0 Then
                ReDim $fu[$fu_c][2]

                $s1=''
                For $i=1 to $fa[0][1]-2
                        $s1&=$fl[$i]
                Next
        EndIf
$names=StringSplit($str,' ',0) ; array of files which uses this include

For $i=1 To $names[0] ; read them all in one string
        $fn=$new&$names[$i]
$fl1=FileOpen($fn,0)
$s=FileRead($fl1)
$s1&=$s
Next
local $j
For $j=0 To $fc-1
        If $fu_c>0 Then
        For $i=0 To $fu_c-1 ;for all founded func
                If StringInStr($fa[$j][0],$fu[$i][0],2)>0 Then
                        check($j) ; search func calling from func
                        ContinueLoop 2
                EndIf
        Next
        EndIf
        If StringInStr($s1,$fa[$j][0],2)>0 Then check($j) ; func found in file
; !!!!!!!!! warning in that place may be found func under comment!!!!!!!!!!!
; may be necessary reading files in one string needed to modify for skipping comment
Next
For $i=$fc-1 to 0 Step -1 ;remove don't used func
        If $fa[$i][3]==0 Then
                For $j=$fa[$i][2]+1 To $fa[$i][1]-1 step -1
                        _ArrayDelete($fl,$j)
                Next

        EndIf

Next
$err=_FileWriteFromArray($fs,$fl,1) ;save modified include
EndFunc

Func check($ind)
        Local $s
        If $fa[$ind][3]==1 Then Return 0
        $fa[$ind][3]=1
        Local $comm
        For $k=$fa[$ind][1] To $fa[$ind][2]
                $s=$fl[$k]
                If StringRegExp($s,'(?i)#cs') Then
                        $comm=True
                        ContinueLoop
                EndIf

                If StringRegExp($s,'(?i)#ce') Then
                        $comm=False
                        ContinueLoop
                EndIf
                If $comm Then ContinueLoop
                While 1
                        If Not(StringInStr($s,'(',2)) Then ExitLoop
                                If StringRegExp($s,'(?i)(?<=;)[_|[:alpha:]]*?(?=\()') Then ExitLoop
                                $b=StringRegExp($s,'(?i)[_|[:alpha:]]*?(?=\()',2)

                                If @error==0 Then
                                        $test=get_ind($b[0])
                                        If Not($test==False) Then check($test)
                                        $n=StringInStr($s,$b[0],2)
                                        $s=StringTrimLeft($s,$n+StringLen($b[0])+1)
                                EndIf
                WEnd
        Next
        Return 1
EndFunc

Func get_ind($st)
        For $j=0 To $fc-1
                If StringInStr($fa[$j][0],$st,2)>0 Then Return $j
        Next
Return False
EndFunc
Exit
Edited by nickston
  • Moderators
Posted

nickston,

First, please edit your post to use code tags - put [autoit] before and [/autoit] after your posted code. :)

The Obfuscator uses the file from C:\Program Files\AutoIt3\Include\ folder, but it must use the file from the script's folder

That is not Obfuscator, that is AutoIt - go and read the Help file for #include and note the difference between these 2 lines: :idiot:

#include <file.au3>

#include "file.au3"

I think Obfuscator uses bad algoritm for checking used functions

I, and a lot of other users, do not. Why do you say this? What exactly is your script supposed to show?;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted (edited)

First, please edit your post to use code tags - put [autoit] before and [/autoit] after your posted code. :)

That is not Obfuscator, that is AutoIt - go and read the Help file for #include and note the difference between these 2 lines: :idiot:

I, and a lot of other users, do not. Why do you say this? What exactly is your script supposed to show?;)

1. It's my mistake about tag - i'm correct post.

2. About " and < I'm approuve

3. In short, my script searching all "include" (from script, from script's include and so on).

in all includes it's searching all uses functions and save include's files without unused functions.

in my first post I wrote:

when I include a some file in my script, which use any functions from inside yourself, my script doesn't use those functions, Obfuscator with key /sf 1 removes those functions and compiled script breaks out.

for example, include attached file. run Obfuscator with key /sf 1. After compiling exe, exe doesn't working.

if run Obfuscator with key /sf 0. Exe working ok.

on the assumption of that, I think what Obfuscator remove some used function.

Edited by nickston
  • Developers
Posted (edited)

3. In short, my script searching all "include" (from script, from script's include and so on).

in all includes it's searching all uses functions and save include's files without unused functions.

in my first post I wrote:

when I include a some file in my script, which use any functions from inside yourself, my script doesn't use those functions, Obfuscator with key /sf 1 removes those functions and compiled script breaks out.

for example, include attached file. run Obfuscator with key /sf 1. After compiling exe, exe doesn't working.

if run Obfuscator with key /sf 0. Exe working ok.

on the assumption of that, I think what Obfuscator remove some used function.

Show me a simple example where Obfuscators func strip logic has a flaw.

Jos

Edited by Jos

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

Posted

Show me a simple example where Obfuscators func strip logic has a flaw.

Jos

Ok.

see attach.

you can try three ways:

1 compiling script without Obfuscators

2 compiling script with key /sf 0

3 compiling script with key /sf 1

after compiling try click on second icon

test.rar

  • Developers
Posted (edited)

Try the same but using:

#Obfuscator_Parameters=/so

So.. its an bug that for /sf this warning isn't reported but that is the reason obfuscator isn't able to strip Func's properly.

EDIT: Updated the Beta Obfuscator.exe v1.0.28.13 to ensure this warning is also shown when using /sf.

Jos

Edited by Jos

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

Posted

So.. its an bug that for /sf this warning isn't reported but that is the reason obfuscator isn't able to strip Func's properly.

1 It's a bug or not?

2 for all that, is obfuscator working wrong?

  • Developers
Posted

1 It's a bug or not?

2 for all that, is obfuscator working wrong?

Obfuscator works fine, but it can not perform magic like figure out what func is Called in a CALL() statement when it contains a variable, hence the warning given and its for you to sort out whether its a real issue or not.

You can force func's to be kept in all cases by specifying them in:

#obfuscator_ignore_funcs=

Jos

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

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

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