-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgta.py
More file actions
executable file
·62 lines (59 loc) · 1.71 KB
/
Copy pathgta.py
File metadata and controls
executable file
·62 lines (59 loc) · 1.71 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env python3
##
# @mainpage Grand Theft API Project
#
# @section GTA Description
# Vehicle forensics tool for accessing vehicle data from manufacturers' REST API backends
#
# Copyright (c) 2023 Fachhochschule Münster. All rights reserved.
# @section Classes
#
# Vehicle LogReqs ReqCreator Menu
# Manufacturer classes:
# Mercedes Bmw Audi Ford Hyundai Renault Dacia
#
import sys
import ReqCreator as RC
import Menu as menu
from Mercedes import Mercedes
from Bmw import Bmw
from Audi import Audi
from Ford import Ford
from Hyundai import Hyundai
from Renault import Renault
from Dacia import Dacia
## read whether user opted to use --verbose option or not
if(len(sys.argv)>1 and (sys.argv[1]=='--verbose' or sys.argv[1]=='-v')):
VERBOSE = True
else:
VERBOSE = False
## initialize each manufacturer instance by calling constructor and passing VERBOSE flag
mercedes = Mercedes(VERBOSE)
bmw = Bmw(VERBOSE)
audi = Audi(VERBOSE)
ford = Ford(VERBOSE)
hyundai = Hyundai(VERBOSE)
renault = Renault(VERBOSE)
dacia = Dacia(VERBOSE)
## main loop for the user to choose a manufacturer or exit the program
while True:
menu.print_manufac()
manufac = input("Choose manufacturer : ")
if manufac == '0':
exit(1)
elif manufac == '1':
mercedes = RC.mercedes_requests(mercedes)
elif manufac == '2':
bmw = RC.bmw_requests(bmw)
elif manufac == '3':
audi = RC.audi_requests(audi)
elif manufac == '4':
ford = RC.ford_requests(ford)
elif manufac == '5':
hyundai = RC.hyundai_requests(hyundai)
elif manufac == '6':
renault = RC.renault_request(renault)
elif manufac == '7':
dacia = RC.renault_request(dacia)
else:
print("unknown manufacturer")