forked from dwisiswant0/apkleaks
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cli.py
44 lines (35 loc) · 848 Bytes
/
cli.py
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
38
39
40
41
42
43
44
#!/usr/bin/env python3
import logging
import click
from apk_scanner.scan import Scan
from apk_scanner.api import API
@click.group()
def apk_scanner_cli():
pass
@apk_scanner_cli.command()
def init():
try:
scan = Scan()
scan.initalization()
print("Initalization done!")
except:
logging.exception('Error running apk-scanner')
logging.disable(logging.CRITICAL)
@apk_scanner_cli.command()
def start_scan():
try:
scan = Scan()
scan.start_scan()
except:
logging.exception('Error running apk-scanner')
logging.disable(logging.CRITICAL)
@apk_scanner_cli.command()
def idle():
while True:
pass
@apk_scanner_cli.command()
def do_nothing():
pass
cli = click.CommandCollection(sources=[apk_scanner_cli])
if __name__ == '__main__':
cli()