Guest User

Untitled

a guest
May 21st, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. from mapbox import Geocoder
  2.  
  3.  
  4. def banner():
  5. return "\n[*] "
  6.  
  7. def mapbox():
  8. API_TOKEN = raw_input("Enter the Mapbox API key here and press enter:\n")
  9. token_type = API_TOKEN[:2]
  10.  
  11. if token_type == "pk":
  12. print "\n[+] Key is Public"
  13. if token_type == "sk":
  14. print "\n[+] Key is Private"
  15.  
  16. geocoder = Geocoder(access_token=API_TOKEN)
  17. response = geocoder.forward('Chester , NJ')
  18. if response.status_code == 200:
  19. print "\n[+] Key is Valid"
  20. elif response.status_code == 401:
  21. print "\n[+] Key is Invalid"
  22. else:
  23. print "\n[-] Check - Unsuccessful"
  24.  
  25. def gcm():
  26. //TODO
  27. pass
  28.  
  29. def appflyer():
  30. //TODO
Add Comment
Please, Sign In to add comment