#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=.Icon.ico #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Res_Description=TeamMC UVNC-Helper QQD #AutoIt3Wrapper_Res_Fileversion=1.0.0.1 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Res_Language=1033 #AutoIt3Wrapper_Res_requestedExecutionLevel=highestAvailable #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/striponly #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #Include Global $URL="http://teammc.cc/uvnc/?s=embed" Global $TITLE="UVNC-Helper QQD" Global $FOUNDEMBEDDATA=0 Global Const $GUI_EVENT_CLOSE = -3 ;====Proccess Embed Data=============================================================== $file_hand=FileOpen(@ScriptFullPath,16) $file=FileRead($file_hand) FileClose($file_hand) $file_data=BinaryMid($file,BinaryLen($file)-1000+1,1000) $file_data=BinaryToString($file_data) If StringLeft($file_data,11)="TEAMMCDATA|" Then ;_cfl("Getting Embed Data") $file_data=StringSplit($file_data,"|") If $file_data[2]<>"" Then $URL=$file_data[2] $FOUNDEMBEDDATA=1 Else embed() Exit EndIf ;======================================================================================= If InetGet($URL,@TempDir&"\UVNC-Helper.exe",1)=0 Then MsgBox(0,$TITLE,"Error retrieving application") Else If _VersionCompare(FileGetVersion(@TempDir&"\UVNC-Helper.exe"),"2.9.0.0")>=0 Then If FileGetVersion(@TempDir&"\UVNC-Helper.exe","FileDescription")="TeamMC UVNC-Helper" Then Run(""""&@TempDir&"\UVNC-Helper.exe"" -connect") Else MsgBox(0,$TITLE,"Error: Not UVNC-Helper") EndIf Else MsgBox(0,$TITLE,"Error: Incompatable Version Of UVNC-Helper") EndIf EndIf Func embed() ;_cfl("Function - embed") Local $Form1 = GUICreate($TITLE, 420, 317,-1,-1) Local $Button1 = GUICtrlCreateButton("Save", 255, 288, 75, 25, 0) Local $Button2 = GUICtrlCreateButton("Cancel", 335, 288, 75, 25, 0) Local $Group1 = GUICtrlCreateGroup("Embed Data", 4, 4, 485, 281) Local $Label0 = GUICtrlCreateLabel("This will edit the embed data of the executable. (Leave blank for defaut.)", 12, 20, 472, 40) Local $Label1 = GUICtrlCreateLabel("Full URL", 5, 64, 90, 21,2) Local $Input1 = GUICtrlCreateInput($URL, 104, 60, 300, 21) GUICtrlSetTip (-1,"Host to connect to, default is blank") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) ;===============GUI Loop========================================================== Local $file_hand, $file_data, $save_retun, $new_embed_data While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $Button2 GUIDelete() Return 0 Case $Button1 GUISetState(@SW_HIDE) $new_embed_data="TEAMMCDATA|"&GUICtrlRead($Input1) $file_hand=FileOpen(@AutoItExe,16) $file_data=FileRead($file_hand) FileClose($file_hand) If $FOUNDEMBEDDATA=1 Then $file_data=BinaryMid($file_data,1,BinaryLen($file_data)-1000+1) $new_embed_data=StringToBinary($new_embed_data) While BinaryLen($new_embed_data)<1000 $new_embed_data &= StringToBinary("|") WEnd $new_file_name=StringLeft(@ScriptName,StringInStr(@ScriptName,".",0,-1)-1)&"_NEW.exe" $new_file_full=FileSaveDialog ($TITLE,@ScriptDir,"Executable files (*.exe)",16+2,$new_file_name) If @error Then GUISetState(@SW_SHOW) ContinueLoop EndIf $file_hand=FileOpen($new_file_full,2+16) $save_return=FileWrite($file_hand,$file_data&$new_embed_data) FileClose($file_hand) If $save_return=0 Then If MsgBox(5+48,$TITLE,"File could not be saved")=4 Then GUISetState(@SW_SHOW) ContinueLoop Else GUIDelete() Return 0 EndIf Else MsgBox(0,$TITLE,"File was saved successfully") EndIf GUIDelete() Return 1 EndSwitch Sleep(10) WEnd EndFunc