-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
executable file
·38 lines (34 loc) · 1.35 KB
/
Copy pathmain.py
File metadata and controls
executable file
·38 lines (34 loc) · 1.35 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
38
#!/bin/python
# Este es el archivo principal, el que lleva
# toda la logica de funcionamiento al igual
# que el manejo de errores preciso.
# Tener dos archivos mejora el funcionamiento,
# legibilidad y mas facil para el desarrollador
# seguir mejorandolo
from btc_analizer import parseArgs, btcAnalizer, inspect, btcGraphic, stats, console, errorHandler, detectLib, redColor, whiteColor
def main():
try:
args = parseArgs()
if args.num and all(not i for i in (args.stats, args.inspect, args.graphic)):
btcAnalizer(args.num)
elif args.inspect and all(not i for i in (args.num, args.stats, args.graphic)):
inspect(args.inspect)
elif args.graphic and all(not i for i in (args.num, args.inspect, args.stats)):
btcGraphic(args.graphic)
elif args.stats and all(not i for i in (args.num, args.inspect, args.graphic)):
stats(args.stats)
else:
console.print(
redColor
+ "[-]"
+ whiteColor
+ " Argumentos invalidos. Ej: -n <int> -i <hash> -g <int>"
)
except KeyboardInterrupt:
console.print(
"\n\n" + redColor + "Programa Interrumpido por el usuario." + whiteColor
)
except Exception as e:
errorHandler(e)
if __name__ == "__main__":
main()