import React from "react"; import Alert from "@mui/material/Alert"; import Button from "@mui/material/Button"; import Card from "@mui/material/Card"; import Tooltip from "@mui/material/Tooltip"; import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined"; class ScanDetail extends React.Component { render() { return (
#{this.props._id}

General info

Domain {this.props.domain}
Endpoint {`${this.props.ip}:${this.props.port}`}
Hostname {this.props.ptr}
Owner {this.props.whois_description}
ASN {`${this.props.asn} (${this.props.asn_country_code})`}
Abuse mail {this.props.abuse_mail}
{this.props.description && ( <>
{this.props.description} )}

Custom info

Latest scan:     {this.props.timestamp_in_utc}

{Object.entries(this.props.result) // Sort by vulnerable, investigation_needed, reliability, name .sort((a, b) => a[1].display_name > b[1].display_name ? -1 : 1 ) .sort((a, b) => a[1].reliability < b[1].reliability ? -1 : 1 ) .sort((a, b) => a[1].vulnerable || a[1].investigation_needed ? -1 : 1 ) .sort((a, b) => (a[1].vulnerable ? -1 : 1)) .map(([id, res]) => ( ))}
); } } function Custom(props) { return ( {Object.entries(props).map( ([key, { data, display_name, description }]) => ( ) )}
); } function CustomElement(props) { return ( {props.display_name} {props.data.toString()} {props.description} ); } function Result(props) { return (
{ if (props.vulnerable) return " vulnerable"; else if (props.investigation_needed) return " investigation_needed"; else return ""; })() } variant="outlined" > {props.display_name} {props.description && ( )} {(props.vulnerable || props.investigation_needed) && ( {props.reliability} )}
); } export default ScanDetail;