Skip to content

Commit

Permalink
Fixed error in GeolocationAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
joanbono committed Dec 2, 2023
1 parent 5ad3576 commit 9d19e8f
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,29 @@ func validateProxyUrl(proxyUrl string) {
func ApiChecks(api, proxy string, poc bool) {
fmt.Printf("ℹ️ Performing checks for %v\n", yellow.Sprintf(api))

CustomSearchAPI(api, proxy, poc)
StaticMapAPI(api, proxy, poc)
StreetViewAPI(api, proxy, poc)
EmbedBasicAPI(api, proxy, poc)
EmbedAdvancedAPI(api, proxy, poc)
DirectionsAPI(api, proxy, poc)
GeocodeAPI(api, proxy, poc)
DistanceMatrixAPI(api, proxy, poc)
FindPlaceFromTextAPI(api, proxy, poc)
AutocompleteAPI(api, proxy, poc)
ElevationAPI(api, proxy, poc)
TimezoneAPI(api, proxy, poc)
NearestRoadsAPI(api, proxy, poc)
// CustomSearchAPI(api, proxy, poc)
// StaticMapAPI(api, proxy, poc)
// StreetViewAPI(api, proxy, poc)
// EmbedBasicAPI(api, proxy, poc)
// EmbedAdvancedAPI(api, proxy, poc)
// DirectionsAPI(api, proxy, poc)
// GeocodeAPI(api, proxy, poc)
// DistanceMatrixAPI(api, proxy, poc)
// FindPlaceFromTextAPI(api, proxy, poc)
// AutocompleteAPI(api, proxy, poc)
// ElevationAPI(api, proxy, poc)
// TimezoneAPI(api, proxy, poc)
// NearestRoadsAPI(api, proxy, poc)
GeolocationAPI(api, proxy, poc)
RouteToTraveledAPI(api, proxy, poc)
SpeedLimitRoadsAPI(api, proxy, poc)
PlaceDetailsAPI(api, proxy, poc)
NearbySearchPlacesAPI(api, proxy, poc)
TextSearchPlacesAPI(api, proxy, poc)
PlacesPhotoAPI(api, proxy, poc)
PlayableLocationsAPI(api, proxy, poc)
FCMAPI(api, proxy, poc)
QueryAutocompletePlaces(api, proxy, poc)
// RouteToTraveledAPI(api, proxy, poc)
// SpeedLimitRoadsAPI(api, proxy, poc)
// PlaceDetailsAPI(api, proxy, poc)
// NearbySearchPlacesAPI(api, proxy, poc)
// TextSearchPlacesAPI(api, proxy, poc)
// PlacesPhotoAPI(api, proxy, poc)
// PlayableLocationsAPI(api, proxy, poc)
// FCMAPI(api, proxy, poc)
// QueryAutocompletePlaces(api, proxy, poc)

}

Expand Down Expand Up @@ -415,7 +415,7 @@ func GeolocationAPI(api, proxy string, poc bool) {
resp := c.Send()
value := gjson.Get(resp.String(), "error.message")

if (resp.Code() == 403 && strings.Contains(value.String(), "PERMISSION_DENIED")) || (resp.Code() == 400 && value.String() == "INVALID_ARGUMENT") {
if (resp.Code() == 403 && strings.Contains(value.String(), "PERMISSION_DENIED")) || (resp.Code() == 400 && value.String() == "INVALID_ARGUMENT") || (resp.Code() == 403 && strings.Contains(value.String(), "Geolocation API has not been used in project")) {
fmt.Printf("%v\n", green.Sprintf("✅ Not vulnerable to GeolocationAPI"))
} else {
fmt.Printf("%v\n", red.Sprintf("❌ Vulnerable to GeolocationAPI"))
Expand Down

0 comments on commit 9d19e8f

Please sign in to comment.