Exemple #1
0
 private void btn3rdParty_Click(object sender, EventArgs e)
 {
     using (about _form = new about()) {
         _form.ShowDialog();
     }
 }
Exemple #2
0
        private void btnConsole_Click(object sender, EventArgs e)
        {
            string[] con = tbConsole.Text.Split(' ');
            switch ((con[0]).ToLower())
            {
            case "setdrive":
                drpDrives.Items.Add(con[1]);
                drpDrives.SelectedIndex = drpDrives.Items.Count - 1;
                dbgmsg("Override command -- Drive selection set and added -- " + con[1]);
                break;

            case "exit":
                Application.Exit();
                break;

            case "setoverflowcount":
                overflowCount = Convert.ToInt32(con[1]);
                dbgmsg("Overflow loop count changed to " + con[1]);
                break;

            case "setimagelocation":
                imgFileIcon.ImageLocation = con[1];
                dbgmsg("Image location set : " + con[1]);
                break;

            case "cls":
                dbgRtb.Text = "";
                break;

            case "overflowdebugmsg":
                dbgmsg("The quick brown fox jumps over the lazy dog The quick brown fox jumps over the lazy dog The quick brown fox jumps over the lazy dog The quick brown fox jumps over the lazy dog");
                break;

            case "showpayloadfile":
                dbgmsg("payloadFile[0]=" + payloadFile[0]);
                dbgmsg("payloadFile[1]=" + payloadFile[1]);
                break;

            case "checkcomp":     //Check the function documentation of "checkComponent" to know the debug arguments/parameters
                dbgmsg("Testing checkComponent() Function");
                dbgmsg("Test returned a value of: " + checkComponent(con[1], con[2], con[3], con[4], con[5]).ToString());
                break;

            case "teststrformat":
                dbgmsg("strformat:" + String.Format(con[1], con[2]));
                break;

            case "formsetwidth":
                dbgmsg("Form width set to: " + con[1]);
                this.Width = Convert.ToInt32(con[1]);
                break;

            case "cleanup":
                cleanup();
                break;

            case "showallui":
                dbgmsg("showing all ui...");
                about        _a = new about();
                buildPayload _b = new buildPayload();
                minipad      _c = new minipad();
                _a.Show();
                _b.Show();
                _c.Show();
                break;

            case "rtlo":
                dbgmsg(globalClass.rtlo + con[1]);
                break;

            case "getserial":
                dbgmsg("driveserial: " + getSerial(con[1]));
                break;

            case "testnet":
                dbgmsg("result:" + testNet(con[1]));
                break;

            case "rep":
                dbgmsg("result: " + con[1].Replace("\"", "\"\""));
                break;

            default:
                dbgmsg("Bad command! Available commands:\nsetdrive [driveletter]\nsetoverflowcount [integer]\nsetimagelocation [filepath]\nshowpayloadfile\noverflowdebugmsg\ncheckcomp [name] [filename] [size] [link] [desc]\nteststrformat [string] [data]\nformsetwidth [integer]\ncleanup\nshowallui\nrtlo [string]\ngetserial [drive]\ntestnet [address]\nrep [string]\ncls\nexit\n");
                break;
            }
            tbConsole.Text = "";
        }