Jump to content

Recommended Posts

Posted

Bundle v2.3 released, with experimental support for (encryption of) object methods.

@souldjer777: Glad to hear you got it working again, although I get the impression your CodeScannerCrypter work environment is not entirely stable, as your latest issue is resolved in my own environment now. Maybe try with the latest version of the bundle, released today? Kindly post the smallest-possible reproducer test script if you continue to experience serious issues.:)

@Deye: Hello there.^_^ Your wish is my command (well, as I'm waiting for a very long calculation to finish your request provided a nice challenging tears-inducing interesting diversion). CodeScanner now tracks object method calls (not object queries though!), and MCF can encode/recode them (if all goes well:sweating:). This is an experimental, possibly very unstable feature, so use it at your own risk!

Posted (edited)

Good Morning RTFC :)

Here's what I got from the latest v2.3 run...

Local $UIA_propertiesSupportedArray[123][2]=[["indexrelative",$__UIA_SpecialProperty], _
"index",$__UIA_SpecialProperty], _
"instance",$__UIA_SpecialProperty], _
"title",$UIA_NamePropertyId], _
"text",$UIA_NamePropertyId], _
Local $patternArray[21][3]=[[$UIA_ValuePatternId,$sIID_IUIAutomationValuePattern,$dtagIUIAutomationValuePattern], _
$UIA_InvokePatternId,$sIID_IUIAutomationInvokePattern,$dtagIUIAutomationInvokePattern], _
$UIA_SelectionPatternId,$sIID_IUIAutomationSelectionPattern,$dtagIUIAutomationSelectionPattern], _

"error: syntax error"
"error: wrong nesting in initializer"
"error: Statement cannot be just an expression."

I appreciate all the help!!!  :D

Thanks!

Edited by souldjer777

"Maybe I'm on a road that ain't been paved yet. And maybe I see a sign that ain't been made yet"
Song Title: I guess you could say
Artist: Middle Class Rut

Posted

@souldjer777: That's not what I asked for.:( If you want me to fix something you have to provide me with a (the smallest possible!) reproducer script, not a single partial line of code. I need to see the original script you provide run, and the Backtranslated or Encrypted version fail, for me to be able to figure out what might be going wrong. For example, this works fine for me:

Global $UIA_ValuePatternId, $sIID_IUIAutomationValuePattern, $dtagIUIAutomationValuePattern
Global $UIA_InvokePatternId, $sIID_IUIAutomationInvokePattern, $dtagIUIAutomationInvokePattern
Global $UIA_SelectionPatternId, $sIID_IUIAutomationSelectionPattern, $dtagIUIAutomationSelectionPattern
Global $UIA_LegacyIAccessiblePatternId, $sIID_IUIAutomationLegacyIAccessiblePattern, $dtagIUIAutomationLegacyIAccessiblePattern
Global $UIA_SelectionItemPatternId, $sIID_IUIAutomationSelectionItemPattern, $dtagIUIAutomationSelectionItemPattern
Global $UIA_RangeValuePatternId, $sIID_IUIAutomationRangeValuePattern, $dtagIUIAutomationRangeValuePattern
Global $UIA_ScrollPatternId, $sIID_IUIAutomationScrollPattern, $dtagIUIAutomationScrollPattern
Global $UIA_GridPatternId, $sIID_IUIAutomationGridPattern, $dtagIUIAutomationGridPattern
Global $UIA_GridItemPatternId, $sIID_IUIAutomationGridItemPattern, $dtagIUIAutomationGridItemPattern
Global $UIA_MultipleViewPatternId, $sIID_IUIAutomationMultipleViewPattern, $dtagIUIAutomationMultipleViewPattern
Global $UIA_WindowPatternId, $sIID_IUIAutomationWindowPattern, $dtagIUIAutomationWindowPattern
Global $UIA_DockPatternId, $sIID_IUIAutomationDockPattern, $dtagIUIAutomationDockPattern
Global $UIA_TablePatternId, $sIID_IUIAutomationTablePattern, $dtagIUIAutomationTablePattern
Global $UIA_TextPatternId, $sIID_IUIAutomationTextPattern, $dtagIUIAutomationTextPattern
Global $UIA_TogglePatternId, $sIID_IUIAutomationTogglePattern, $dtagIUIAutomationTogglePattern
Global $UIA_TransformPatternId, $sIID_IUIAutomationTransformPattern, $dtagIUIAutomationTransformPattern
Global $UIA_ScrollItemPatternId, $sIID_IUIAutomationScrollItemPattern, $dtagIUIAutomationScrollItemPattern
Global $UIA_ItemContainerPatternId, $sIID_IUIAutomationItemContainerPattern, $dtagIUIAutomationItemContainerPattern
Global $UIA_VirtualizedItemPatternId, $sIID_IUIAutomationVirtualizedItemPattern, $dtagIUIAutomationVirtualizedItemPattern
Global $UIA_SynchronizedInputPatternId, $sIID_IUIAutomationSynchronizedInputPattern, $dtagIUIAutomationSynchronizedInputPattern
Global $UIA_ExpandCollapsePatternId, $sIID_IUIAutomationExpandCollapsePattern, $dtagIUIAutomationExpandCollapsePattern

