Well I see where I went wrong, and all is good now, great work!!!!
Just remember though, C# String.Trim doesn't remove null terminators, so you'll probably wanna change:
username = new System.String(dec, 0x02, 14).Trim();
username = username.ToLower();
password = new string(dec, 0x11, 16).Trim();
To:
String trimString = "\0 ";
username = new System.String(dec, 0x02, 4).Trim(trimString.ToCharArray());
username = username.ToLower();
password = new string(dec, 0x11, 16).Trim(trimString.ToCharArray());
I think we're the first people to crack C4 encryption in C#, woot! Though I did it differant, I didn't use RSAManaged at all, I just used BigIntegers to do it, I'm not too concerned with all the extra crap from RSAManaged like keyblinding and what not, to think all that effort looking for a new way to decrypt it and I had it all along except for a tiny little mistake in my code. That'll teach me. But again, good job on all the work!
|