Last active
May 20, 2025 08:48
-
-
Save john-peterson/8b657d526b0478b1043776bbeeaa9b9f to your computer and use it in GitHub Desktop.
Finland SSL hand shake exception
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python3 | |
# vim:ts=2 | |
from http.server import BaseHTTPRequestHandler, HTTPServer | |
class S(BaseHTTPRequestHandler): | |
def _set_headers(self): | |
self.send_response(200) | |
self.send_header('content-type', 'image/png') | |
self.end_headers() | |
def do_GET(self): | |
self._set_headers() | |
arg = self.path.split("/") | |
# print(arg) | |
z = arg[1] | |
y = arg[2] | |
x = arg[3] | |
import requests | |
url = "https://karttamoottori.maanmittauslaitos.fi/maasto/wmts/1.0.0/maastokartta/default/ETRS-TM35FIN/{}/{}/{}.png".format(z,y,x); | |
referer = "https://asiointi.maanmittauslaitos.fi/karttapaikka" | |
print(url) | |
h={'referer': referer} | |
r = requests.get(url, stream=True, headers=h) | |
self.wfile.write(r.content) | |
if __name__ == "__main__": | |
HTTPServer(("", 8080), S).serve_forever() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logcat -d|ack psyberia | |
logcat -d|ack System.out | |
cd "/sdcard/Android/media/net.psyberia.offlinemaps/OfflineMaps Backups" | |
vim on*/COM.26.AQX | |
<server><![CDATA[http://localhost:8080/{$z}/{$y}/{$x}]]></server> | |
cp Offline* a.zip | |
zip a on-demand-maps-EkhaEo/COM.129.AQX | |
cp a.zip Offline... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment