找回密码
 加入
搜索
楼主: tubaba

[原创] ,Au3Encode-代码整合混淆- 所有附件均已删除,请勿再顶此贴

[复制链接]
发表于 2017-4-21 12:32:38 | 显示全部楼层
 楼主| 发表于 2017-4-24 15:04:16 | 显示全部楼层
本帖最后由 tubaba 于 2017-4-24 15:09 编辑

回复 121# 131738


是不是说的代码标注行号?有点像```但我只是用来查错,没有其它用处

这个软件还不能处理双字节字符.外国人写的都不考虑这一点吧......
发表于 2017-4-24 16:00:38 | 显示全部楼层
回复 122# tubaba

它分 2 部分, 首先是代码扫描, 这部分能兼容中文字符串,
之后是代码混淆加密,这部分我一直用纯英文脚本测试, 都没有成功, 因此不知这部分是否兼容中文...
 楼主| 发表于 2017-4-24 17:51:23 | 显示全部楼层
本帖最后由 tubaba 于 2017-4-24 21:35 编辑

不再此贴谈此话题了,如果有兴趣我们可以私下聊.粗略看了一下,不支持中文是因为它使用asc函数,修改一下脚本,把所有asc换成ascw,把chr换成chrw应该可以正确还原
chr(asc('中文'))必定会产生乱码.使用chrw(ascw('中文')就不会了.

另外,此脚本查找字符串的方法是逐字载入,而我是采用正则匹配的方法判断字符串
$curchar=Asc(StringMid($linewithstrings,$rc,1)),有空好好学习一下,看看人家的思路.:)

刚刚没事看了一下脚本结构.有些地方不够严谨.比如下面这个函数,完全没有依据#include 的定义.没有考虑用户自定义库,没有考虑查找顺序.在很多系统库文件中,再一次包含的文件可能写法是 #include "XXXX.au3",根据定义,首先从此文件的所在的文件夹路径搜索.

搜索次序依赖于 AutoIt 使用 #include 的格式. 下面表格是两种使用 #include 形式时的搜寻次序.

使用 #include <>标准库 在解释程序(AUTOIT3.EXE)所在目录的 "\Include" 目录中搜索.
用户自定义库 在上述注册表中顺序搜索.
脚本目录 在当前执行脚本的目录中搜索.

使用 #include "" (与 #include <> 相反).脚本目录 在当前执行脚本的目录中搜索
用户自定义库 在上述注册表中反序搜索.
标准库 在解释程序(AUTOIT3.EXE)所在目录的 "\Include" 目录中搜索.
Func _AddInclude($curfile,$linecount,$line)
; assumes first string in line identifies the #include file
; accepted delimiters: double-quotes, single-quotes, or angled brackets (paired, not mixed)

        $include_index=-1
        $params="<n\a>"
        $pos1=StringInStr($line,'"',0,1)
        $pos2=StringInStr($line,'"',0,2)
        $pos3=StringInStr($line,"'",0,1)
        $pos4=StringInStr($line,"'",0,2)
        $pos5=StringInStr($line,"<",0,1)
        $pos6=StringInStr($line,">",0,1)

        Select
                case $pos1*$pos2>0 And $pos3*$pos4=0 and $pos5*$pos6=0
                        $newinclude=StringStripWS(StringMid($line,$pos1+1,$pos2-$pos1-1),3)
                        $bracketed=False
                Case $pos1*$pos2=0 And $pos3*$pos4>0 and $pos5*$pos6=0
                        $newinclude=StringStripWS(StringMid($line,$pos3+1,$pos4-$pos3-1),3)
                        $bracketed=False
                Case $pos1*$pos2=0 And $pos3*$pos4=0 and $pos5*$pos6>0
                        $newinclude=StringStripWS(StringMid($line,$pos5+1,$pos6-$pos5-1),3)
                        $bracketed=True
                Case Else
                        Return -1        ; some other format we currently cannot deal with?
        EndSelect
        
        If StringInStr($newinclude,"constants")=True Then
                If $includeConstants=False And $WriteMetaCode=False Then Return False
        EndIf

        ; extend path if need be
        $curpath=StringLeft($curfile,StringInStr($curfile,"",0,-1))
        $expanded=False

        If StringLeft($newinclude,2)="." Then
                $newinclude=$curpath & StringTrimLeft($newinclude,2)
                $expanded=True
        ElseIf StringLeft($newinclude,3)=".." Then
                $newinclude=StringLeft($curfile,StringInStr($curfile,"",0,-2)) & StringTrimLeft($newinclude,3)
                $expanded=True
        EndIf
        If $bracketed=True Then
                If FileExists($AutoItIncludeFolder & $newinclude) Then
                        $newinclude=$AutoItIncludeFolder & $newinclude
                Else
                        For $rc=1 To $extrapaths[0]
                                If FileExists($extrapaths[$rc] & $newinclude) Then
                                        $newinclude=$extrapaths[$rc] & $newinclude
                                        ExitLoop
                                EndIf
                        Next
                        If $rc>$extrapaths[0] Then        $newinclude= $curpath & $newinclude        ; add sourcecode's path and hope for the best
                EndIf

        ElseIf Not $expanded Then                                                        ; #include not angle-bracketed
                If FileExists($curpath & $newinclude) Then
                        $newinclude=$curpath        & $newinclude
                Else
                        For $rc=1 To $extrapaths[0]
                                If FileExists($extrapaths[$rc] & $newinclude) Then
                                        $newinclude=$extrapaths[$rc] & $newinclude
                                        ExitLoop
                                EndIf
                        Next

                        If $rc>$extrapaths[0] And FileExists($AutoItIncludeFolder & $newinclude) Then _
                                $newinclude=$AutoItIncludeFolder & $newinclude        ; add default autoit3\include path and hope for the best

                EndIf
        Endif

        ; add to list of includes if absent
        $okay=(FileExists($newinclude)=True)
        If $okay Then
                $include_index=_ArraySearch($includes,$newinclude,1)
                If $include_index<1 Then
                        _ArrayAdd($includes,$newinclude,0,ChrW(0))
                        $includes[0]=UBound($includes)-1
                        $include_index=$includes[0]

                        ; store separately if not in the default path
                        If StringInStr($newinclude,$AutoItIncludeFolder)=0 Then
                                _ArrayAdd($myincludes,$newinclude,0,ChrW(0))
                                $myincludes[0]=UBound($myincludes)-1
                        EndIf
                        If $diagnostics=True Then ConsoleWrite("New include added to list: " & $newinclude & " (nr " & $includes[0] & ")" & @CRLF)
                EndIf
        Else
                $newinclude=$line
                $params=$filenotfoundtag
                $include_notfound+=1
                If _ArraySearch($incl_notfound,$newinclude,1)<1 Then
                        _ArrayAdd($incl_notfound,$newinclude,0,ChrW(0))
                        $incl_notfound[0]=UBound($incl_notfound)-1
                        If $diagnostics=True Then ConsoleWrite("New lost include added to list: " & $newinclude & " (nr " & $incl_notfound[0] & ")" & @CRLF)
                EndIf

                If $diagnostics=True Then _
                        MsgBox(262144+8192+48,"Error","unable to find #include referenced in: " & @CRLF& @CRLF & _
                                                                "Source file: " & $curfile & @CRLF & _
                                                                "Line number: " & $linecount & @CRLF & @CRLF & _
                                                                "Content: " & @CRLF & $newinclude)
        EndIf

        ; keep track of where it is being referenced/defined
        _AddRef($okay,$curfile,$linecount,"#include",$newinclude,$params)
        Return $include_index

EndFunc
发表于 2017-4-24 18:28:24 | 显示全部楼层
回复 1# tubaba


    我又回来了,看看是不是取消了注册机制
发表于 2017-5-8 02:18:31 | 显示全部楼层
用了几次,觉得相当好用.
能否发个注册码?谢谢.
HTS721010A9E630JS10176200BMPYJB0OBFEBFBFF000306A9
 楼主| 发表于 2017-5-8 06:59:06 | 显示全部楼层
回复 126# Alam


    T44B4-96YYG-4F2GY-RCPGJ-V9383
发表于 2017-5-8 15:14:19 | 显示全部楼层
回复 127# tubaba


    收到.已成功注册.再次说声谢谢.
发表于 2017-5-14 05:59:17 | 显示全部楼层
回复 127# tubaba


    反馈个小问题.
操作过的文件,有作记录.
但如果,此文件的路径存在空格,则在重启工具后,无法加载该文件,提示文件不存在.
发表于 2017-5-15 00:25:24 | 显示全部楼层
回复 127# tubaba


    重装系统后,提示注册,输入原来的注册表注册失效~
重新申请一个注册码
SAMSUNG MZVLV256S27WNXAH2090475L0QBFEBFBFF000406E3
发表于 2017-5-15 01:51:06 | 显示全部楼层
已经下载
机器码: WDC WD5000AADS-00S9B0WD-WCAV9604023401.00A01BFEBFBFF0001067A
 楼主| 发表于 2017-5-16 19:57:43 | 显示全部楼层
回复 129# Alam


    测试了一下,似乎没发现你反映的问题.请把你的路径贴上来看看.或者把配置文件的内容贴上.即au3encode.ini



回复 130# austere


    PHDTB-FVWMK-3VWW2-X8CBF-T7VRF

回复 131# xzf680

BBBBR-DQVQ7-CWWX8-F7XQT-Q7H8K
发表于 2017-6-9 21:10:56 | 显示全部楼层
D:\0name\BMAsst\test.au3|D:\0name\BMAsst\BMAsst6.80.au3|D:\0name\BMAsst\12 - 副本.au3|D:\0name\BMAsst\- 副本.au3|D:\0name\BMAsst\- 副本.au3
后面的两个"-副本",其实都是前面的"12 -副本".
就是WIN7下按CTRL拉鼠标复制出来的副本,文件名带了空格.工具里再次选择时就自动截取了空格后面的字符了.
之前反映时,路径是"D:\0 name\BMAsst\" ,也是这样,后来改成了现在的"D:\0name\BMAsst\"
发表于 2017-6-9 22:00:52 | 显示全部楼层
本帖最后由 Alam 于 2017-6-10 07:02 编辑

另外,反馈下,似乎在处理内置函数的参数加密上有问题?
我处理一脚本,(采用字符串加密,不加密无错)老是提示"数组下标错误",经数次反复简化,终于确定是处理"_WinAPI_GetProcessCommandLine"这一函数时,出的问题.
有空也请测试下.
发表于 2017-6-9 22:13:38 | 显示全部楼层
本帖最后由 Alam 于 2017-6-10 07:12 编辑

已确定是测试代码22行出的问题.
很遗憾,没有字符串排除选项.
Local $tPEB = DllStructCreate('byte InheritedAddressSpace;byte ReadImageFileExecOptions;byte BeingDebugged;byte Spare;ptr Mutant;ptr ImageBaseAddress;ptr LoaderData;ptr ProcessParameters;ptr SubSystemData;ptr ProcessHeap;ptr FastPebLock;ptr FastPebLockRoutine;ptr FastPebUnlockRoutine;ulong EnvironmentUpdateCount;ptr KernelCallbackTable;ptr EventLogSection;ptr EventLog;ptr FreeList;ulong TlsExpansionCounter;ptr TlsBitmap;ulong TlsBitmapBits[2];ptr ReadOnlySharedMemoryBase;ptr ReadOnlySharedMemoryHeap;ptr ReadOnlyStaticServerData;ptr AnsiCodePageData;ptr OemCodePageData;ptr UnicodeCaseTableData;ulong NumberOfProcessors;ulong NtGlobalFlag;byte Spare2[4];int64 CriticalSectionTimeout;ulong HeapSegmentReserve;ulong HeapSegmentCommit;ulong HeapDeCommitTotalFreeThreshold;ulong HeapDeCommitFreeBlockThreshold;ulong NumberOfHeaps;ulong MaximumNumberOfHeaps;ptr ProcessHeaps;ptr GdiSharedHandleTable;ptr ProcessStarterHelper;ptr GdiDCAttributeList;ptr LoaderLock;ulong OSMajorVersion;ulong OSMinorVersion;ulong OSBuildNumber;ulong OSPlatformId;ulong ImageSubSystem;ulong ImageSubSystemMajorVersion;ulong ImageSubSystemMinorVersion;ulong GdiHandleBuffer[34];ulong PostProcessInitRoutine;ulong TlsExpansionBitmap;byte TlsExpansionBitmapBits[128];ulong SessionId')

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-3-29 18:13 , Processed in 0.075008 second(s), 15 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表