2020-11-24-World-Trip-NACTF

Posted on November 24, 2020

World Trip

Solution

We get coordinates in format (longitude, latitude)(longitude, latitude)(long, lat) etc… Here is my Python script I used to get the flag from first characters of every country names:

from geopy.geocoders import Nominatim

gl = Nominatim(user_agent="Some random user agent")

with open("longlat.txt", "r") as f:
  crds = f.read().strip().replace(")(", ")\n(").split("\n")

flag = ""
for crd in crds:
  lat, long = crd.replace("(", "").replace(")", "").split(",")
  lat = float(lat)
  long = float(long)

  loc = gl.reverse([lat, long], language="en")
  flag += loc.raw["address"]["country"][0]

print(flag)

Flag

​ nactf{IHOPEYOUENJOYEDGOINGONTHATREALLYLONGGLOBALTOURIBOFAIQFUSETZOROPZNQTLENFLFSEMOGMHDBEEIZOIUOCGSLCDYMQYIRLBZKNHHFGBPDIVNBUQQYPDCQIAVDYTRFOCESEQUOUUMSKYJOVKVJGMRGNATNIRESHRKHCEDHHZYQRZVOGCHSBAYUBTRU}

Credits

License

CC BY 4.0 WaletSec + everl0stz