Skip to content

Instantly share code, notes, and snippets.

# Check about the pyscard issue "Smart Card Resource Manager has shut down" #123,
from importlib.metadata import version
from smartcard.System import readers
from smartcard.CardType import ATRCardType
from smartcard.CardRequest import CardRequest
from smartcard.util import toBytes
from smartcard.Exceptions import CardRequestTimeoutException
// 256R1 - P256
P = 0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF
n = 0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551
a = 0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC
// Also a = -3 % P = P - 3
b = 0x5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B
Gx = 0x6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296
Gy = 0x4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5
@antonio-fr
antonio-fr / PyscardIssue.py
Created June 10, 2021 12:17
PyScard Windows Issue demo
# Demonstration of the issue "Smart Card Resource Manager has shut down",
# appears when disconnecting all readers before reconnect to a card.
from smartcard.System import readers
from smartcard.CardType import ATRCardType
from smartcard.CardRequest import CardRequest
from smartcard.util import toBytes
from smartcard.Exceptions import CardRequestTimeoutException
@antonio-fr
antonio-fr / gist:7bf06a20e8fe3502a22b87690b2828b5
Created January 24, 2020 12:40
Phemex Puzzle 27 digits numbers list
170095077121117271132776625
170095077121117270856415880
271310420053993745792764322
271310420242942958688580052
147377854832783720704518562
147377855021732933600334292
170095077120072511935129005
170095077120018590637450565
109316458838904368534720162
233333918337126958292196692
@antonio-fr
antonio-fr / index.html
Created April 4, 2017 17:45
HTML5 Mandelbrot Set Render
<html>
<head>
<title>Mandelbrot Render</title>
<meta name="viewport" content="width=device-width, initial-scale=0.7">
<LINK rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>
HTML5 Mandelbrot Set Render
</h1>