[−][src]Struct nessus_xml_parser::NessusScan
This struct holds the two sections of a Nessus XML file. Every XML file must have a single Policy section, and zero or one Report sections.
-
The Policy section contains information about the scan settings, plugins used, etc.
-
The Report section contains the results from having run a Nessus scan with the provided Policy
This crate provides iterators over the discovered hosts and ports.
Implementations
impl NessusScan
[src]
pub fn policy(&self) -> &Policy
[src]
Returns the Policy section from a report
pub fn report(&self) -> &Option<Report>
[src]
Returns the Report section from a report
pub fn parse(nessus_xml_str: &str) -> Result<Self, Error>
[src]
Attempt to parse an XML object as a Nessus report
let xml = r#" <?xml version="1.0" ?> <NessusClientData_v2> ... </NessusClientData_v2> "#; let nessus = NessusScan::parse(&xml).unwrap();
pub fn hosts(&self) -> Iter<ReportHost>
[src]
Returns an interator over the hosts in the scan
let xml = r#" <?xml version="1.0" ?> <NessusClientData_v2> ... </NessusClientData_v2> "#; let nessus = NessusScan::parse(&xml).unwrap(); for host in nessus.hosts() { println!("Hostname: {}", host); }
pub fn ports(&self) -> IntoIter<(&ReportHost, Port)>
[src]
Returns an interator over the ports in the scan.
let xml = r#" <?xml version="1.0" ?> <NessusClientData_v2> ... </NessusClientData_v2> "#; let nessus = NessusScan::parse(&xml).unwrap(); for (host, port) in nessus.ports() { println!("Hostname: {}, port: {}", host, port.id); }
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for NessusScan
impl Send for NessusScan
impl Sync for NessusScan
impl Unpin for NessusScan
impl UnwindSafe for NessusScan
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,