Register for your free account! | Forgot your password?

You last visited: Today at 15:14

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[AutoIT]Simple Patcher Quick and Dirty

Discussion on [AutoIT]Simple Patcher Quick and Dirty within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
TheRzR's Avatar
 
elite*gold: 4
Join Date: Apr 2009
Posts: 1,524
Received Thanks: 603
Cool [AutoIT]Simple Patcher Quick and Dirty

HeyHo,

schon wieder ein Patcher? Gibt es nicht schon genung davon? Warum schon wieder einer?

Ganz einfach: Ich wollte einen Patcher erstellen der nicht mit Grafiken und .NET Orgien nur so überschüttet ist und weil ich lust und laune dran hatte

Er hat knapp 100 Zeilen, prüft die Dateien mit MD5 Hashes und ladet sie dann mit Anzeige runter. Zudem kann er auch deine News anzeigen und das alles in einer sehr simplen INI Datei.

Zudem stelle ich euch den Source code zur verfügung da ich denke das sich niemand mehr die Mühe machen sollte und das Rad neu erfinden muss. Wir sind eine Community und statt alles zu kommerziellisieren sollten wir teilen, weils dann eh wieder ein paar sehr besondere Menschen gibt die dann wieder daraus Profit machen wollen und es zu den "Zwangs-Release-Ich-Will-Aufmerksamkeit-und-den-anderen-schlecht-machen"

Mir ist es latte wie hose ob ihr mich darin erwähnt oder nicht. Ich habe es aus Spaß gemacht

Dazu gibt es auch ein mini Tool was die MD5 Summen erstellt und ihr diese nur noch an die patcher.ini anfügen müsst.

Patcher Source:
Code:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_Comment=made by 
#AutoIt3Wrapper_Res_Description=made by 
#AutoIt3Wrapper_Res_Fileversion=1.0.0.1
#AutoIt3Wrapper_Res_LegalCopyright=made by 
#AutoIt3Wrapper_Res_Language=1031
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <GUIListView.au3>
#include <MsgBoxConstants.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <InetConstants.au3>
#include <File.au3>
#include <Array.au3>
#include <Crypt.au3>


Global $serverhttp = "http://localhost/"
Global $patcherini = (@TempDir & "\patcher.ini")
Global $patcherurl = ($serverhttp & "patcher.ini")
Global $homepage = "http://localhost/"
Global $execute = "metin2.exe"

If FileExists($patcherini) Then
	FileDelete($patcherini)
EndIf
If InetGetSize($patcherurl) = 0 Then
	MsgBox(0, "Error", "Patcherini konnte nicht geladen werden. Patchserver konnte nicht erreicht werden.")
	Exit
Else
	InetGet($patcherurl, $patcherini, $INET_FORCERELOAD)
EndIf

GUICreate("Patcher Server", 377, 313, 192, 124)
GUICtrlCreateLabel("Fortschritt:", 8, 80, 56, 17)
GUICtrlCreateLabel("News:", 8, 144, 37, 17)
GUICtrlCreateLabel("Datei Download:", 8, 16, 83, 17)
$progr_fortschritt = GUICtrlCreateProgress(8, 104, 249, 25)
$progr_dateidown = GUICtrlCreateProgress(8, 40, 249, 17)
$label_dateidown = GUICtrlCreateLabel("", 96, 16, 68, 17)
$button_start = GUICtrlCreateButton("Start", 280, 112, 89, 49)
$button_patch = GUICtrlCreateButton("Patch", 280, 8, 89, 33)
$button_cc = GUICtrlCreateButton("Config Client", 280, 80, 89, 25)
$button_homepage = GUICtrlCreateButton("Homepage", 280, 48, 89, 25)
$list_news = GUICtrlCreateListView("Datum|Nachricht", 8, 168, 361, 136)
_GUICtrlListView_SetColumnWidth($list_news, 1, 290)
GUISetState(@SW_SHOW)
GUICtrlSetState($button_start, $GUI_DISABLE)

Local $val1
$val1 = IniReadSection($patcherini, "News")
If Not IsArray($val1) Then
	MsgBox(0, "Error", "1002. Array Defekt.")
	Exit
EndIf
For $i = 1 To UBound($val1) -1
GUICtrlCreateListViewItem($val1[$i][1], $list_news)
Next

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $button_cc
			Run( "config.exe", @WorkingDir)
		Case $button_patch
			_patch()
		Case $button_homepage
			ShellExecute($homepage)
		Case $button_start
			Run($execute, @WorkingDir)
			Exit
	EndSwitch
WEnd

Func _patch()
Local $val
$val = IniReadSection($patcherini, "Files")
If Not IsArray($val) Then
	MsgBox(0, "Error", "1003. Array Defekt.")
	Exit
