Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 12:02

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

Advertisement



[C#]MD5-Cheksumme mit HttpWebRequest oä

Discussion on [C#]MD5-Cheksumme mit HttpWebRequest oä within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 439
Join Date: May 2009
Posts: 1,502
Received Thanks: 880
[C#]MD5-Cheksumme mit HttpWebRequest oä

Ich will mir mal einen gescheiten Patcher für Metin2 machen..

Jetzt soll er von den Files auf meinem Server die Checksummen ausspucken.

Die Datei sollte nicht heruntergeladen werden...

Code:
  System.IO.FileStream FileCheck = System.IO.File.OpenRead(Dateipfad);                
  System.Security.Cryptography.MD5 md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
  byte[] md5Hash = md5.ComputeHash(FileCheck);                
  FileCheck.Close();
                
  string Berechnet =   BitConverter.ToString(md5Hash).Replace("-", "").ToLower();
 
 MessageBox.Show(Berechnet);
Liest von einer Datei die MD5-Checksumme

Aber wie sieht es dann mit einer Datei im Netzt aus?

Danke im vorraus!

grüßle LordMampf2
LordMampf2 is offline  
Old 08/18/2010, 23:01   #2
 
Madd Eye's Avatar
 
elite*gold: 260
Join Date: Apr 2010
Posts: 229
Received Thanks: 142
Geht nicht denn dazu müsste die Datei heruntergeladen werden

Du kannst aber Per PHP die Hashsummer in eine Datei schreiben lassen und diese dann auslesen

PHP MD5 Hash erzeugen:
Code:
<?php
$data = "pfad/datei.exe";
$digest = md5($data);

$hash = fopen("counter.txt","w+");
fwrite($datei, $hash;
fclose($datei);

?>
C# Hash auslesen:
Code:
Dim DateiInhaltText as String
DateiInhaltText = Inet1.OpenURL("www.beispiel.de/beispiel.txt")
Um das Inet-Control verwenden zu können, under Projekt --> Komponenten ein Häkchen bei "Microsoft Internet Transfer Control 6.0" setzen und dann ein "Inet" auf deiner Form platzieren.
Madd Eye is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
HttpWebRequest C# Browsergame Bot
12/07/2017 - .NET Languages - 4 Replies
Hi, i have the following problem and it would be great if s.o. could help me. I try to write a simple bot for a browsergame which uses the HttpWebRequest and Response classes from C#. Currently i try to log in with the following script but i only get back to the login page. When i try to catch a site for logged in members only i also only get the login page. There has to be a problem with the cookie but i don't know where :( class HttpHelper { private CookieContainer...



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


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.