Matteo 47 Posted July 27, 2015 Share Posted July 27, 2015 (edited) Require administrator priviliges:Right click on the project -> Add -> New Item -> Application Manifest FileSearch this: <requestedExecutionLevel level="asInvoker" uiAccess="false" /> Replace with this: <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> Edited July 27, 2015 by Minton 2 System Administrator @ Hungarian Government System Administrator @ Vibestro Freelancer Developer @ Various projects Link to comment Share on other sites More sharing options...
wezt 95 Posted November 13, 2015 Share Posted November 13, 2015 On 6/19/2015, 12:50:54, ☢ cнαяραяσdαя ☢ said: Hello again, I realised that the patcher doesn't download bigger files, like 35MB +, but the download, checks them as complete... Is the Lister that is doing wrong the crc code? Or is the patcher that have a size limit to download? Thanks... Hi, try to change crc hash to md5, it helped me. Spoiler In Common.cs Add this in begging of the file: using System.Security.Cryptography; and after: public static string GetHash(string Name) { if (Name == string.Empty) return string.Empty; CRC crc = new CRC(); string Hash = string.Empty; using (FileStream fileStream = File.Open(Name, FileMode.Open)) { foreach (byte b in crc.ComputeHash(fileStream)) { Hash += b.ToString("x2").ToLower(); } } return Hash; } add: public static string CalculateMD5Hash(string Name) { if (Name == string.Empty) return null; MD5 md5 = System.Security.Cryptography.MD5.Create(); string Hash = string.Empty; try { using (FileStream fileStream = File.Open(Name, FileMode.Open, FileAccess.Read, FileShare.Read)) { foreach (byte b in md5.ComputeHash(fileStream)) { Hash += b.ToString("x2").ToLower(); } } } catch { MessageBox.Show("Can't open: " + Name); } return Hash; } In FileChecker.cs find: if (!File.Exists(file.Name) || Common.GetHash(file.Name) != file.Hash) and replace with: if (!File.Exists(file.Name) || Common.CalculateMD5Hash(file.Name) != file.Hash) After these changes you'll have MD5 Patcher PS: Atm I'm experiencing some problems with progress bar, will add solution if I'll find it. Also I'd like to share php script which generate patchlist.txt (probably will be useful for someone): Spoiler <?php /* Usage: Upload this file to the web-server, in folder with patchlist.txt and open it in browser. Note: I recommend to protect this file from public usage with password (put file in folder, change output file and directory path and and use .htaccess) */ function list_directory($dir) { $file_list = array(); $stack[] = $dir; while ($stack) { $current_dir = array_pop($stack); if ($dh = opendir($current_dir)) { while (($file = readdir($dh)) !== false) { if ($file !== '.' AND $file !== '..') { $current_file = "{$current_dir}/{$file}"; $report = array(); if (is_file($current_file)) { $file_list[] = "{$current_dir}/{$file}"; } elseif (is_dir($current_file)) { $stack[] = $current_file; $file_list[] = "{$current_dir}/{$file}/"; } } } } } return $file_list; } $files = list_directory('.'); // Path to directory with files sort($files, SORT_NATURAL | SORT_FLAG_CASE); $line = ""; foreach($files as $file) { $hash = hash_file( 'crc32b', $file ); $size = filesize($file); if($hash == "00000000" || preg_match("/patchlist/", $file)) continue; $file_n = preg_replace("/^../","",$file); echo $file_n . " " . $hash . " " . $size . "<br>"; $line .= $file_n . " " . $hash . " " . $size . "\r\n"; } $handle = fopen("patchlist.txt", "w+"); // Path to output file fwrite($handle, $line); fclose($handle); ?> Best Regards 1 Link to comment Share on other sites More sharing options...
berseker 0 Posted November 25, 2015 Share Posted November 25, 2015 @wezt i try to change the code for md5, the problem is the patchlist that don't have the md5 hash saved and the patcher continue to download every time you start the patch. Sry for Bad Eng Link to comment Share on other sites More sharing options...
wezt 95 Posted November 26, 2015 Share Posted November 26, 2015 13 hours ago, berseker said: @wezt i try to change the code for md5, the problem is the patchlist that don't have the md5 hash saved and the patcher continue to download every time you start the patch. Hi, you need to use patchlist.txt with md5 hash. In order to get md5 you can use php script (was added in previous post) but you need: //change this line $hash = hash_file( 'crc32b', $file ); //to $hash = hash_file( 'md5', $file ); Or you can add "CalculateMD5Hash(string Name)" function in Sanchez.Lister 1 Link to comment Share on other sites More sharing options...
JarajTo 40 Posted December 2, 2015 Share Posted December 2, 2015 On 26.11.2015, 12:54:14, wezt said: Hi, you need to use patchlist.txt with md5 hash. In order to get md5 you can use php script (was added in previous post) but you need: //change this line $hash = hash_file( 'crc32b', $file ); //to $hash = hash_file( 'md5', $file ); Or you can add "CalculateMD5Hash(string Name)" function in Sanchez.Lister Hi bro. I have problem with this patcher. Some people have error: Can't connect to server, please check your network settings and try again. And patcher can`t download file. Link to comment Share on other sites More sharing options...
Management Karbust 4888 Posted December 11, 2015 Management Share Posted December 11, 2015 Hi Seems a good solution, just now I saw your answer I will try Thanks Link to comment Share on other sites More sharing options...
Bituse 61 Posted January 24, 2016 Share Posted January 24, 2016 Can anyone reupload the modified Patcher Source Link to comment Share on other sites More sharing options...
Krzychu20 3 Posted June 23, 2016 Share Posted June 23, 2016 How i can change download directory? Default is disk C: but i want download files to D:/example/ Link to comment Share on other sites More sharing options...
Lajk 7 Posted November 17, 2016 Share Posted November 17, 2016 How can i add .ico to the exe file ? Link to comment Share on other sites More sharing options...
Aerrow 41 Posted November 17, 2016 Share Posted November 17, 2016 Use google... Link to comment Share on other sites More sharing options...
Management Karbust 4888 Posted November 18, 2016 Management Share Posted November 18, 2016 Project -> Project Properties (last option) -> Application -> Icon and manifest -> Icon Link to comment Share on other sites More sharing options...
RaVenRG 1 Posted December 12, 2016 Share Posted December 12, 2016 Hi if i change something in locale_pl or somewhere do it download it too? Link to comment Share on other sites More sharing options...
Management Karbust 4888 Posted December 16, 2016 Management Share Posted December 16, 2016 On 12/12/2016 at 8:08 PM, RaVenRG said: Hi if i change something in locale_pl or somewhere do it download it too? It just would change if you put on the auto patcher, every time you change something on locale and pack, the CRC32 must change, soo if you put on the auto patcher it'll download automatically... Link to comment Share on other sites More sharing options...
.Rise 18 Posted January 13, 2018 Share Posted January 13, 2018 It shows virus.. If I helped you, do not forget to press "Thanks" button! Link to comment Share on other sites More sharing options...
Management Karbust 4888 Posted January 16, 2018 Management Share Posted January 16, 2018 On 13/01/2018 at 4:34 PM, .Rise said: It shows virus.. Explain to me, how can a source code alert virus? Link to comment Share on other sites More sharing options...
wladinar 0 Posted April 4, 2018 Share Posted April 4, 2018 hey bro, nice project, can you post wpf project again? i need it <3 Link to comment Share on other sites More sharing options...
eri92 0 Posted August 19, 2018 Share Posted August 19, 2018 Perfect Link to comment Share on other sites More sharing options...
Traceur3RUN 75 Posted October 18, 2018 Share Posted October 18, 2018 can someone fix this bug? when you have like something/something/something then this doesnt work, because dont create folder with lz only work with pack/ but dont work if you have lib/lib/ Link to comment Share on other sites More sharing options...
[RaffaeL] 28 Posted October 27, 2018 Share Posted October 27, 2018 La 18.10.2018 la 12:10, Traceur3RUN a spus: can someone fix this bug? when you have like something/something/something then this doesnt work, because dont create folder with lz only work with pack/ but dont work if you have lib/lib/ What do you mean by that? You want to put only the path to the file, or the whole file? But you can do that. Eg. /public_html/patch/client/any folder you want (without writing that full path as url_path to your source code, in Globals.cs, but adding the folder/folders in patchlist) Best of luck Link to comment Share on other sites More sharing options...
Traceur3RUN 75 Posted November 13, 2018 Share Posted November 13, 2018 Dnia 18.10.2018 o 11:10, Traceur3RUN napisał: can someone fix this bug? when you have like something/something/something then this doesnt work, because dont create folder with lz only work with pack/ but dont work if you have lib/lib/ bump Link to comment Share on other sites More sharing options...
.Raiin 9 Posted November 20, 2018 Share Posted November 20, 2018 Am 13.11.2018 um 09:01 schrieb Traceur3RUN: bump You can try with another patcher Link to comment Share on other sites More sharing options...
BeauDeCiuda 18 Posted June 20, 2020 Share Posted June 20, 2020 virus : This is the hidden content, please Sign In or Sign Up 8 2 2 1 2 3 Link to comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted June 20, 2020 Contributor Share Posted June 20, 2020 (edited) 4 hours ago, BeauDeCiuda said: virus : This is the hidden content, please Sign In or Sign Up Sanchez's upload does not even contain an exe lol. Your got virus probably because of a pirated visual studio, or already infected machine. If you compile it in a legal vs, it will only produce 2 false positive by noname antivirus. It is because it connects to the internet and downloads files. Btw this patcher does not have any "extern" or "lib" so it is 100% open source, you can see every files, only .cs, resx, sln, vcproj, these are text files so you can see what's inside them. Edited June 20, 2020 by TMP4 3 Link to comment Share on other sites More sharing options...
Premium Ulthar 3101 Posted June 23, 2020 Premium Share Posted June 23, 2020 Hello! Segítenél beállítani a patchert? Ehhez egyáltalán nem értek. :/ Ulthar Link to comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted June 23, 2020 Contributor Share Posted June 23, 2020 (edited) Hungarian: Spoiler Hogyan üzemeld be: 1. Változtasd meg a ServerURL-t a Globals.cs fájlban a sajátodra 2. Fordítsd le a projectet VisualStudio-ban 3. Csináld meg a listát a fájlokról a lister tool-al (Példa hogy néz ki a lista) 4. Töltsd fel a kliensedet és a lista fájlt a webszerveredre (Példa hogy néz ki a mappa stuktúrája) Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 10 1 1 1 2 Link to comment Share on other sites More sharing options...
Recommended Posts