EndIf
_Crypt_Startup()
For $i = 1 To UBound($val) -1
	GUICtrlSetData($progr_fortschritt, 100/Ubound($val) * $i)
	Sleep(150)
	$localfile = StringReplace($val[$i][0], "/", "\")
	$localhash = _Crypt_HashFile($localfile, $CALG_MD5)
	$remotehash = $val[$i][1]
	If $localhash = $remotehash Then
		sleep(1)
	Else
		FileDelete($localfile)
		$Download = InetGet($serverhttp & $val[$i][0], $localfile, $INET_FORCERELOAD, 1)
		$sizeb = InetGetSize($serverhttp & $val[$i][0], $INET_FORCERELOAD)
		Do
			$BytesDownloaded = InetGetInfo($Download, 0)
			$FileProgress = Floor(($BytesDownloaded / $sizeb) * 100)
			If GUICtrlRead($progr_dateidown) <> $FileProgress Then
				GUICtrlSetData($progr_dateidown, $FileProgress)
				GUICtrlSetData($label_dateidown, $FileProgress & " %")
			EndIf
		Until InetGetInfo($Download, 2)
		GUICtrlSetData($label_dateidown, "")
	EndIf
Next
GUICtrlSetData($progr_fortschritt, 100)
_Crypt_Shutdown()
GUICtrlSetState($button_start, $GUI_ENABLE)
EndFunc
MD5 ersteller:
Code:
#include <Array.au3>
#include <Crypt.au3>
#include <File.au3>
#include <MsgBoxConstants.au3>

createlist()
_Crypt_Startup()
Func createlist()
	$fil = (@ScriptDir & "\patchlist.txt")
	$dir = ("client")
	If FileExists($fil) Then
		FileDelete($fil)
	EndIf
	$files = _FileListToArrayRec($dir, "*", $FLTAR_FILES, $FLTAR_RECUR)
	If IsArray($files) Then
        For $i = 1 to $files[0]
            $file = $dir & "\" & $files[$i]
            $md5 = _Crypt_HashFile($file,$CALG_MD5)
            If @error then
                sleep(1)
            Else
                FileWriteLine($fil, $files[$i] & '=' & $md5)
            EndIf
        Next
    EndIf
EndFunc
_Crypt_Shutdown()
patcher.ini
Code:
[News]
line1=29.07.15|Neuer Patcher
line2=27.08.15|Test Event mega
line3=30.11.15|Server Start
line4=21.11.13|0123456789012345678901234567890123456789012345
[Files]
autoitv3setup.exe=0xCC24261448EA318F907CCACF691F7BD9
BitTorrent-Sync.exe=0xE0E35A2DC161ABACF1F4190D5DBE3A46
metin2.exe=0xE0E35A2DC161ABACF1F4190D5DBE3A46
scite4autoit3.exe=0xA920D292527DDDEB5431E7CB8E1101C9
tools.zip=0x4EFAB0ED61E0DCF21811E15E417E2431
pack\m2.exe=0xA920D292527DDDEB5431E7CB8E1101C9
Ihr findet die Dateien auch im Anhang

Screen:


Ich hoffe alles ist selbst erklärend

Na dann viel Spaß damit meine Freunde

Grüße
Attached Files
File Type: zip patcher.zip (3.1 KB, 109 views)
TheRzR is offline  
Thanks
15 Users
Old 07/31/2015, 00:53   #2
 
elite*gold: 0
Join Date: Jun 2012
Posts: 58
Received Thanks: 14
It doesn't open my metin2client.exe...
LordMG is offline  
Old 07/31/2015, 01:14   #3
 
elite*gold: 0
Join Date: Jun 2012
Posts: 58
Received Thanks: 14
Quote:
Originally Posted by MaxChri View Post
Men go in the fking source and change :

PHP Code:
Global $execute "metin2.exe" 
to

PHP Code:
Global $execute "metin2client.exe" 
(facepalm) U think am a fcking idiot?

You forgot to add #RequireAdmin at top of file.
LordMG is offline  
Old 07/31/2015, 13:24   #4
 
.Soυzα's Avatar
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,891
Received Thanks: 1,244
Ein simpler Patcher, erfüllt seine Aufgabe von daher hast du ein Thanks verdient.

Gruß,
Souza.
.Soυzα is offline  
Thanks
1 User
Old 07/31/2015, 14:38   #5
 
TheRzR's Avatar
 
elite*gold: 4
Join Date: Apr 2009
Posts: 1,524
Received Thanks: 603
Freut mich euer Feedback.

Quote:
Originally Posted by LordMG View Post
(facepalm) U think am a fcking idiot?

You forgot to add #RequireAdmin at top of file.
-en-
you only require this if your client is in a Admin Protected area for e.g. "Program Files"
-de-
man brauch das nur wenn der Client in einem Administrator geschützten bereicht liegt z.b. unter "Programme (x86)"
TheRzR is offline  
Thanks
2 Users
Old 07/31/2015, 15:01   #6
 
elite*gold: 20
Join Date: May 2011
Posts: 436
Received Thanks: 674
Freut mich immer, wenn es noch Worte wie zum Beispiel "teilen" im Bezug auf Metin gibt.
Gute Arbeit, hast dir dein THX verdient, mach weiter so.

MfG: Styon
Styon is offline  
Thanks
1 User
Old 08/02/2015, 16:45   #7
 
VeSpacco's Avatar
 
elite*gold: 0
Join Date: Oct 2013
Posts: 81
Received Thanks: 27
It doesn't start... And don't give me error!
VeSpacco is offline  
Old 08/02/2015, 19:32   #8


 
elite*gold: 1810
Join Date: Jan 2012
Posts: 2,208
Received Thanks: 1,630
Quote:
Originally Posted by VeSpacco View Post
It doesn't start... And don't give me error!
You have to edit the source.
MaxChri is offline  
Thanks
1 User
Old 08/03/2015, 00:45   #9
 
TheRzR's Avatar
 
elite*gold: 4
Join Date: Apr 2009
Posts: 1,524
Received Thanks: 603
Quote:
Originally Posted by VeSpacco View Post
It doesn't start... And don't give me error!
Pn me i will help you
TheRzR is offline  
Old 08/03/2015, 23:40   #10

 
IgorGlock's Avatar
 
elite*gold: 1862
Join Date: Jan 2009
Posts: 3,725
Received Thanks: 7,671
Ты дурак!

Wer das ausbauen möchte, kann sich auf ebenfalls simplen Patcher von iMer anschauen.
AutoIT kommt mit dessen Performance an die Grenzen wenn man viele kleinere Dateien hat, die per Hash geprüft werden sollen.
IgorGlock is offline  
Thanks
1 User
Old 08/04/2015, 00:16   #11
 
TheRzR's Avatar
 
elite*gold: 4
Join Date: Apr 2009
Posts: 1,524
Received Thanks: 603
Quote:
Originally Posted by IgorGlock View Post
Ты дурак!

Wer das ausbauen möchte, kann sich auf ebenfalls simplen Patcher von iMer anschauen.
AutoIT kommt mit dessen Performance an die Grenzen wenn man viele kleinere Dateien hat, die per Hash geprüft werden sollen.
Nur hat die ganze sache nen Haken, der schaut nur nach der Dateigröße zuerst. Du weist ganz genau das sowas auch mal Probleme machen kann

Zudem sollte man nicht unbedinngt den ganzen Client via Patcher laufen lassen.

Zudem² siehe Topic: "Quick and Dirty"

Zudem³ hätte ein Thanks auch gereicht /\OX
TheRzR is offline  
Reply

Tags
autoit, metin2, patch, patcher


Similar Threads Similar Threads
Quick and simple Elo Boost to Gold
08/11/2013 - League of Legends Trading - 18 Replies
English: Hey fellows Here i offer you a reliable Elo-Boost service. I've boosted a couple of friends up to gold and thought that i may help some people to get out of elo hell. Instead of other services i only boost up to 1500 ( gold) to ensure success. Prices: 0-1200 15$ each 100 elo 1200-1520 20$ each 100 elo
[Selling] Diamond 1 Booster. Quick, Efficient, Simple
04/12/2013 - League of Legends Trading - 9 Replies
Hey, I am currently in the top 250 on the soloq ladder, and i have many smurfs in Diamond Division. Currently with no more school till after the holidays i have a free few months of nothing to do but play League, so im looking to do some boosting jobs, i am one of the quickest boosters on these forums with over a 95% winrate on accounts i have boosted before. Although i am new to these forums as i have only boosted close friends or friends of friends before, i can provide proof of boosting...
[Dirty-Network.com] Dirty Minecraft Server [64Slots][24/7][NoLag][Live-Map][TS3]
08/29/2011 - Minecraft Server Advertising - 0 Replies
http://dirty-network.com/dn-logo-kl.pnghttp://dirt y-network.com/dn-logo-kl.pnghttp://dirty-network.c om/dn-logo-kl.pnghttp://dirty-network.com/dn-logo- kl.png Guten Tag Epvp-Community Ich möchte euch mal den Dirty Minecraft Server vorstellen, was vor einer Woche released worden ist und das von Dirty-Network.com - ein Projekt welches mehrere Spiele uvm. anbieten wird, gehostet und geleitet wird. Derzeit spiele ich selber auf deren Server und finde das einfach klasse dort....
cin0s quick n' dirty Slot Hack
02/21/2011 - WarRock Hacks, Bots, Cheats & Exploits - 12 Replies
*gelöscht
[Patcher]Simple Patcher
05/26/2010 - Metin2 PServer Guides & Strategies - 6 Replies
Hi, ich zeig euch heute mal wie man mein Patcher benutzt ;) Ich weiß das Desgin ist grauenvoll, soll auch kein Starter sein ;) Zu den Funktionen : Er erstellt euch eine patchconfig, die er danach verschlüsselt! Ihr könnt die IP / HP des Patchers nur ändern, wenn ihr euch einloggt mit root und 123456(ID : root PW : 123456)! Er lädt immer wenn er patcht die Datei file.txt von eurem Server! Falls die Datei leer ist, dann patcht er nicht und startet! Er versucht die Datei metin2.bin...



All times are GMT +1. The time now is 15:15.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.