#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#include <String.au3>
#include <IE.au3>
#include <GuiListView.au3>
#include <array.au3>
#region ### START Koda GUI section ### Form=D:\HOC TAP\AutoIT\koda_1.7.3.0\Forms\Xtrap.kxf
$Form1_1 = GUICreate("Sửa lỗi Xtrap", 235, 262, 274, 148)
GUISetFont(11, 400, 0, "Times New Roman")
GUISetBkColor(0x839153)
$Radio1 = GUICtrlCreateRadio("XTrap 200.219.207.213", 40, 16, 160, 17)
$Radio2 = GUICtrlCreateRadio("XTrap 46.150.44.233", 40, 40, 160, 17)
$Radio3 = GUICtrlCreateRadio("XTrap 146.185.22.222", 40, 64, 160, 17)
$Label1 = GUICtrlCreateLabel("Đang kiểm tra xtrap", 16, 88, 204, 29, BitOR($SS_CENTER, $SS_CENTERIMAGE))
$Button1 = GUICtrlCreateButton("Sửa lỗi Xtrap", 48, 152, 137, 33)
$Label2 = GUICtrlCreateLabel("Copyringh@ [email protected]", 16, 232, 205, 21)
$Button2 = GUICtrlCreateButton("Update", 72, 120, 91, 25)
$Button3 = GUICtrlCreateButton("Chạy Cabalmain.exe", 48, 192, 137, 33)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
TrayTip("Fix XTrap - Thông báo : ","Hãy chép file này vào folder Xtrap của Cabal rồi mới sử dụng", 1)
$Check = BinaryToString(InetRead("http://dl.dropbox.com/u/79293608/Xtrap.txt", 1), 4)
Global $Update = _StringBetween($Check, '<Update>', '</Update>')
Global $Update_1 = _StringBetween($Check, '<Update_1>', '</Update_1>')
Global $Host = _StringBetween($Check, '<Luachon>', '</Luachon>')
Global $Link_1 = _StringBetween($Check, '<1>', '</1>')
Global $Link_2 = _StringBetween($Check, '<2>', '</2>')
Global $Link_3 = _StringBetween($Check, '<3>', '</3>')
;~ MsgBox(0,"",$Host[0])
If $Host[0] = "200.219.207.213" Then
GUICtrlSetState($Radio1, 1)
GUICtrlSetData($Label1, "Đã tự lựa chọn cách 1")
Global $Link = $Link_1[0]
TrayTip("Fix XTrap - Thông báo : ", "Nhấn vào nút Sửa lỗi Xtrap để sừa file host" &@CRLF &"Nếu xtrap update chậm thì thoát hoàn toàn rồi click vào Update ở trên", 1)
Else
If $Host[0] = "46.150.44.233" Then
GUICtrlSetState($Radio2, 1)
GUICtrlSetData($Label1, "Đã tự lựa chọn cách 2")
Global $Link = $Link_2[0]
TrayTip("Fix XTrap - Thông báo : ", "Nhấn vào nút Sửa lỗi Xtrap để sừa file host" &@CRLF &"Nếu xtrap update chậm thì thoát hoàn toàn rồi click vào Update ở trên", 1)
Else
If $Host[0] = "146.185.22.222" Then
GUICtrlSetState($Radio1, 1)
GUICtrlSetData($Label1, "Đã tự lựa chọn cách 3")
Global $Link = $Link_3[0]
TrayTip("Fix XTrap - Thông báo : ", "Nhấn vào nút Sửa lỗi Xtrap để sừa file host" &@CRLF &"Nếu xtrap update chậm thì thoát hoàn toàn rồi click vào Update ở trên", 1)
EndIf
EndIf
EndIf
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Xtrap()
Case $Button2
_Update()
Case $Button3
_RunCabal()
EndSwitch
WEnd
Func _Update()
IF $Update[0] ="Yes" Then
ShellExecute($Update_1[0])
TrayTip("Fix XTrap - Thông báo : ", "Vui lòng đọc thông báo và sử dụng phiên bản mới để sửa lỗi Xtrap", 3)
Else
TrayTip("Fix XTrap - Thông báo : ", "Hãy thoát hoàn toàn khỏi cabal trước khi sử dụng", 1)
TrayTip("Fix XTrap - Thông báo : ", "Chương trình đang tự động download xtrap mới nhất về", 1)
InetGet($Link, @ScriptDir & "\Update_Xtrap.exe")
Run(@ScriptDir & "\Update_Xtrap.exe")
TrayTip("Fix XTrap - Thông báo : ", "Đã cài xong Xtrap, nhấn nút Sửa lỗi Xtrap để hoàn tất", 1)
EndIf
EndFunc ;==>_Update
Func _RunCabal()
Global $Dic_Cabal = StringTrimRight(@ScriptDir,6)
FileInstall("F:\Games\Hack cabal\FixXtrap\cabalmain.bat", $Dic_Cabal & "\start_cabalmain.bat", 1)
ShellExecute("start_cabalmain.bat", "", $Dic_Cabal, "open")
TrayTip("Thông báo Fix Xtrap", "Đã chạy cabalmain.exe", 2)
EndFunc ;==>_RunCabal
Func _Xtrap()
If GUICtrlRead($Radio2) = 1 Then
FileInstall("F:\Games\Hack cabal\FixXtrap\46.150.44.233.bat", @TempDir & "\fix_a.bat", 1)
Run(@TempDir & "\fix_a.bat")
Sleep(1000)
FileDelete(@TempDir & "\fix_a.bat")
TrayTip("Thông báo Fix Xtrap", "Đã đổi xtrap về 46.150.44.233 xtrap.cabalonline.com.br", 2)
EndIf
If GUICtrlRead($Radio3) = 1 Then
FileInstall("F:\Games\Hack cabal\FixXtrap\146.185.22.222.bat", @TempDir & "\fix_b.bat", 1)
Run(@TempDir & "\fix_b.bat")
Sleep(1000)
FileDelete(@TempDir & "\fix_b.bat")
TrayTip("Thông báo Fix Xtrap", "Đã đổi xtrap về 146.185.22.222 xtrap.cabalonline.com.br", 2)
EndIf
If GUICtrlRead($Radio1) = 1 Then
FileInstall("F:\Games\Hack cabal\FixXtrap\200.219.207.213.bat", @TempDir & "\fix_c.bat", 1)
Run(@TempDir & "\fix_c.bat")
Sleep(1000)
FileDelete(@TempDir & "\fix_c.bat")
TrayTip("Thông báo Fix Xtrap", "Đã đổi xtrap về 200.219.207.213 xtrap.cabalonline.com.br", 2)
EndIf
EndFunc ;==>_Xtrap