This color is the command
This color can be ignored
This color is the information
Example code
Status page:
Listing all the available backup sessions:
c:\Program Files\Burp\bin\burp.exe -al
C:\Users\Administrator>"c:\Program Files\Burp\bin\burp.exe" -al 2017-06-29 15:22:07: c:\Program Files\Burp\bin\burp.exe[2344] auth ok 2017-06-29 15:22:07: c:\Program Files\Burp\bin\burp.exe[2344] Server version: 2.1.6 2017-06-29 15:22:07: c:\Program Files\Burp\bin\burp.exe[2344] nocsr ok 2017-06-29 15:22:07: c:\Program Files\Burp\bin\burp.exe[2344] SSL is using cipher: DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(256) Mac=AEAD 2017-06-29 15:22:07: c:\Program Files\Burp\bin\burp.exe[2344] extra_comms_begin ok:autoupgrade:incexc:orig_client:uname:counters_json:msg:csetproto: 2017-06-29 15:22:07: c:\Program Files\Burp\bin\burp.exe[2344] Server has protocol=0 (auto) 2017-06-29 15:22:07: c:\Program Files\Burp\bin\burp.exe[2344] Using protocol=1 Backup: 0000001 2017-05-30 21:12:40 (deletable) Backup: 0000015 2017-06-11 03:28:02 (deletable) Backup: 0000022 2017-06-17 03:28:03 (deletable) Backup: 0000029 2017-06-23 02:28:02 (deletable) Backup: 0000030 2017-06-23 22:48:02 (deletable) Backup: 0000031 2017-06-24 19:08:02 (deletable) Backup: 0000032 2017-06-25 15:28:02 (deletable) Backup: 0000033 2017-06-26 13:08:02 (deletable) Backup: 0000034 2017-06-27 09:28:02 (deletable) Backup: 0000035 2017-06-28 05:48:01 (deletable) Backup: 0000036 2017-06-29 02:08:02 (deletable) 2017-06-29 15:22:08: c:\Program Files\Burp\bin\burp.exe[2344] main socket: Peerclosed SSL session 2017-06-29 15:22:08: c:\Program Files\Burp\bin\burp.exe[2344] List finished ok
The lines with (deletable) The backup numbers and date/time are displayed
This you can display in a box on the configuration page
process1.StartInfo.FileName = "c:\\Program Files\\Burp\\bin\\burp.exe";
process1.StartInfo.Arguments = "-aL"; // Note the /c command (*)
process1.StartInfo.UseShellExecute = false;
process1.StartInfo.RedirectStandardOutput = true;
process1.StartInfo.RedirectStandardError = true;
process1.Start();
string output = process1.StandardOutput.ReadToEnd();
result = output.Split('\r');
foreach (string str in result)
{
if (str.Contains("Backup"))
{
string s;
s = str.Replace("(deletable)", "");
listBoxBackupDates.Items.Add(s);
comboBoxBackupNrRestore.Items.Add(s);
}
else if (str.Contains("Server version:"))
{
string[] s;
s = str.Split(' ');
labelBurpServerVersion.Text = s[s.Count() - 1];
}
}
process1.WaitForExit();