23 lines
487 B
Bash
Executable file
23 lines
487 B
Bash
Executable file
#!/bin/bash
|
|
|
|
key="<your api key>"
|
|
url="https://api.msrc.microsoft.com"
|
|
apiversion="?api-version=2016-08-01"
|
|
updates="/Updates"
|
|
|
|
#all updates
|
|
curl -H "api-key: ${key}" ${url}${updates}${apiversion}
|
|
|
|
#updates by id
|
|
id=2016-Sep
|
|
#id=CVE-1234-5678
|
|
#id=2016
|
|
curl -H "api-key: ${key}" "${url}${updates}('${id}')${apiversion}"
|
|
|
|
#by id
|
|
cvrfid=2017-Jan
|
|
#cvrfid=CVE-1234-5678
|
|
#cvrfid=2016
|
|
cvrf="/cvrf/"
|
|
|
|
curl -H "Accept: application/json" -H "api-key: ${key}" "${url}${cvrf}${cvrfid}${apiversion}"
|