Tags: python maps 

Rating:

The challenge is pretty easy, we can already tell from the title and the description that we'll be dealing with google maps. perhaps? the enc.txt file contains different latitudes and longitudes.

The hardest part of this challenge is probably dealing with google maps api. after several attempts I gave up on it and went looking for something else, I ended up using OpenCage API that also offers a python module, Great!

from opencage.geocoder import OpenCageGeocode

key = ""
geocoder = OpenCageGeocode(key=key)

world = eval(open("enc.txt").read())
flag = "nactf{"

for place in world:
    results = geocoder.reverse_geocode(place[0], place[1])
    flag += results[0]["components"]["country"][0]
else:
    flag+="}"
    print(flag)