Skip to content

Commit 1677af8

Browse files
authored
Merge pull request #3 from gusdcoder/copilot/fix-c40f93e0-f854-4378-ab0a-95c18182ec4c
Remove unused functions from NFC reader scripts
2 parents 1c149e9 + a2c79fa commit 1677af8

File tree

5 files changed

+39
-16
lines changed

5 files changed

+39
-16
lines changed

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Python cache files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# Distribution / packaging
7+
.Python
8+
build/
9+
develop-eggs/
10+
dist/
11+
downloads/
12+
eggs/
13+
.eggs/
14+
lib/
15+
lib64/
16+
parts/
17+
sdist/
18+
var/
19+
wheels/
20+
*.egg-info/
21+
.installed.cfg
22+
*.egg
23+
24+
# Virtual environments
25+
venv/
26+
env/
27+
ENV/
28+
29+
# IDE files
30+
.vscode/
31+
.idea/
32+
*.swp
33+
*.swo
34+
35+
# OS files
36+
.DS_Store
37+
Thumbs.db
14.3 KB
Binary file not shown.
10.7 KB
Binary file not shown.

extrair_nfc.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ def send_apdu(connection, apdu):
1111
print("Response:", toHexString(data).replace(" ", "").lower())
1212
return data, sw1, sw2
1313

14-
def select_app(connection, aid_hex):
15-
aid = toBytes(aid_hex)
16-
apdu = [0x00, 0xA4, 0x04, 0x00, len(aid)] + aid + [0x00]
17-
return send_apdu(connection, apdu)
1814

1915
def parse_tlv(data):
2016
i = 0

extrair_nfc_limpo.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,9 @@ def send_apdu(connection, apdu):
77
data, sw1, sw2 = connection.transmit(apdu)
88
return data, sw1, sw2
99

10-
def select_app(connection, aid_hex):
11-
aid = toBytes(aid_hex)
12-
apdu = [0x00, 0xA4, 0x04, 0x00, len(aid)] + aid + [0x00]
13-
return send_apdu(connection, apdu)
1410

15-
def get_processing_options(connection, pdol=None):
16-
if pdol:
17-
pdol_data = toBytes(pdol)
18-
gpo_data = [0x83, len(pdol_data)] + pdol_data
19-
else:
20-
gpo_data = [0x83, 0x00]
21-
apdu = [0x80, 0xA8, 0x00, 0x00, len(gpo_data)] + gpo_data + [0x00]
22-
return send_apdu(connection, apdu)
11+
12+
2313

2414
def read_record(connection, sfi, record):
2515
apdu = [0x00, 0xB2, record, (sfi << 3) | 4, 0x00]

0 commit comments

Comments
 (0)