Local $patternArray[21][3] = [ _
        [$UIA_ValuePatternId, $sIID_IUIAutomationValuePattern, $dtagIUIAutomationValuePattern], _
        [$UIA_InvokePatternId, $sIID_IUIAutomationInvokePattern, $dtagIUIAutomationInvokePattern], _
        [$UIA_SelectionPatternId, $sIID_IUIAutomationSelectionPattern, $dtagIUIAutomationSelectionPattern], _
        [$UIA_LegacyIAccessiblePatternId, $sIID_IUIAutomationLegacyIAccessiblePattern, $dtagIUIAutomationLegacyIAccessiblePattern], _
        [$UIA_SelectionItemPatternId, $sIID_IUIAutomationSelectionItemPattern, $dtagIUIAutomationSelectionItemPattern], _
        [$UIA_RangeValuePatternId, $sIID_IUIAutomationRangeValuePattern, $dtagIUIAutomationRangeValuePattern], _
        [$UIA_ScrollPatternId, $sIID_IUIAutomationScrollPattern, $dtagIUIAutomationScrollPattern], _
        [$UIA_GridPatternId, $sIID_IUIAutomationGridPattern, $dtagIUIAutomationGridPattern], _
        [$UIA_GridItemPatternId, $sIID_IUIAutomationGridItemPattern, $dtagIUIAutomationGridItemPattern], _
        [$UIA_MultipleViewPatternId, $sIID_IUIAutomationMultipleViewPattern, $dtagIUIAutomationMultipleViewPattern], _
        [$UIA_WindowPatternId, $sIID_IUIAutomationWindowPattern, $dtagIUIAutomationWindowPattern], _
        [$UIA_DockPatternId, $sIID_IUIAutomationDockPattern, $dtagIUIAutomationDockPattern], _
        [$UIA_TablePatternId, $sIID_IUIAutomationTablePattern, $dtagIUIAutomationTablePattern], _
        [$UIA_TextPatternId, $sIID_IUIAutomationTextPattern, $dtagIUIAutomationTextPattern], _
        [$UIA_TogglePatternId, $sIID_IUIAutomationTogglePattern, $dtagIUIAutomationTogglePattern], _
        [$UIA_TransformPatternId, $sIID_IUIAutomationTransformPattern, $dtagIUIAutomationTransformPattern], _
        [$UIA_ScrollItemPatternId, $sIID_IUIAutomationScrollItemPattern, $dtagIUIAutomationScrollItemPattern], _
        [$UIA_ItemContainerPatternId, $sIID_IUIAutomationItemContainerPattern, $dtagIUIAutomationItemContainerPattern], _
        [$UIA_VirtualizedItemPatternId, $sIID_IUIAutomationVirtualizedItemPattern, $dtagIUIAutomationVirtualizedItemPattern], _
        [$UIA_SynchronizedInputPatternId, $sIID_IUIAutomationSynchronizedInputPattern, $dtagIUIAutomationSynchronizedInputPattern], _
        [$UIA_ExpandCollapsePatternId, $sIID_IUIAutomationExpandCollapsePattern, $dtagIUIAutomationExpandCollapsePattern] _
        ]
Posted

@RTFC

Thanks for taking the trouble amending a whole routine for object methods into the UDFs
Didn't realize its going to take that much of amending .. :o

Thanks again !:D

Posted (edited)
On 1/26/2018 at 6:19 PM, Deye said:

a whole routine for object methods

