Thanks to visit codestin.com
Credit goes to github.com

Skip to content

XMYSTERlOUSX/fetch-dcsl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fetch-dcsl

Install

$ go get -v -u github.com/XMYSTERlOUSX/fetch-dcsl

Run

Usage of fetch-dcsl:
  -f	fetch fresh DCSL
  -m	list all manufacturers as CSV
  -s int
    	report on specific system ID

Most of the magic has to do with how the tool spits out bona-fide JSON.

Some tricks:

$ fetch-dcsl -f |
  jq '.certificateStatusList.certificateStatus |
      map(select(.deviceInfo.manufacturer != null) | .deviceInfo.manufacturer |= ascii_downcase)' |
  jq -s 'map({manufacturer: .[].deviceInfo.manufacturer}) |
         group_by(.manufacturer) |
         map ({manufacturer: .[0].manufacturer, count: length}) |
         sort_by(.count)'
$ fetch-dcsl -f |
  jq '.certificateStatusList.certificateStatus |
      map(select(.status == "STATUS_REVOKED"))'
$ fetch-dcsl -f |
  jq '.certificateStatusList.certificateStatus |
      map (select(.deviceInfo.manufacturer != null) |
           .deviceInfo.manufacturer |= ascii_downcase |
           select(.deviceInfo.manufacturer == "netflix")) |
      sort_by(.deviceInfo.systemId)'

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%