Skip to content

Instantly share code, notes, and snippets.

View 73VW's full-sized avatar
💭
I may be slow to respond.

Maël Pedretti 73VW

💭
I may be slow to respond.
View GitHub Profile
@73VW
73VW / jwtRS256.sh
Created February 9, 2022 15:13 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
import serial
from serial.tools import list_ports
serials = list(list_ports.comports())
attrs = ['device', 'name', 'description', 'hwid', 'vid', 'pid',
'serial_number', 'location', 'manufacturer', 'product', 'interface']
for s in serials:
[print(attr + ": " + str(getattr(s, attr))) for attr in attrs]
print("\n")