-
Notifications
You must be signed in to change notification settings - Fork 6
/
lib.py
75 lines (48 loc) · 2.74 KB
/
lib.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import scanners
import table
def scan_gmaps(apikey):
headings = ["Api", "Cost", "Poc"]
align = [("^", "<"), ("^", "<"), ("^", "<")]
vulnerable_apis = []
vulnerable_apis = scanners.custom_search(apikey, vulnerable_apis)
vulnerable_apis = scanners.static_map(apikey, vulnerable_apis)
vulnerable_apis = scanners.street_view(apikey, vulnerable_apis)
vulnerable_apis = scanners.embed_basic(apikey, vulnerable_apis)
vulnerable_apis = scanners.embed_advanced(apikey, vulnerable_apis)
vulnerable_apis = scanners.directions(apikey, vulnerable_apis)
vulnerable_apis = scanners.geocode(apikey, vulnerable_apis)
vulnerable_apis = scanners.distance_matrix(apikey, vulnerable_apis)
vulnerable_apis = scanners.find_place_from_text(apikey, vulnerable_apis)
vulnerable_apis = scanners.autocomplete(apikey, vulnerable_apis)
vulnerable_apis = scanners.elevation(apikey, vulnerable_apis)
vulnerable_apis = scanners.timezone(apikey, vulnerable_apis)
vulnerable_apis = scanners.nearest_roads(apikey, vulnerable_apis)
vulnerable_apis = scanners.geolocation(apikey, vulnerable_apis)
vulnerable_apis = scanners.route_to_traveled(apikey, vulnerable_apis)
vulnerable_apis = scanners.speed_limit_roads(apikey, vulnerable_apis)
vulnerable_apis = scanners.place_details(apikey, vulnerable_apis)
vulnerable_apis = scanners.nearby_search_places(apikey, vulnerable_apis)
vulnerable_apis = scanners.text_search_places(apikey, vulnerable_apis)
vulnerable_apis = scanners.places_photo(apikey, vulnerable_apis)
vulnerable_apis = scanners.playable_locations(apikey, vulnerable_apis)
vulnerable_apis = scanners.fcm_takeover(apikey, vulnerable_apis)
fields = [0, 1, 2]
with open(apikey + ".md", "w+") as f:
table.table(f, vulnerable_apis, fields, headings, align)
print("-------------------------------------------------------------")
print(" Api || Cost")
print("-------------------------------------------------------------")
for i in range(len(vulnerable_apis)):
print(vulnerable_apis[i][0] + " - " + vulnerable_apis[i][1])
print("-------------------------------------------------------------")
print("Reference for up-to-date pricing:")
print("https://cloud.google.com/maps-platform/pricing")
print("https://developers.google.com/maps/billing/gmp-billing")
jsapi = input(
"Do you want to conduct tests for Javascript API? (Will need manual confirmation + file creation) (Y/N)"
)
if jsapi == "Y" or jsapi == "y":
scanners.js_test(apikey)
print("Operation is over. Thanks for using GoogleMapsAPIScanner!")
print("")
print("https://github.com/Fricciolosa-Red-Team/GoogleMapsApiScanner")