Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const typePage = data?.type;
- const title = data?.title;
- const indicators = data?.indicators;
- const indicator = data?.indicator;
- const httpStatus = data?.httpStatus;
- const umbrellaRank = data?.umbrellaRank;
- const redirectTo = data?.redirectTo;
- const redirectFrom = data?.redirectFrom;
- const geo = data?.geo;
- const reg = data?.reg;
- const ssl = data?.sslDomains.map((certificate) => certificate.value);
- const risk = data?.risk;
- const riskFactors = data?.riskFactors?.map((riskFactor) => `- ${riskFactor?.description}`);
- const typeData = data?.typeData;
- const location = data?.location;
- const renderHeader = () => {
- const riskDescription = {
- none: 'Very low risk',
- low: 'Low risk',
- medium: 'Medium risk',
- critical: 'Critical risk',
- unknown: 'Unknown risk',
- high: 'High risk',
- };
- const regText = (reg?.registrant && reg?.email && `${reg.registrant} - ${reg.email}\n`) || '';
- const sslCertificateText = (ssl?.length && `SSL certificate found for: ${ssl.join(', ')}\n`) || '';
- const code = geo?.countryCode === 'US' ? geo?.region : geo?.countryCode;
- const geoText = (geo?.countryCode && `${code}, ${geo?.org}\n`) || '';
- const riskText = `- ${riskDescription[risk] || 'unknown'}`;
- const riskFactorsText = riskFactors?.join('\n');
- const linkText = `More info: ${location}`;
- const umbrellaRankText = (umbrellaRank && `#${umbrellaRank} on Cisco Umbrella top million\n`) || '';
- const copyText = `${title} \n${umbrellaRankText}${sslCertificateText}${regText}${geoText}\nLMNTRIX risk evaluation below:\n${riskText}\nRisk is based on the following factors:\n${riskFactorsText}\n\n${linkText}`;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement