This repository has been archived by the owner on Jan 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chipcard now working. Added examples so that the people don't need to…
… figure out by them own how to do these things.
- Loading branch information
Showing
11 changed files
with
370 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import aqbanking | ||
d = aqbanking.chkiban('<iban>') | ||
print(d) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import aqbanking | ||
import getpass | ||
|
||
cachedPasswords = {} | ||
|
||
def callback(domain, prio, msg): | ||
print('[LOG]: %r' % (msg,)) | ||
|
||
# const char *token, const char *pin, GWEN_GUI_PASSWORD_STATUS enumStatus, uint32_t guiid | ||
# 0 = OK | ||
# 1 = Bad | ||
# 2 = Remove | ||
# 4 = Used | ||
# 8 = Unused | ||
# 16 = Unknown | ||
def passwordStatus_cb(token, pin, status): | ||
print('cb_pw_status: %s / <pin censored> / %d' % (token, status)) | ||
if status == 2 or status == 1: | ||
try: | ||
del(cachedPasswords[token]) | ||
except: | ||
pass | ||
elif status == 0: | ||
cachedPasswords[token] = pin | ||
|
||
def password_cb(flags, token, title, text, minLen, maxLen): | ||
# Ask only, if we didn't asked already for a PIN. | ||
try: | ||
return cachedPasswords[token] | ||
except: | ||
plainText = text if '<html>' not in text else text[:text.find('<html>')].replace('\r', '').replace('\n', '') | ||
pin = getpass.getpass('%s: ' % (plainText,)) | ||
return pin | ||
|
||
for f in aqbanking.listacc(): | ||
print('Available configured banks: ', f.bank_name) | ||
|
||
acc = aqbanking.Account(no='100254687', bank_code='35468754') | ||
acc.set_callbackLog(callback) | ||
acc.set_callbackPassword(password_cb) | ||
acc.set_callbackPasswordStatus(passwordStatus_cb) | ||
ret = acc.balance() | ||
if ret is not None: | ||
try: | ||
print(ret[0], ' ', ret[1]) | ||
except TypeError: | ||
pass |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import aqbanking | ||
import getpass | ||
|
||
cachedPasswords = {} | ||
|
||
def callback(domain, prio, msg): | ||
print('[LOG]: %r' % (msg,)) | ||
|
||
# const char *token, const char *pin, GWEN_GUI_PASSWORD_STATUS enumStatus, uint32_t guiid | ||
# 0 = OK | ||
# 1 = Bad | ||
# 2 = Remove | ||
# 4 = Used | ||
# 8 = Unused | ||
# 16 = Unknown | ||
def passwordStatus_cb(token, pin, status): | ||
print('cb_pw_status: %s / <pin censored> / %d' % (token, status)) | ||
if status == 2 or status == 1: | ||
try: | ||
del(cachedPasswords[token]) | ||
except: | ||
pass | ||
elif status == 0: | ||
cachedPasswords[token] = pin | ||
|
||
def password_cb(flags, token, title, text, minLen, maxLen): | ||
# Ask only, if we didn't asked already for a PIN. | ||
try: | ||
return cachedPasswords[token] | ||
except: | ||
plainText = text if '<html>' not in text else text[:text.find('<html>')].replace('\r', '').replace('\n', '') | ||
pin = getpass.getpass('%s: ' % (plainText,)) | ||
return pin | ||
|
||
acc = aqbanking.Account(no='100254687', bank_code='35468754') | ||
acc.set_callbackLog(callback) | ||
acc.set_callbackPassword(password_cb) | ||
acc.set_callbackPasswordStatus(passwordStatus_cb) | ||
ret = acc.availableJobs() | ||
if ret is not None: | ||
try: | ||
print(ret[0]) | ||
except TypeError: | ||
pass |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import aqbanking | ||
import getpass | ||
|
||
cachedPasswords = {} | ||
|
||
def callback(domain, prio, msg): | ||
print('[LOG]: %r' % (msg,)) | ||
|
||
# const char *token, const char *pin, GWEN_GUI_PASSWORD_STATUS enumStatus, uint32_t guiid | ||
# 0 = OK | ||
# 1 = Bad | ||
# 2 = Remove | ||
# 4 = Used | ||
# 8 = Unused | ||
# 16 = Unknown | ||
def passwordStatus_cb(token, pin, status): | ||
print('cb_pw_status: %s / <pin censored> / %d' % (token, status)) | ||
if status == 2 or status == 1: | ||
try: | ||
del(cachedPasswords[token]) | ||
except: | ||
pass | ||
elif status == 0: | ||
cachedPasswords[token] = pin | ||
|
||
def password_cb(flags, token, title, text, minLen, maxLen): | ||
# Ask only, if we didn't asked already for a PIN. | ||
try: | ||
return cachedPasswords[token] | ||
except: | ||
plainText = text if '<html>' not in text else text[:text.find('<html>')].replace('\r', '').replace('\n', '') | ||
pin = getpass.getpass('%s: ' % (plainText,)) | ||
return pin | ||
|
||
accs = aqbanking.listacc() | ||
print(accs) | ||
# you can then access directly the account and can continue on it... | ||
acc = accs[0] | ||
acc.set_callbackLog(callback) | ||
acc.set_callbackPassword(password_cb) | ||
acc.set_callbackPasswordStatus(passwordStatus_cb) |
Oops, something went wrong.