-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathitau.py
More file actions
37 lines (29 loc) · 1.05 KB
/
itau.py
File metadata and controls
37 lines (29 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import click
import logging
from client import ItauClient
@click.command()
@click.option('--username', help='Itau Link username (usually identity card from Uruguay)')
@click.option('--password', help='Itau Link weak password')
@click.option('--save-csv', is_flag=True, help='Generate a CSV report for each account. (Saved in current directory)')
@click.option('-v', '--verbose', count=True)
def main(username, password, save_csv, verbose):
if verbose == 0:
log_level = None
elif verbose == 1:
log_level = logging.INFO
elif verbose > 1:
log_level = logging.DEBUG
logging.getLogger('requests').setLevel(logging.WARNING)
logging.getLogger('aiohttp.client').setLevel(logging.ERROR)
if log_level:
logging.basicConfig(
format='%(asctime)s : %(levelname)s : %(message)s',
level=log_level)
client = ItauClient(username, password)
if save_csv:
client.save()
else:
from IPython import embed
embed(display_banner=False)
if __name__ == '__main__':
main()