### Created by Martin ### cls; if(!([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList "-File `"$($MyInvocation.MyCommand.Path)`" `"$($MyInvocation.MyCommand.UnboundArguments)`"" Exit } echo "Current Policy Type:" Get-ExecutionPolicy -Verbose echo "" echo "Setting Policy Type To RemoteSigned" Set-ExecutionPolicy RemoteSigned -Force -Verbose echo "" echo "Updated Policy Type:" Get-ExecutionPolicy -Verbose echo "" # Define the input file and output file paths $cveFilePath = "C:\golive\CVE.txt" $outputFilePath = "C:\golive\CVE_OUTPUT.html" # Read the CVE list from the file $cveList = Get-Content -Path $cveFilePath -Raw $cveArray = $cveList -split ",\s*" # Initialize an array to hold the HTML rows $htmlRows = @() # Loop through each CVE in the list foreach ($cve in $cveArray) { # Trim any leading/trailing whitespace $cve = $cve.Trim() # Construct the URL for the CVE $url_mitre = "https://cve.mitre.org/cgi-bin/cvename.cgi?name=$cve" $url_tenable = "https://www.tenable.com/cve/$cve/plugins" # Fetch the web page content from MITRE echo "Fetching data for $cve" try { $response = Invoke-WebRequest -Uri $url_mitre -UseBasicParsing $content = $response.Content # Extract the description using a regular expression if ($content -match '
| CVE | Description | Manufacturer | Name | Product |
|---|