EDCVYHTHMBCI3VIBGMA35H7MFYK3MTEJH36ET36PQBB5WGKDXQ5QC
RAVOIZIUDSG2A44PKQP3KY7IVBWBYSQY4I744B6I7QZFRL3AE4EQC
FTI67CGF4MMPDFA6YJN6UKOADQLFAECKGYPTWSPSALVQK76BJMJAC
F2QYIRKBFYFWSTB7Z5CNGSZVYI6XQO3MHPUHJLBHPGLIOG7UNVNQC
I5WVRUHGAQGWFZGX7YBKCGQKLHXZHZTCBWFIUCXVGY2WVFB77VQQC
VK3SMPPCGTZANUZKMXBUMIZWXQDNR3PZU3DE7SRWXTMXNSI7XBJAC
42MNZNAH4QWQPYFUEMXD2OCDH5PRANP4IXEIK3SBYEOMJXTOKQ7QC
NXADNFPSCM7ETIGZ676I7X3WENZPRBEZGIOLDWC2FSY652QK2UBAC
VEN5WJYRT23IT77JAAZ5CJRSW3GUTTNMAECT3WVTHQA34HI4646AC
table.set_header(vec![
Cell::new("tmn").add_attribute(Attribute::Bold),
Cell::new("ses").add_attribute(Attribute::Bold),
Cell::new("res").add_attribute(Attribute::Bold),
Cell::new("pwd").add_attribute(Attribute::Bold),
Cell::new("cmd").add_attribute(Attribute::Bold),
]);
for entry in entries.into_iter() {
table.add_row(vec![
format_timestamp(entry.time_finished),
format_uuid(entry.session_id),
format!("{}", entry.result),
format_pwd(entry.pwd)?,
entry.command.trim().to_string(),
if args.host {
table.set_header(vec![
Cell::new("tmn").add_attribute(Attribute::Bold),
Cell::new("hos").add_attribute(Attribute::Bold),
Cell::new("ses").add_attribute(Attribute::Bold),
Cell::new("res").add_attribute(Attribute::Bold),
Cell::new("pwd").add_attribute(Attribute::Bold),
Cell::new("cmd").add_attribute(Attribute::Bold),
]);
} else {
table.set_header(vec![
Cell::new("tmn").add_attribute(Attribute::Bold),
Cell::new("ses").add_attribute(Attribute::Bold),
Cell::new("res").add_attribute(Attribute::Bold),
Cell::new("pwd").add_attribute(Attribute::Bold),
Cell::new("cmd").add_attribute(Attribute::Bold),
if args.host {
for entry in entries.into_iter() {
table.add_row(vec![
format_timestamp(entry.time_finished),
entry.hostname,
format_uuid(entry.session_id),
format!("{}", entry.result),
format_pwd(entry.pwd)?,
entry.command.trim().to_string(),
]);
}
} else {
for entry in entries.into_iter() {
table.add_row(vec![
format_timestamp(entry.time_finished),
format_uuid(entry.session_id),
format!("{}", entry.result),
format_pwd(entry.pwd)?,
entry.command.trim().to_string(),
]);
}
}