So, I have some code here that compares MD5 Hashes to ones on a webserver Not in a .php file or anything just a plain .txt Heres the code
WebClient wc = new WebClient();
var md5signatures = wc.DownloadString("http://examplesite/MD5base.txt");
if (md5signatures.Contains("9801b7c917063b8b36f8de97098e9c66"))
{
StatusLabel.Text = "MD5 Found In Website";
StatusLabel.ForeColor = Color.Green;
}
else
{
StatusLabel.Text = "MD5 Not Found In Website";
StatusLabel.ForeColor = Color.Red;
}
Here is the .txt that is in my website (im using examplesite as an example obviously, not the real code)
e787763e761b600730c38b3c47d62f2b
3ba70d4dcaf1817cac0feb0cb2cd26c0
42ba439f8b3fb128de98fd8a54afcc90
2d8413cfd8ed5e5a531bed229fabd8a0
53e2229ce9e603653f251f5c1e686da0
9801b7c917063b8b36f8de97098e9c66
47eb494feb0ba8b754ddc307b74b6ac0
3baa5dc9aaf6afc704d9da1469b15080
I Did this exact program with a .txt file on the drive and it worked perfectly no issues (I Think its because i used File.ReadAllLines which ill get to in a moment)
But when i upload the same .txt file to a webserver things get a ton more complicated actually The reason i think this is happening is due to the fact that WebClient has no control for reading things line by line, All i know of is DownloadString which im pretty sure puts the hashes right next to eachother like so
Instead of
e787763e761b600730c38b3c47d62f2b
3ba70d4dcaf1817cac0feb0cb2cd26c0
Its
3ba6e302c6d872dc8bf71050e9f4c2f0e787763e761b600730c38b3c47d62f2b
Two hashes kind of appended to eachother
Any help would be greatly appreciated as ive been stumped on this for a while If im incorrect about anything here please let me know.