diff --git a/devices/devices.go b/devices/devices.go deleted file mode 100644 index d3d26ad..0000000 --- a/devices/devices.go +++ /dev/null @@ -1,76 +0,0 @@ -package devices - -import ( - "embed" - "fmt" - widevine "github.com/iyear/gowidevine" - "path" -) - -const ( - clientIDFile = "client_id" - privateKeyFile = "private_key" -) - -func init() { - if err := readBuildIns(); err != nil { - panic(err) - } -} - -//go:embed l1 -var l1 embed.FS - -// L1 is a collection of built-in L1 devices. -var L1 []*widevine.Device - -//go:embed l3 -var l3 embed.FS - -// L3 is a collection of built-in L3 devices. -var L3 []*widevine.Device - -func readBuildIns() error { - cdms := map[string]struct { - fs embed.FS - devices *[]*widevine.Device - }{ - "l1": {l1, &L1}, - "l3": {l3, &L3}, - // TODO: add l1 and l2 - } - - for name, cdm := range cdms { - dir, err := cdm.fs.ReadDir(name) - if err != nil { - return fmt.Errorf("read dir: %w", err) - } - - for _, file := range dir { - if !file.IsDir() { - return fmt.Errorf("%s dir should not contain a regular file", name) - } - - base := path.Join(name, file.Name()) - - clientIDData, err := cdm.fs.ReadFile(path.Join(base, clientIDFile)) - if err != nil { - return fmt.Errorf("read client id: %w", err) - } - - privateKeyData, err := cdm.fs.ReadFile(path.Join(base, privateKeyFile)) - if err != nil { - return fmt.Errorf("read private key: %w", err) - } - - device, err := widevine.NewDevice(clientIDData, privateKeyData) - if err != nil { - return fmt.Errorf("to device: %w", err) - } - - *cdm.devices = append(*cdm.devices, device) - } - } - - return nil -} diff --git a/devices/devices_test.go b/devices/devices_test.go deleted file mode 100644 index 7e8486c..0000000 --- a/devices/devices_test.go +++ /dev/null @@ -1,14 +0,0 @@ -package devices - -import ( - "github.com/stretchr/testify/assert" - "testing" -) - -func TestL3Device(t *testing.T) { - assert.Greater(t, len(L1), 0) - t.Logf("L1 Devices: %v", len(L1)) - - assert.Greater(t, len(L3), 0) - t.Logf("L3 Devices: %v", len(L3)) -} diff --git a/devices/l1/23409/client_id b/devices/l1/23409/client_id deleted file mode 100644 index 5daf6ed..0000000 Binary files a/devices/l1/23409/client_id and /dev/null differ diff --git a/devices/l1/23409/private_key b/devices/l1/23409/private_key deleted file mode 100644 index 5d8943a..0000000 --- a/devices/l1/23409/private_key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEAoe60VHXw42mEqVLUiawOIpLeMqxiO3Uttc54dhGKS9qEg4CN -M5jDPVKNyxULchOGCUOO+mem9/T4RXVBVwDSo+03/zKBzwUnOM9k0arkK9OGLfJ0 -kcxn7QK6Ytz/KZLq8NsGuvhkjDgXdF47OlCOXgXvi3MdTfTZC0+p23l7C66fwA8Z -qoA3i+1JzqokCW0ZA+7+D4j6e+wtKXM0P4VwUxRAmf7W/7ValgB8HfZxxzM1kwEB -7vI1VOwNcB4JW3g4XKnLQYGm9Fcf+pOefABfzj63KoOefAJLeM6RAN3FNI2BcDd4 -xCcVDolhu0j8sJ+z2e6kIw9Cy2tg9CRpKKJxMwIDAQABAoIBACaotEiNt6qzIEbE -TZVojB9Y7M8wNGt5eCY1WrDlUxz02DoE0LEGwWW8dbmMFqVvX8qKZHIHmOcNhtAe -RDEfMyqLkZjNWAwycMCxUqJzp/GGmDwT7Bx6rjz5L8I2fHxSZOCHib3NW0PWiFLx -xDYR0UtFI4EpRE++Kqr2o9iP0f5hmlDpq4dam6UcGwBo9Xxpa7F0Ijxps3ucOHeW -CcFhxAaAE7EILh4fT7ng80V33Ij/qRXPfLLHnp6ZWTnkTRm1YCHqNim/JHW5zRkM -unXEhj4pimvQ9Y0DfIX8D6e5KRCAjekAAVOryTZxQUercdjz5Y0JufmaSa6xmb6d -zcEmppECgYEA49ZbUT5RQYoDJ4rhHgDY81NqnsGPjN7y59psmCfWhnxFhkBKRgAU -f8SgW88farZdRXzarGS4QoCZ9jXj3SuT0x+DONccM8dHhjhw8xUNBEkcqkqKRcj9 -SMcIOFiQNHW5sL/DQoGvr2F74wlmidf2Hxt2A1PTKfUMeq0AqmT5sscCgYEAtfLd -f7Fs28R2hJ/vzaCqRFZuQYRMFzuoRwvVy9iqJTqU1gRMOTHvOzQPYJIzPmu1BB9N -mDolPnvV34spVhLbsYe5G9tvuMxsMjSjvbgwMPe0DiliVeKudovOLFpGjLFzE4Td -8BrJY5xStfNafPv5z+TNh8lfc15iKi06xt0+IjUCgYEAvUT2iVBWmjZ3lmLVzmHv -2HvEh+vOP716VsdqDSCTIxebfgJscShh3x5OBNbUh4bFhxNIaYwmUgCZZiKwj6xC -2lFEZnS0lgMHVOYQVq93J8dAy+quYXitiMbm+kAAU8Q0pTM4l0g61VwLWbkWeI5y -hLcAW5VIR4OtgT+03NiTYkMCgYEAlT/uf/OLp06mJa6IaDWV1c7MTIP4Ysp2BClq -K/fDwhwmwNPvrq8OXZMb1gy3akmxx/rhjLCNoo60ZtXhh5CalCsQJhC/uWg+jIRv -mI3BQjm+gitiVa9Hi0itS+aVno1lJyrDX1SpxEMT+drwbDvJtMYr7mm6GYnfnldR -spUDhc0CgYEAtM5KPkQRImPyRjfdwC7iushuOATdE+f2/oMfpaEpuBzjcMVic/1+ -vt1b6xMBi+01Q1VpoKbAPlKjK67y0ATpxdoAwRkJDbrX7+QEblYjr+gFkHib3LkE -5Mr/38mB3H8SbswccuQ0+4cn8/NvwmaTPEBbcBthE9YlegmQ2P9kL34= ------END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/devices/l1/26507/client_id b/devices/l1/26507/client_id deleted file mode 100644 index caa7fff..0000000 Binary files a/devices/l1/26507/client_id and /dev/null differ diff --git a/devices/l1/26507/private_key b/devices/l1/26507/private_key deleted file mode 100644 index 8a12e7f..0000000 --- a/devices/l1/26507/private_key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEogIBAAKCAQEA3sXCE5MBLDdQNPl3I8dcyiHgOpmA+TksOkR+XVt1IMI8TjGo -Oz8aWQfIeoG322kscXv6L66n9tu9HHAN1IxCEO3qG8KSggs1cIf7RlYhtoTp3sM5 -JOqpXBpTEz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1wEkiz9wFbs0UBWzRT4ZhTmP5vOHcZ8eyBgA38PHo -W8TULNB8VtM/SZ/RPj2nuQKBgFWYIB5J/c/6wuiN6VvniC+ZD1JrtCAK5yA3XTVc -yMBHMa2R3rRjwA5bdxuU+x3H0znKVmqQBg2lSbylF6+SQXJigHV1nSbm0zkiRlOK -kP8Ze3AdrWoiDNHuEJJ6tK+JnyhDpPkeMlMbsc26rA6PzSc3HlqZnTjHDNQMl+H6 -fIfJAoGAJ1GI28SBOWplE+/gcuv1wiOON5rIerWgGDKHis/DyBKfpEkNm+i4efJl -GuLea6mEGmz0uUVSSkAWp+zkAhulLLItOghWXhz4xVxMv4ugN/oVkXEQhwubuke3 -wE0kWVco/BWAHi6Da0vAGfajTGas116DYuIrY72MoKQq4V+1PtI= ------END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/devices/l1/9608/client_id b/devices/l1/9608/client_id deleted file mode 100644 index c2ab6f5..0000000 Binary files a/devices/l1/9608/client_id and /dev/null differ diff --git a/devices/l1/9608/private_key b/devices/l1/9608/private_key deleted file mode 100644 index 8731af2..0000000 --- a/devices/l1/9608/private_key +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDR5niz2tWGpibD -36b1RaOVPjQBusDYZK3hPlBVHVB+CMI31Y+wMVn1VjhrkKxi2OsGuMZ7trA9XTII -GLojOBhhQa/6vGFwEdix7nMWiulSFBGXPFgu/25Xudr1OrZB2XtjXt40u28Edcwx -uBcFUngNpEbG3FRxSAesaxaVjoVEARGmEhnvbjlonZ1yWSAylOmEUcbMcUc6TjFl -Wv8TWvcKv6Q/nSfg+gu0HVBFWhHfj0H/rXmRzDnE3psW85vWHcxyJZQbsyJ0eV9N -bfxlCgkxy4fsv1nq0cqvBmJY/xvIaEOVfpQvfFcMlAfZe0L6azD52/C5dgF7Lc4Z -Nc98dEtxAgMBAAECggEAAOwz2XXhDJLk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kRNZUU5F/zYKz9uhPO+JYFHTU3o4QaGN3jqmvRSq4PPMz7Avk5fGFocxaFmI9E -Zn0WmQEZ1fHZLJaq2tZ+pYx/ca5y270YasYByTqQH+2qtj9sc/0pFJUQbgxYhi/A -KavUVF6xIl9IXSsv/6J5siM7dw== ------END PRIVATE KEY----- \ No newline at end of file diff --git a/devices/l3/4464/client_id b/devices/l3/4464/client_id deleted file mode 100644 index 2094913..0000000 Binary files a/devices/l3/4464/client_id and /dev/null differ diff --git a/devices/l3/4464/private_key b/devices/l3/4464/private_key deleted file mode 100644 index 2547bb6..0000000 --- a/devices/l3/4464/private_key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEAs6kpKEO8PRFMmWD/8PGtIxhHnTpO493r9dwWXRkMwWYU+MsX -aQA2wHdLsyglm1HR4GeBMGmdrCAz++/j1LchdX4i2StIdgaFc0zkyqPW2UNK07VM -RdOqT1s+d5Jm9oT4+hRE0H1/6woldYU5KqeBdDAOBsrzvulluNDhF8FplNnwsD2c -fP2lM7puA60qdNQU6fhuK1pZPuvKqsXk1GKutD1sn5M/cDS75cnG6u+CVNgfwhvh -xIxtZUydZuJUqoxLTcQeffqHZ7rMa87yk1369zHZQJ2SUCN8wEZH8vyecwhx5j3a -woiR2E3qTudf4DDC2bJYJlWOryzxvQ7TgFJYgwIDAQABAoIBAQCA/JY7/kWLYnwo -MmgOyLSRWcEwtMgm+RGLtrOnq3Bo+a1c4hKwpCKrE/sZaV12ocuY3Tb3VxyIk6Y+ -3wAnnEM9Y44JdPXVJuFw4mfwxKhf29xBGwzjpQ/FYbD7j/S0UMugYCT3uuK4ENTM -BxX/9bsPe+DWJ6fQDSmnAvBYadgvsQKLm3mQgFsQWV7AhvVLvjG8aUDMq2ilMhli -jWALArB5d3kotE4uZGJOIwT4ok1i+WamKKKNR4jPujJICfFBC9QIEhD/dnKYDKug -xwtZwI66lrXzObXQ7zoq7NWw1Em7naYAh0Uv9UcjjC64iVfWcFmgOxfbbXrElRdV -URH+TD5hAoGBAPPZCIFkhuuGHPahm3yjnHeCfdCE2tlSyy1/UPq9+chjHMBCqlU6 -Z7pZ3XniCj89+DCUA0hPHtaPWfLgDMD0d2aDw5+lQ1fdXEvzx4iyJ3jPcPLCjjhW -gwdXJfKEyuf4HxdOyRl4IGnNp38e1UtbwjRMSOJKsQjOqug/Kjc9bLd/AoGBALyd -Pb1L5sOvdm2Z4dr7nVl9Lq12NFgoZXr0W/AdJDfMHIu3nFYedO0/5asCi289ZvGv -aqoY26fm7bcHQegt+A05vowdHsRjDBCTnC+SaLahgrLFyw2ScSaB64Lc5IFFDRSG -MONgPmBF6jLWzD16DMC8LVQLzBkjFQwy9dQsnwD9AoGAUknXWPL3pNtpQsFemz0L -PDlJA+kRgW0zK3NffH5HoJvxw9+7Y2+GOZjB6LOjCZx7+Mi6Itiwa2+Mxy1coHDf -KjUk+ubmRuxojSkDGNol/9rhHssQ+2oWZY+/OowdfRJ6S39G1dV3+rxv3bImAHxC -mSt1HQhfnb1AZ4eJU4LjATkCgYEAquczhS2cSJ3ZilAP9XNeTTL/s49SuLrJ0RJP -qA9PvPtGtlbF4sawHjVyrnSc0Uvq1n2jAcOKbOXzaY+66V2V0K4M+Tp9oWc6DF8j -+3sHRMyt97z/UynpOwIn2yi6KGPgCUPaUnznqCZRooU9BUts+MrJq8kQw4olTStz -0jAoVyUCgYEAoAsA4M5m8RS4u6sRchbJ3ASzEN/Fi0tycGby114H5icW9vwgHLin -dr4sKzdHOzG9MSyDiLpC1jbIqApKmPUlqk6fBfcLDOzsJep9GGBjx6olMWIxSi1S -kj7Lc3WlTmVpZ3ZdUvPJOJiiXSBs90+idgVRTHryuVUdabrC3FqjMSQ= ------END RSA PRIVATE KEY----- diff --git a/devices/l3/8162/client_id b/devices/l3/8162/client_id deleted file mode 100644 index 0247ad9..0000000 Binary files a/devices/l3/8162/client_id and /dev/null differ diff --git a/devices/l3/8162/private_key b/devices/l3/8162/private_key deleted file mode 100644 index 42b1d9b..0000000 --- a/devices/l3/8162/private_key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAp8g/F1cCfnuC61eCkavrsNFIJuFqSY0vslLGEoKagUMlzl2U -4WalgmJOUjOirocr791y64VtLaBYaj9QOK8yDQ+2qXIMqvzMCh7PtHcM0RxcYjWD -szHWH6iApvdQ9a3hJwWoSp6R8A2r96h76KbU6r29AR/rPvEGYqkT9TnYeXWfuKY4 -zLj7jTamvOPfUba4phCRIRXQL/8rBj6w1MwrfCSWeiykSwdDkTStSTieDyrkBCxW -/C9UrNLx25zpPsBIldVNi6nNDsGIJi6LoFbHfMOnLkQ/qBl17VwU/Wz+uxEDAlB2 -NqZSc/PHjSbP7MJuIqHbUZJyC8DnR2dOriVbXQIDAQABAoIBAAVu3fqMgVkrklHt -07creqAo9sD2wn4lPN31mwWVOX//Q6WK5DvngTgkPmY51wYqlfw+qIg15t/Ewt6V -53jrO2yu2i38f0QeMYepkPV5qwf7Q7nIAwuPc2Azd0I9qfjhEfRoiEpgsVfodjqF -ay9dqT4v7LaxNbXxEIR4KY98UwudYcYTpAa9YwO1LJjUb8WVUVPzQTtHB5sRcstw -YEXqEGhr0pD878pPy+7Ydo/NBdOc6vlmoXx1iDP3enhXqO3sOLjygEP+83LtxWUQ -gs9scMgwjcmrH6uHlhgq6QZ2tKe6t2z164pQ34O7u+VURJQIGcWOqjrwKzMYvqnU -om+yNIUCgYEA5gO2ZHNuXnyrFobYHHlL8BfXtQtyGbfGS/fwJ6dKgXoVlW8W4zcg -/4g4EQqIByYIWlnPgqPsZCMszuHg9mDz8rUSj8G5NUhVaM8THdaF85mgIV0wGW9Y -bgYKLVPeqks8YVgqHQhB4ddHuxLQnnGC0HQdTbRREeilnoZytdy65osCgYEAury0 -ISsEMg4JlZ1ls8nVk00uRUgaf6r5/dqoID5IFb56cDCpJFmZzizKQjkw40POiGu0 -/8jhB3gyNQsW0oQ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