You're welcome.:) It actually required new code in CodeScanner, MCF, and readCSdatadump. The trouble with object methods for me is, I don't use them myself at all because they are weird in mine eyes, viz.:

  • they look like variables, but you can't stick something in them, and they should not be obfuscated
  • they also look a bit like strings, but they cannot be edited, and should not be translated
  • they behave like function calls, but have no brackets, no separate parameters, and no accessible definition elsewhere in the sript, so it's not clear what they do or how they do it, and you cannot fix them yourself if they screw up
  • yet they are executable calls of a kind, and should be phrased by MCF prior to execution

So my initial hopes of piggy-backing them onto an existing metacode category failed repeatedly (hence the tears:'(), which is why CodeSCanner now lists and stores them as a separate entity (which of course they are; I was just being lame and lazy). But now I've had some chocolate milk and cookies and I'm all better now.:baby:

Edited by RTFC
  • 2 weeks later...
Posted (edited)

Impressive :)

 

A comment

I have finally gotten round to running this on an existing project.  Takes forever on 48k lines... 

 

Some suggestions

I have the following comments on this thread - please consider in Post #1 to state at the very top Date and Current Version - will make it quick and easy to see when it was last updated.  Please list the downloads (I count 3) in a list?

Please include the comments in posts #71 and #185 & #187 in Post #1?  It's not so much what it does, as how to use it :)

 

Support request

Then, as far as the actual encrypter is concerned.  Encrypting my entire script is not my issue.  As you point out a lot of the standard includes are in the public domain.  However I have SQL queries which are listed as strings all over the place.  All I really need is to encrypt these strings... :) 

Any thoughts would be very welcome...

Skysnake

Edited by Skysnake

Skysnake

Why is the snake in the sky?

Posted

Hello, everyone,

I already successfully used CodeCrypter in version 1.9 two years ago, I had no problems with this.
Now I have tried again, but neither the current version nor the version 1.9 runs for me.
Not on Windows 7, not on Windows 10... I'm going insane. I tested it with AutoIT version 3.3.14.2 as well as with the current version.

My test script consists of a single line, a MsgBox. So it's not 100% due to the script... CodeScanner generates the necessary output and "Obfuscate" also works.
If I choose "Encrypt" I get the error message attached below.
onxn8gur.jpg

I'm a little confused. Does anybody have any idea what the reason might be?

Many thanks in advance,
Tupac

Posted

Hi @Tupac, I had the same.  Do you have the #include in your script?

I saw that the tools (scanner&crypter) work up to this point without the #include in the target file...

Skysnake

Skysnake

Why is the snake in the sky?

Posted

Hi, Skysnake,

the includes were all there. I've narrowed down the problem. I had used Visual Studio Code as an editor. This always starts scripts with pointless CommandLine parameters. Therefore I added the additional line "$cmdline[0] = """ in codescanner and codecrpter.

After removing these lines AND running the whole thing on my Windows 7 VM with the SciTE editor, it worked now.
The problem was my small customization and the Visual Studio code editor.

Thank you for your feedback,
Tupac

Posted
On 19/10/2013 at 11:02 PM, RTFC said:

From the same post you can download an MCF Tutorial

Hi Any one have this tut laying around, seems that its gone from the org post :(

Cheers

/Rex

Posted

The CodeCrypter package is really excellent, there's nothing else to say! Especially for newly created or smaller programs, this is a quick and wonderful way to secure the code! Many thanks for that!!! :)

In my case I have a nearly 90,000 lines of a program which I tried to encrypt.
Basically, this also works, but there are some problems (which could certainly be solved in sufficient time and effort) and the encryption process takes several hours.

However, it makes no sense to encrypt the entire program, as it may only makes sense to encrypt 100 lines containing access data. These credentials are currently global, so they are set at the beginning, so encryption has to start early. Are there possibilities to encrypt only parts of the program and to exclude others? I read that you should add the include of "MCFinclude. au3" at the point from which you want to start the encryption.... can you specify a point, from when the encryption should not ne done anymore?

As you can see from my text, I am looking for a solution to encrypt only partial parts of the program. I would be very grateful for a solution or approach!

Regards,
Tupac

Posted (edited)

@Skysnake: Thanks a lot :) for your comments and suggestions; I'll see if I can improve the first post. Added MCF Tutorial to MCF thread's first post.

On 2/8/2018 at 8:37 PM, Skysnake said:

Takes forever on 48k lines

I'm not surprised. You should consider limiting what you encrypt, either by volume (x%, every Nth line only, you can set this through subset definition, see the FAQ for details) or targeting specific UDFs only (under "UDF" button, under Tab Encrypt). If it's only strings that need to be protected, you can switch code-encryption off altogether and just encrypt text strings, by unticking the "Phrases" box under the Encrypt Tab. If you need more control, you can start with an encryption pass on all strings (generating stringsEncryp.txt in the MCF subdir of your script, and then building your own stringsNew.txt by copying line-by-line from either stringsUsed.txt or stringsEncryp.txt (but be VERY CAREFUL not to miss/duplicate any line, because line nr = array index in the MCF replacement pass), then use CodeCrypter's "Create New" option instead of Encrypt.

NB I would still keep MCFinclude.au3 as your last regular include, above your main procedure and your own UDFs.

@Tupac Thank you for the kind words,^_^ sorry you had some trouble getting the environment to work for you at the outset. See my answer directly above in this same post for some suggestions how to reduce your encryption footprint. Hint: The FAQ also goes into detail about this.;)

@Rex: Tutorial download link added in MCF thread post #1. I had removed it because of earlier space restrictions.

Edited by RTFC
Posted (edited)

It means that while collecting #include files referenced in other include-files, a single pass (of this recursive search) yielded >50 new files, which at the time I wrote it was a useful red-flag for circular referencing and other pathological #include structures. If you are really including many more external UDFs at any particular include netsting level, you can bump up that threshold in CodeScanner's source, in function _BuildIncTree, ca. line 3620, e.g. replace 50 with 100:

If $samecount+$largercount>100 Then

Or whatever maxvalue seems reasonable in your specific circumstances.

Edited by RTFC
Posted (edited)

grrrum. It is caused by something else becouse I used autoit stripper so all includes are coupled in one file 10k lines .

I made so many changes in my program but cant figure out what caused this problem.

Now I set

If $samecount+$largercount>2300 Then

soomuch long execute time and same error.

only one include in this file is MCFinclude.au3

Maybe it look into dll files,bitmap or etc

Edited by Miliardsto
Posted

Do you or don't you have >2300 include files? I suspect you don't, so then I suspect some of your #includes do not have directive #include-once at the top, and there is some circular referencing going on, causing the include-tree mapping to balloon exponentially out of control (which is exactly what that check was testing for). Just my two cents without having studied your code, of course. Can't do much to help you other than to suggest you don't strip the source yourself, and try removing all explicit includes (and the main code that references these), and re-including them one at a time, then following the branches further up. Do you have earlier versions of your code that still work, for comparison? I don't suppose you can create a 10-line reproducer script in this case, so in that case I would start disabling large parts of your code, and re-analyse repeatedly while stepwise re-enabling more parts again, until it fails again, then study that last re-enabled part in more detail.

Posted

Good catch, Miliardsto. I was aware of some issues in the latest AutoIt version, but not having upgraded yet myself, I was unaware that some of these might affect CodeScanner's proper functioning.:( Let's hope the devs get on top of it soon. Glad you found a way forward regardless though.:)

  • 3 weeks later...
  • 2 months later...
Posted (edited)

This post uses Google Translate.

Hello, first of all thank you for your encryption tool.

========================================================
Tested on....W10Pro/86
Test Tools... CodeScannerCrypter.bundle.source.v2.3

Source script:

#include <MsgBoxConstants.au3>
#include "MCFinclude.au3"; for encryption only
Global $WriteMetaCode = True
Local $iTimeout = 10.
MsgBox($MB_SYSTEMMODAL, "Title", "This message box will timeout after " & $iTimeout & " seconds or select the OK button.", $iTimeout)
=========================================================
In order to solve the problem of a large number of documents lost in "Includes", after some hard work,
Last modified in your codescanner.au3 script....

Lines 3151 and 3152:
$AutoItIncludeFolder & $newinclude
change into:
$AutoItIncludeFolder & "\" & $newinclude

Line 4574:
StringInStr($AutoItIncludeFolder,"\",0,-2)
change into:
StringInStr($AutoItIncludeFolder,"\",0,-1)

This will solve the problem that "Includes" is not found

The above changes are for reference only!

Edited by Melba23
Huge quote translated to Chinese removed

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
×
×
  • Create New...