fetch-dcsl

command module
v0.0.0-...-dee8eb3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2020 License: MIT Imports: 14 Imported by: 0

README

fetch-dcsl

Install

$ go get -v -u github.com/bertrandmt-nflx/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)'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL