谁能反编译我的脚本
本帖最后由 tryhi 于 2013-3-10 18:00 编辑之前写的,现在硬盘烧掉了,数据都丢失,求帮忙反编译。(注:从图标、版权可以看出本楼主写的,不是要反他人作品)
反编译之后的源码可公布,关系不大,只是帮女朋友写的小工具,现在想做修改 应该是这样的,哈,本来想测试下有没有迷惑,来测试前些日子无聊写的反迷惑呢,结查大失所望呀,居然没有!
不过,也测试了下把Include包入的所有变量和函数,还原为#include形式,效果还不错,至少不用手工动一下,反出来的直接就可以运行。
#region
#AutoIt3Wrapper_icon=hai.ico
#AutoIt3Wrapper_Res_Comment=tryhi
#AutoIt3Wrapper_Res_Description=www.autobatch.org
#AutoIt3Wrapper_Res_Fileversion=2.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=大海
#AutoIt3Wrapper_Res_Field=CompanyName|余秋海
#endregion
#include <GUIConstantsEx.au3>
#include <Array.au3>
#region ### START Koda GUI section ### Form=
$FORM1_1 = GUICreate("数据统计 我爱洁儿2.0", 0x000001A1, 0x0000026D, 0x00000150, 0x00000007)
$EDIT1 = GUICtrlCreateEdit("", 0x0000000C, 0x0000000C, 0x0000018F, 0x0000022C)
GUICtrlSetData(-0x00000001, "")
$BUTTONT = GUICtrlCreateButton("统一格式", 0x0000000D, 0x00000243, 0x0000004B, 0x00000019)
$BUTTONP = GUICtrlCreateButton("排序", 0x00000061, 0x00000243, 0x0000004B, 0x00000019)
$BUTTOND = GUICtrlCreateButton("单位转换", 0x000000B6, 0x00000243, 0x0000004B, 0x00000019)
$BUTTONF = GUICtrlCreateButton("分类汇总", 0x0000010A, 0x00000243, 0x0000004B, 0x00000019)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 0x00000001
$NMSG = GUIGetMsg()
Switch $NMSG
Case $GUI_EVENT_CLOSE
Exit
Case $BUTTONT
HUISE()
$A = GUICtrlRead($EDIT1)
$A = StringReplace($A, "-", " ")
$A = StringRegExpReplace($A, "(?m)^([^ ]+)(22)", "\1 \2 ")
$A = StringRegExpReplace($A, "(?m)^([^ ]+[\x41-\x80])(\d.+? )", "\1 \2")
$A = StringRegExpReplace($A, "(?m)^\s+", "")
$A = StringRegExpReplace($A, "( +)(?= )", "")
$A = StringRegExpReplace($A, "(?<= )( +)", "")
$A = StringRegExpReplace($A, " +", " ")
$A = StringUpper($A)
$ARRAY = StringRegExp($A, "\V+", 0x00000003)
For $I = 0x00000000 To UBound($ARRAY) - 0x00000002
For $J = $I + 0x00000001 To UBound($ARRAY) - 0x00000001
$TEMS = StringSplit($ARRAY[$I], " ")
$TEMS2 = StringSplit($ARRAY[$J], " ")
$XINI = StringReplace($TEMS, " ", "")
$XINJ = StringReplace($TEMS2, " ", "")
If $XINI = $XINJ Then
If StringLen($TEMS) > StringLen($TEMS2) Then
$ARRAY[$J] = StringReplace($ARRAY[$J], $TEMS2, $TEMS)
ElseIf StringLen($TEMS) < StringLen($TEMS2) Then
$ARRAY[$I] = StringReplace($ARRAY[$I], $TEMS, $TEMS2)
EndIf
EndIf
Next
Next
For $I = 0x00000000 To UBound($ARRAY) - 0x00000002
For $J = $I + 0x00000001 To UBound($ARRAY) - 0x00000001
$TEMS = StringRegExp($ARRAY[$I], "^([^ ]+) \S+ ", 0x00000003)
If @error Then ContinueLoop
$TEMS2 = StringRegExp($ARRAY[$J], "^([^ ]+) \S+ ", 0x00000003)
If @error Then ContinueLoop
$XINI = StringReplace($TEMS, " ", "")
$XINJ = StringReplace($TEMS2, " ", "")
If $XINI = $XINJ Then
If StringLen($TEMS) > StringLen($TEMS2) Then
$ARRAY[$J] = StringReplace($ARRAY[$J], $TEMS2, $TEMS)
ElseIf StringLen($TEMS) < StringLen($TEMS2) Then
$ARRAY[$I] = StringReplace($ARRAY[$I], $TEMS, $TEMS2)
EndIf
EndIf
Next
Next
$A = ""
For $I = 0x00000000 To UBound($ARRAY) - 0x00000001
$A &= $ARRAY[$I] & @CRLF
Next
GUICtrlSetData($EDIT1, $A)
BAISE()
MsgBox(0x00000000, "完成", "统一格式完成")
Case $BUTTONP
HUISE()
$A = GUICtrlRead($EDIT1)
$ARRAY = StringRegExp($A, "\V+", 0x00000003)
_ARRAYSORTS($ARRAY)
$A = ""
For $I = 0x00000000 To UBound($ARRAY) - 0x00000001
$A &= $ARRAY[$I] & @CRLF
Next
GUICtrlSetData($EDIT1, $A)
BAISE()
MsgBox(0x00000000, "完成", "排序完成")
Case $BUTTOND
HUISE()
$A = GUICtrlRead($EDIT1)
$ARRAY = StringRegExp($A, "\V+", 0x00000003)
Global $ARRAY2
For $I = 0x00000000 To UBound($ARRAY) - 0x00000001
$TEM = StringSplit($ARRAY[$I], " ")
For $J = 0x00000000 To 0x00000003
$ARRAY2[$I][$J] = $TEM[$J + 0x00000001]
Next
Switch $ARRAY2[$I]
Case "千米"
$ARRAY2[$I] = "米"
$ARRAY2[$I] = Number($ARRAY2[$I]) * 0x000003E8
Case "扎"
$ARRAY2[$I] = "米"
$ARRAY2[$I] = Number($ARRAY2[$I]) * 0x00000064
Case "箱"
$ARRAY2[$I] = "米"
$ARRAY2[$I] = Number($ARRAY2[$I]) * 0x0000016D
Case "米"
Case Else
MsgBox(0x00000000, "有问题", "存在部分单位无法识别:" & $ARRAY2[$I], 0x00000001)
EndSwitch
Next
For $K = 0x00000000 To UBound($ARRAY) - 0x00000001
$SPLIT = StringSplit($ARRAY2[$K], " ")
$ISNUM = StringRegExp($SPLIT[$SPLIT], "^[\d.]+$")
If $ISNUM Then
If Number($SPLIT[$SPLIT]) <= 0x00000023 Then
$ARRAY2[$K] = "扎"
$ARRAY2[$K] /= 0x00000064
EndIf
EndIf
Next
$A = ""
For $I = 0x00000000 To UBound($ARRAY) - 0x00000001
For $J = 0x00000000 To 0x00000003
$A &= $ARRAY2[$I][$J] & " "
Next
$A &= @CRLF
Next
GUICtrlSetData($EDIT1, $A)
BAISE()
MsgBox(0x00000000, "完成", "单位转换完成")
Case $BUTTONF
Global $HUIZONG
$TM = 0x00000000
For $I = 0x00000000 To UBound($ARRAY2) - 0x00000001
If $ARRAY2[$I] = $HUIZONG[$TM] Then
$HUIZONG[$TM] += $ARRAY2[$I]
$HUIZONG[$TM] += $ARRAY2[$I]
Else
ReDim $HUIZONG
$TM += 0x00000001
For $II = 0x00000000 To 0x00000003
$HUIZONG[$TM][$II] = $ARRAY2[$I][$II]
Next
EndIf
Next
$A = ""
For $I = 0x00000001 To UBound($HUIZONG) - 0x00000001
For $J = 0x00000000 To 0x00000003
$A &= $HUIZONG[$I][$J] & " "
Next
$A &= @CRLF
Next
GUICtrlSetData($EDIT1, $A)
EndSwitch
WEnd
Func _ARRAYSORTS(ByRef $ARRAY)
For $I = 0x00000000 To UBound($ARRAY) - 0x00000002
For $J = $I + 0x00000001 To UBound($ARRAY) - 0x00000001
$FENI = StringRegExp($ARRAY[$I], "[^\d\.]+|[\d\.]+", 0x00000003)
$FENJ = StringRegExp($ARRAY[$J], "[^\d\.]+|[\d\.]+", 0x00000003)
$FEN = UBound($FENI)
If UBound($FENI) < UBound($FENJ) Then $FEN = UBound($FENJ)
For $K = 0x00000000 To $FEN - 0x00000001
If $K > UBound($FENJ) - 0x00000001 Then
JIAOHUAN($ARRAY[$I], $ARRAY[$J])
ExitLoop
ElseIf $K > UBound($FENI) - 0x00000001 Then
ExitLoop
EndIf
If StringRegExp($FENI[$K], "[^\d\.]+") Then
If StringRegExp($FENJ[$K], "[\d\.]+") Then
JIAOHUAN($ARRAY[$I], $ARRAY[$J])
ExitLoop
Else
If StringCompare($FENI[$K], $FENJ[$K]) = 0x00000001 Then
JIAOHUAN($ARRAY[$I], $ARRAY[$J])
ExitLoop
Else
If StringCompare($FENI[$K], $FENJ[$K]) = 0x00000000 Then ContinueLoop
EndIf
ExitLoop
EndIf
Else
$ISNUM = StringRegExp($FENJ[$K], "[\d\.]+")
If $ISNUM And (Number($FENI[$K]) > Number($FENJ[$K])) Then
JIAOHUAN($ARRAY[$I], $ARRAY[$J])
ExitLoop
Else
If $ISNUM And (Number($FENI[$K]) = Number($FENJ[$K])) Then ContinueLoop
EndIf
ExitLoop
EndIf
Next
Next
Next
EndFunc ;==>_ARRAYSORTS
Func JIAOHUAN(ByRef $A, ByRef $B)
Local $TEMP
$TEMP = $A
$A = $B
$B = $TEMP
EndFunc ;==>JIAOHUAN
Func BAISE()
GUICtrlSetState($BUTTOND, 0x00000040)
GUICtrlSetState($BUTTONF, 0x00000040)
GUICtrlSetState($BUTTONP, 0x00000040)
GUICtrlSetState($BUTTONT, 0x00000040)
EndFunc ;==>BAISE
Func HUISE()
GUICtrlSetState($BUTTOND, 0x00000080)
GUICtrlSetState($BUTTONF, 0x00000080)
GUICtrlSetState($BUTTONP, 0x00000080)
GUICtrlSetState($BUTTONT, 0x00000080)
EndFunc ;==>HUISE
本帖最后由 kevinch 于 2013-3-10 18:38 编辑
没有版权问题,就帮你一下
#Region
#AutoIt3Wrapper_Icon=hai.ico
#AutoIt3Wrapper_Res_Comment=tryhi
#AutoIt3Wrapper_Res_Description=www.autobatch.org
#AutoIt3Wrapper_Res_FileVersion=2.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=??
#AutoIt3Wrapper_Res_Field=CompanyName|???
#EndRegion
#include <array.au3>
#Region ### START Koda GUI section ### Form=
$FORM1_1 = GUICreate("?誹?? и?稀?2.0", 417, 621, 336, 7)
$EDIT1 = GUICtrlCreateEdit("", 12, 12, 399, 556)
GUICtrlSetData(-1, "")
$BUTTONT = GUICtrlCreateButton("???Α", 13, 579, 75, 25)
$BUTTONP = GUICtrlCreateButton("逼?", 97, 579, 75, 25)
$BUTTOND = GUICtrlCreateButton("????", 182, 579, 75, 25)
$BUTTONF = GUICtrlCreateButton("だ???", 266, 579, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$NMSG = GUIGetMsg()
Switch $NMSG
Case $GUI_EVENT_CLOSE
Exit
Case $BUTTONT
HUISE()
$A = GUICtrlRead($EDIT1)
$A = StringReplace($A, "-", " ")
$A = StringRegExpReplace($A, "(?m)^([^ ]+)(22)", "\1 \2 ")
$A = StringRegExpReplace($A, "(?m)^([^ ]+[\x41-\x80])(\d.+? )", "\1 \2")
$A = StringRegExpReplace($A, "(?m)^\s+", "")
$A = StringRegExpReplace($A, "( +)(?= )", "")
$A = StringRegExpReplace($A, "(?<= )( +)", "")
$A = StringRegExpReplace($A, " +", " ")
$A = StringUpper($A)
$ARRAY = StringRegExp($A, "\V+", 3)
For $I = 0 To UBound($ARRAY) - 2
For $J = $I + 1 To UBound($ARRAY) - 1
$TEMS = StringSplit($ARRAY[$I], " ")
$TEMS2 = StringSplit($ARRAY[$J], " ")
$XINI = StringReplace($TEMS, " ", "")
$XINJ = StringReplace($TEMS2, " ", "")
If $XINI = $XINJ Then
If StringLen($TEMS) > StringLen($TEMS2) Then
$ARRAY[$J] = StringReplace($ARRAY[$J], $TEMS2, $TEMS)
ElseIf StringLen($TEMS) < StringLen($TEMS2) Then
$ARRAY[$I] = StringReplace($ARRAY[$I], $TEMS, $TEMS2)
EndIf
EndIf
Next
Next
For $I = 0 To UBound($ARRAY) - 2
For $J = $I + 1 To UBound($ARRAY) - 1
$TEMS = StringRegExp($ARRAY[$I], "^([^ ]+) \S+ ", 3)
If @error Then ContinueLoop
$TEMS2 = StringRegExp($ARRAY[$J], "^([^ ]+) \S+ ", 3)
If @error Then ContinueLoop
$XINI = StringReplace($TEMS, " ", "")
$XINJ = StringReplace($TEMS2, " ", "")
If $XINI = $XINJ Then
If StringLen($TEMS) > StringLen($TEMS2) Then
$ARRAY[$J] = StringReplace($ARRAY[$J], $TEMS2, $TEMS)
ElseIf StringLen($TEMS) < StringLen($TEMS2) Then
$ARRAY[$I] = StringReplace($ARRAY[$I], $TEMS, $TEMS2)
EndIf
EndIf
Next
Next
$A = ""
For $I = 0 To UBound($ARRAY) - 1
$A &= $ARRAY[$I] & @CRLF
Next
GUICtrlSetData($EDIT1, $A)
BAISE()
MsgBox(0, "ЧΘ", "???ΑЧΘ")
Case $BUTTONP
HUISE()
$A = GUICtrlRead($EDIT1)
$ARRAY = StringRegExp($A, "\V+", 3)
_ARRAYSORTS($ARRAY)
$A = ""
For $I = 0 To UBound($ARRAY) - 1
$A &= $ARRAY[$I] & @CRLF
Next
GUICtrlSetData($EDIT1, $A)
BAISE()
MsgBox(0, "ЧΘ", "逼?ЧΘ")
Case $BUTTOND
HUISE()
$A = GUICtrlRead($EDIT1)
$ARRAY = StringRegExp($A, "\V+", 3)
Global $ARRAY2
For $I = 0 To UBound($ARRAY) - 1
$TEM = StringSplit($ARRAY[$I], " ")
For $J = 0 To 3
$ARRAY2[$I][$J] = $TEM[$J + 1]
Next
Switch $ARRAY2[$I]
Case "?μ"
$ARRAY2[$I] = "μ"
$ARRAY2[$I] = Number($ARRAY2[$I]) * 1000
Case "ゃ"
$ARRAY2[$I] = "μ"
$ARRAY2[$I] = Number($ARRAY2[$I]) * 100
Case "絚"
$ARRAY2[$I] = "μ"
$ARRAY2[$I] = Number($ARRAY2[$I]) * 365
Case "μ"
Case Else
MsgBox(0, "Τ??", "??场だ???猭???" & $ARRAY2[$I], 1)
EndSwitch
Next
For $K = 0 To UBound($ARRAY) - 1
$SPLIT = StringSplit($ARRAY2[$K], " ")
$ISNUM = StringRegExp($SPLIT[$SPLIT], "^[\d.]+$")
If $ISNUM Then
If Number($SPLIT[$SPLIT]) <= 35 Then
$ARRAY2[$K] = "ゃ"
$ARRAY2[$K] /= 100
EndIf
EndIf
Next
$A = ""
For $I = 0 To UBound($ARRAY) - 1
For $J = 0 To 3
$A &= $ARRAY2[$I][$J] & " "
Next
$A &= @CRLF
Next
GUICtrlSetData($EDIT1, $A)
BAISE()
MsgBox(0, "ЧΘ", "????ЧΘ")
Case $BUTTONF
Global $HUIZONG
$TM = 0
For $I = 0 To UBound($ARRAY2) - 1
If $ARRAY2[$I] = $HUIZONG[$TM] Then
$HUIZONG[$TM] += $ARRAY2[$I]
$HUIZONG[$TM] += $ARRAY2[$I]
Else
ReDim $HUIZONG
$TM += 1
For $II = 0 To 3
$HUIZONG[$TM][$II] = $ARRAY2[$I][$II]
Next
EndIf
Next
$A = ""
For $I = 1 To UBound($HUIZONG) - 1
For $J = 0 To 3
$A &= $HUIZONG[$I][$J] & " "
Next
$A &= @CRLF
Next
GUICtrlSetData($EDIT1, $A)
EndSwitch
WEnd
Func _ARRAYSORTS(ByRef $ARRAY)
For $I = 0 To UBound($ARRAY) - 2
For $J = $I + 1 To UBound($ARRAY) - 1
$FENI = StringRegExp($ARRAY[$I], "[^\d\.]+|[\d\.]+", 3)
$FENJ = StringRegExp($ARRAY[$J], "[^\d\.]+|[\d\.]+", 3)
$FEN = UBound($FENI)
If UBound($FENI) < UBound($FENJ) Then $FEN = UBound($FENJ)
For $K = 0 To $FEN - 1
If $K > UBound($FENJ) - 1 Then
JIAOHUAN($ARRAY[$I], $ARRAY[$J])
ExitLoop
ElseIf $K > UBound($FENI) - 1 Then
ExitLoop
EndIf
If StringRegExp($FENI[$K], "[^\d\.]+") Then
If StringRegExp($FENJ[$K], "[\d\.]+") Then
JIAOHUAN($ARRAY[$I], $ARRAY[$J])
ExitLoop
Else
If StringCompare($FENI[$K], $FENJ[$K]) = 1 Then
JIAOHUAN($ARRAY[$I], $ARRAY[$J])
ExitLoop
Else
If StringCompare($FENI[$K], $FENJ[$K]) = 0 Then ContinueLoop
EndIf
ExitLoop
EndIf
Else
$ISNUM = StringRegExp($FENJ[$K], "[\d\.]+")
If $ISNUM And (Number($FENI[$K]) > Number($FENJ[$K])) Then
JIAOHUAN($ARRAY[$I], $ARRAY[$J])
ExitLoop
Else
If $ISNUM And (Number($FENI[$K]) = Number($FENJ[$K])) Then ContinueLoop
EndIf
ExitLoop
EndIf
Next
Next
Next
EndFunc ;==>_ARRAYSORTS
Func JIAOHUAN(ByRef $A, ByRef $B)
Local $TEMP
$TEMP = $A
$A = $B
$B = $TEMP
EndFunc ;==>JIAOHUAN
Func BAISE()
GUICtrlSetState($BUTTOND, 64)
GUICtrlSetState($BUTTONF, 64)
GUICtrlSetState($BUTTONP, 64)
GUICtrlSetState($BUTTONT, 64)
EndFunc ;==>BAISE
Func HUISE()
GUICtrlSetState($BUTTOND, 128)
GUICtrlSetState($BUTTONF, 128)
GUICtrlSetState($BUTTONP, 128)
GUICtrlSetState($BUTTONT, 128)
EndFunc ;==>HUISE
繁体系统,乱码了,不过文本应该不是问题,是你的,你能想起来哈 回复 3# kevinch
这个是手动出来的吗? 二楼是用工具'自动化'出来的。 本帖最后由 yinbinly 于 2013-3-10 19:37 编辑
楼上厉害 ,膜拜 楼主发钱的时候,顺便 赏我点{:face (356):} 二楼厉害! 厉害哦。都自己写工具了。 以上均为高手....... 以上均为牛XX人物 一山还有一山高,膜拜了,希望把反的工具共享一下,我自己也有几个程序被女儿乱搞电脑的时删掉了源码,想反出来。。{:face (52):} 对呀,把工具共享一下。{:face (356):} 太厲害了,我想知道是怎麼反編譯的。 ... 测试了下把Include包入的所有变量和函数,还原为#include形式,效果还不错 ...
happytc 发表于 2013-3-10 17:54 http://www.autoitx.com/images/common/back.gif
虽然想法不错,但这样做利大于弊。因为你无法获知源程序中的 Include 文件是否和你电脑里的同名文件内容一致。因为 Udf 文件可能因版本不同而内容有异、或被自行修改过。如果替换为载入自己的 Include 内文件,则无法保证不出问题。
如果是为了便于阅读,大可将那些内容转移到一个新建文件再 Include 之。
页:
[1]
2