private static bool VerifyMd5Hash(MD5 md5Hash, string input, string hash) { string md5Hash2 = ExceptionCatcher.GetMd5Hash(md5Hash, input); StringComparer ordinalIgnoreCase = StringComparer.OrdinalIgnoreCase; return(ordinalIgnoreCase.Compare(md5Hash2, hash) == 0); }
private static string BuildMarkup(string title, string stackTrace, string hashBlock) { string text = ExceptionCatcher.CreateEscapedSGML(stackTrace); return(string.Concat(new object[] { "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ReportedIssue xmlns=\"http://schemas.datacontract.org/2004/07/Inspector.Models\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">\n\t<Summary>", title, "</Summary>\n\t<Assertion>", text, "</Assertion>\n\t<HashBlock>", hashBlock, "</HashBlock>\n\t<Version>", Application.version, "</Version>\n\t<Module>WoW Legion Companion</Module>\n\t<EnteredBy>0</EnteredBy>\n\t<IssueType>Exception</IssueType>\n\t<ProjectId>", 292, "</ProjectId>\n\t<Metadata><NameValuePairs>\n\t\t<NameValuePair><Name>Build</Name><Value>", Application.version, "</Value></NameValuePair>\n\t\t<NameValuePair><Name>OS.Platform</Name><Value>", Application.platform, "</Value></NameValuePair>\n\t\t<NameValuePair><Name>Unity.Version</Name><Value>", Application.unityVersion, "</Value></NameValuePair>\n\t\t<NameValuePair><Name>Unity.Genuine</Name><Value>", Application.genuine, "</Value></NameValuePair>\n\t\t<NameValuePair><Name>Locale</Name><Value>", Main.instance.GetLocale(), "</Value></NameValuePair>\n\t</NameValuePairs></Metadata>\n</ReportedIssue>\n" })); }
private static bool VerifyMd5Hash(MD5 md5Hash, string input, string hash) { string str = ExceptionCatcher.GetMd5Hash(md5Hash, input); if (StringComparer.OrdinalIgnoreCase.Compare(str, hash) == 0) { return(true); } return(false); }
private void ExceptionReporterCallback(string message, string stackTrace, LogType logType) { if (logType == 4) { string text = ExceptionCatcher.CreateHash(message + stackTrace); if (!ExceptionCatcher.AlreadySent(text)) { base.StartCoroutine(this.SendExceptionReport(message, stackTrace, text)); ExceptionCatcher.sentReports.Add(text); return; } } }
private void ExceptionReporterCallback(string message, string stackTrace, LogType logType) { if (logType == LogType.Exception) { string str = ExceptionCatcher.CreateHash(string.Concat(message, stackTrace)); if (!ExceptionCatcher.AlreadySent(str)) { base.StartCoroutine(this.SendExceptionReport(message, stackTrace, str)); ExceptionCatcher.sentReports.Add(str); return; } } }
private IEnumerator SendExceptionReport(string message, string stackTrace, string hash) { string report = ExceptionCatcher.BuildMarkup(message, stackTrace, hash); byte[] bytes = Encoding.UTF8.GetBytes(report); WWWForm form = new WWWForm(); form.AddBinaryData("file", bytes, "ReportedIssue.xml", "application/octet-stream"); using (WWW www = new WWW(this.SubmitURL, form)) { yield return(www); } Singleton <Login> .instance.BnQuit(); Application.Quit(); yield break; }
private static string CreateHash(string blob) { MD5 md5Hash = MD5.Create(); return(ExceptionCatcher.GetMd5Hash(md5Hash, blob)); }
private static string CreateHash(string blob) { return(ExceptionCatcher.GetMd5Hash(MD5.Create(), blob)); }