Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

me agian sorry to disturb pcscd pyscard pcsc issue #139

Closed
beginnerslvl opened this issue Jun 20, 2022 · 1 comment
Closed

me agian sorry to disturb pcscd pyscard pcsc issue #139

beginnerslvl opened this issue Jun 20, 2022 · 1 comment

Comments

@beginnerslvl
Copy link

Versions

  • acr122u
  • /usr/sbin/pcscd --version
    pcsc-lite version 1.9.8.
    Copyright (C) 1999-2002 by David Corcoran [email protected].
    Copyright (C) 2001-2022 by Ludovic Rousseau [email protected].
    Copyright (C) 2003-2004 by Damien Sauveron [email protected].
    Report bugs to [email protected].
    Enabled features: Linux x86_64-pc-linux-gnu libsystemd serial usb libudev usbdropdir=/usr/lib/pcsc/drivers ipcdir=/run/pcscd filter configdir=/etc/reader.conf.d
    MAX_READERNAME: 128, PCSCLITE_MAX_READERS_CONTEXTS: 16

Platform

  • kali linux
  • Smart card middleware name and version
  • Smart card reader manufacturer name and reader model name
  • Smart card name

Issue

  • import smartcard by python to use that utility ?
  • pcsc_scan reads my card but doesnt shows it?

Log

Then you shall generate a complete log (do not truncate it).

  • If you need to enter the smart card PIN to reproduce the problem then
    con
    log.txt

PLEASE HELP ME ONCE I JUST WANT TO USE THE SMART CARD UTILITY

python2
Python 2.7.18 (default, Mar 28 2022, 20:47:09)
[GCC 11.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import smartcard
Traceback (most recent call last):
File "", line 1, in
File "smartcard/init.py", line 29, in
from smartcard.System import listReaders
File "smartcard/System.py", line 27, in
import smartcard.reader.ReaderFactory
File "smartcard/reader/ReaderFactory.py", line 34, in
from smartcard.pcsc.PCSCReader import PCSCReader
File "smartcard/pcsc/PCSCReader.py", line 27, in
from smartcard.pcsc.PCSCContext import PCSCContext
File "smartcard/pcsc/PCSCContext.py", line 27, in
from smartcard.scard import *
File "smartcard/scard/init.py", line 1, in
from smartcard.scard.scard import *
File "smartcard/scard/scard.py", line 114, in
from . import _scard
ImportError: cannot import name _scard

lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 072f:2200 Advanced Card Systems, Ltd ACR122U
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

nfc-list
nfc-list uses libnfc 1.8.0
NFC device: ACS / ACR122U PICC Interface opened
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed

nfc-scan-device -v
nfc-scan-device uses libnfc 1.8.0
1 NFC device(s) found:

  • ACS / ACR122U PICC Interface:
    acr122_usb:001:003
    chip: PN532 v1.6
    initator mode modulations: ISO/IEC 14443A (424 kbps, 212 kbps, 106 kbps), FeliCa (424 kbps, 212 kbps), ISO/IEC 14443-4B (106 kbps), ISO/IEC 14443-4B' (106 kbps), ISO/IEC 14443-2B ST SRx (106 kbps), ISO/IEC 14443-2B ASK CTx (106 kbps), ISO/IEC 14443-2B-3B iClass (Picopass) (106 kbps), Innovision Jewel (106 kbps), Thinfilm NFC Barcode (106 kbps), D.E.P. (424 kbps, 212 kbps, 106 kbps)
    target mode modulations: ISO/IEC 14443A (424 kbps, 212 kbps, 106 kbps), FeliCa (424 kbps, 212 kbps), D.E.P. (424 kbps, 212 kbps, 106 kbps)

if i run nfc-list and put a nfc card on it

nfc-list -v
nfc-list uses libnfc 1.8.0
NFC device: ACS / ACR122U PICC Interface opened
1 ISO14443A passive target(s) found:
ISO/IEC 14443A (106 kbps) target:
ATQA (SENS_RES): 00 04

  • UID size: single
  • bit frame anticollision supported
    UID (NFCID1): f7 76 c9 cb
    SAK (SEL_RES): 08
  • Not compliant with ISO/IEC 14443-4
  • Not compliant with ISO/IEC 18092

Fingerprinting based on MIFARE type Identification Procedure:

  • MIFARE Classic 1K
  • MIFARE Plus (4 Byte UID or 4 Byte RID) 2K, Security level 1
  • SmartMX with MIFARE 1K emulation
    Other possible matches based on ATQA & SAK values:

0 Felica (212 kbps) passive target(s) found.

0 Felica (424 kbps) passive target(s) found.

0 ISO14443B passive target(s) found.

error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
error libnfc.driver.acr122_usb Command Code verification failed
0 ISO14443A-2 NFC Barcode passive target(s) found.

error libnfc.driver.acr122_usb Command Code verification failed

it reads it

if i run pcscd

● pcscd.service - PC/SC Smart Card Daemon
Loaded: loaded (/lib/systemd/system/pcscd.service; indirect; vendor preset: disabled)
Active: active (running) since Mon 2022-06-20 05:27:50 EDT; 3s ago
TriggeredBy: ● pcscd.socket
Docs: man:pcscd(8)
Main PID: 4133 (pcscd)
Tasks: 3 (limit: 5704)
Memory: 820.0K
CPU: 7ms
CGroup: /system.slice/pcscd.service
└─4133 /usr/sbin/pcscd --foreground --auto-exit

Jun 20 05:27:50 kali systemd[1]: Started PC/SC Smart Card Daemon.
Jun 20 05:27:53 kali pcscd[4133]: 00000000 ccid_usb.c:993:ReadUSB() read failed (1/3): LIBUSB_ERROR_TIMEOUT
Jun 20 05:27:53 kali pcscd[4133]: 00102157 ccid_usb.c:993:ReadUSB() read failed (1/3): LIBUSB_ERROR_TIMEOUT

@LudovicRousseau
Copy link
Owner

Jun 20 05:27:53 kali pcscd[4133]: 00000000 ccid_usb.c:993:ReadUSB() read failed (1/3): LIBUSB_ERROR_TIMEOUT

It looks like you have a problem with your reader.
I suggest to use the acsccid driver https://github.com/acshk/acsccid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants