Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Set URL - Import of CSV data not working as hoped
- $url = "http://www.tenable.com/plugins/index.php?view=single&id=" + ${ Import-csv c:\users\user\input.csv -Header id }
- $cve = Invoke-WebRequest -URI "$url"
- # Extract data. When $url set manually to valid link, it pulls a CVE number out but not the highest number one. Also do not know how to output this to a new column on the input csv (or alternatively a copy of it)
- $cve.AllElements | Where-Object {$_.innerhtml -like "*CVE-*"} | Sort-Object { $_.InnerHtml.Length } | Select-Object InnerText -First 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement