Ejemplo n.º 1
0
        /// <summary>
        /// The submit_file
        /// </summary>
        /// <param name="filu">The filu<see cref="string"/></param>
        private async void submit_file(string filu = null)
        {
            listView1.Items.Clear();
            VirusTotal virustotal = new VirusTotal("a3f22a4baa6bfb80942e3aa9824c0673acab04140cb7825487590d587d70c485");

            virustotal.UseTLS = true;
            FileReport report = await virustotal.GetFileReportAsync(Eicar);

            bool Scancheck = report.ResponseCode == FileReportResponseCode.Present;

            if (Scancheck)
            {
                linkLabel2.Show();
                linkLabel2.Text = report.Permalink;
            }
            else
            {
                ScanResult fileResult = await virustotal.ScanFileAsync(Eicar, filu);

                MessageBox.Show(@"Tiedostoa ei ole tarkistettu aikaisemmin.", @"Information", MessageBoxButtons.OK,
                                MessageBoxIcon.Information);
                Process.Start(fileResult.Permalink);
            }

            if (report.ResponseCode == FileReportResponseCode.Present)
            {
                foreach (KeyValuePair <string, ScanEngine> scan in report.Scans)
                {
                    ListViewItem itm = new ListViewItem {
                        Text = scan.Key
                    };
                    itm.SubItems.Add(scan.Value.Result);
                    itm.SubItems[1].ForeColor   = Color.Red;
                    itm.UseItemStyleForSubItems = false;
                    itm.SubItems.Add(report.ScanDate.ToString(CultureInfo.CurrentCulture));
                    itm.SubItems.Add(report.SHA256);
                    listView1.Items.Add(itm);
                }
            }

            if (report.Positives >= 3)
            {
                WbRequest.URLRequest("https://cryphic.gq/vtotal.php?id=" + LoginSplit[1] + "&sha256=" + report.SHA256 + "&date=" + report.ScanDate +
                                     "&file=" + filu);
            }
        }
Ejemplo n.º 2
0
        private void LoginBtn_Click(object sender, EventArgs e)
        {
            /* Threadissa juoksu jotta ei jäädy */
            new Thread(() =>
            {
                Thread.CurrentThread.IsBackground = true;
                var login = WbRequest.Login(UserField.Text, PassField.Text, new Uri("https://www.cryphic.gq/Authentication/login_submit.php"));


                if (login == @"Logged 3")
                {
                    LoginSplit        = login.Split(null);
                    statusLbl.Text    = @"Status: Logged In successfully";
                    UserField.Enabled = false;
                    PassField.Enabled = false;
                    loginBtn.Enabled  = false;
                    materialTabControl1.TabPages.Add(tabPage2);
                    materialTabControl1.SelectedIndex = tabPage2.TabIndex;
                }
            }).Start();
        }