daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest May 31st, 2016 18 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Set URL - Import of CSV data not working as hoped
  2. $url = "http://www.tenable.com/plugins/index.php?view=single&id=" + ${ Import-csv c:\users\user\input.csv -Header id }
  3.  
  4. $cve = Invoke-WebRequest -URI "$url"
  5.  
  6. # 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)
  7. $cve.AllElements | Where-Object {$_.innerhtml -like "*CVE-*"} | Sort-Object { $_.InnerHtml.Length } | Select-Object InnerText -First 1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top