-
-
Save Victormbg/4a8308f367fc5bca62434450ee13c67c to your computer and use it in GitHub Desktop.
Leitor Biométrico CIS com Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import ctypes | |
| FAKE = 0 #NÃO DETECTAR DEDO FALSO | |
| #FAKE = 1; #DETECTAR DEDO FALSO | |
| try: | |
| sdk = ctypes.cdll.LoadLibrary('/usr/lib/libcis_sdk.so') | |
| except: | |
| print("Falha ao importar bibliotecas.") | |
| sys.exit() | |
| r = sdk.CIS_SDK_Biometrico_Iniciar(FAKE) | |
| if(r != 1): | |
| print("ERRO ",r) | |
| sys.exit() | |
| print("Lendo digital: ") | |
| amostra = bytes(b'\x00')*669 | |
| r = sdk.CIS_SDK_Biometrico_LerDigital(amostra) | |
| if(r!=1): | |
| print("ERRO: "+r) | |
| else: | |
| print("Leitura efetuada") | |
| print("------------------------\n") | |
| try: | |
| #RECUPERA DIGITAL CADASTRADA | |
| file = open("NOME.tpl","rb") | |
| print("COMPARANDO DIGITAL...") | |
| tpl = file.read() | |
| file.close() | |
| r = sdk.CIS_SDK_Biometrico_CompararDigital(amostra,tpl) | |
| if(r != 1): | |
| print("Digital não cadastrada") | |
| else: | |
| print("Digital encontrada com sucesso") | |
| except: | |
| #CADASTRA A DIGITAL | |
| print("CADASTRANDO DIGITAL...") | |
| tpl1 = open("NOME.tpl","wb") | |
| tpl1.write(amostra) | |
| tpl1.close() | |
| sdk.CIS_SDK_Biometrico_Finalizar() |
Author
Victormbg
commented
Jun 18, 2020
via email
Que bio.py?
Em qua., 17 de jun. de 2020 às 11:54, Renan <notifications@github.com>
escreveu:
… ***@***.**** commented on this gist.
------------------------------
Olá!
Preciso do libcis_sdk.so para arquiteture x64...
Por acaso vc tem?
Obrigado!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://gist.github.com/4a8308f367fc5bca62434450ee13c67c#gistcomment-3344980>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKL75E655FQ366WXILU4KCDRXDKJFANCNFSM4OAVYCVQ>
.
Onde consigo essa lib?
/usr/lib/libcis_sdk.so
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment