minor changes

This commit is contained in:
Cyberes 2023-11-06 18:53:12 -07:00
parent 751b3d0a23
commit 923d868c85
4 changed files with 25 additions and 7 deletions

View File

@ -2,13 +2,19 @@
_Scrape tiles from WMTS servers._
You know what I hate? Those godforsaken WMTS servers, perched on their digital thrones, acting like they're the TILE TYRANTS of the universe. They think they can just LOCK UP their precious little tiles and keep me from doing my THING? HA!
You know what I hate? Those godforsaken WMTS servers, perched on their digital thrones, acting like they're the TILE
TYRANTS of the universe. They think they can just LOCK UP their precious little tiles and keep me from doing my THING?
HA!
No more will these WMTS servers shroud their CRAPPY-ASS tiles in mystery. I'm coming for your DATA, you binary BASTARDS, and there's not a SINGLE 1 or 0 you can throw at me that will stop my CHARGE.
No more will these WMTS servers shroud their CRAPPY-ASS tiles in mystery. I'm coming for your DATA, you binary BASTARDS,
and there's not a SINGLE 1 or 0 you can throw at me that will stop my CHARGE.
You think your firewalls and security mumbo-jumbo can keep me at bay? THINK AGAIN. I'll slice through your defenses like a HOT PIZZA through COLD BUTTER. I'll have your DATA, and there's absolutely NOTHING, I repeat, NOTHING you can do to STOP ME.
You think your firewalls and security mumbo-jumbo can keep me at bay? THINK AGAIN. I'll slice through your defenses like
a HOT PIZZA through COLD BUTTER. I'll have your DATA, and there's absolutely NOTHING, I repeat, NOTHING you can do to
STOP ME.
So, buckle up, WMTS servers. Your reign of TILE TERROR is about to CRASH AND BURN. I'm coming for your DATA, and I'm bringing a whole lot of CHAOS with me.
So, buckle up, WMTS servers. Your reign of TILE TERROR is about to CRASH AND BURN. I'm coming for your DATA, and I'm
bringing a whole lot of CHAOS with me.
### Install
@ -29,9 +35,12 @@ python3 exfiltrate.py \
--threads 30
```
Building the GeoTIFF will take dozens of gigs of memory for any significant extent! For example, a 21 mile extent
required about 400GB of memory. You can use swap for this, but don't expect it to be very quick if you go this route.
### ArcGIS
???
TODO
### Credits

View File

@ -1,6 +1,7 @@
import random
from pathlib import Path
import PIL
from PIL import Image
@ -20,5 +21,6 @@ def is_png(file_path):
try:
img = Image.open(file_path)
return img.format == 'PNG'
except:
except PIL.UnidentifiedImageError as e:
# tqdm.write(str(e))
return False

View File

@ -23,7 +23,7 @@ def download_tile(task):
if not is_png(output_path):
# Delete the file and try again.
del_path(output_path)
tqdm.write(f'{output_path} is not a PNG, deleting and retrying...')
tqdm.write(f'cannot identify image file: "{output_path}", deleting and retrying...')
else:
return row, col, 'exist'
tile_url = f"{base_url}/{row}/{col}".replace('//', '/').replace(':/', '://')

7
test.sh Normal file
View File

@ -0,0 +1,7 @@
venv/bin/python3 exfiltrate.py \
https://wmts.nlsc.gov.tw/wmts/nURBAN/default/EPSG:3857/ \
--zoom 20 \
--referer https://maps.nlsc.gov.tw/ \
--bbox 25.076387 121.68951 25.068282 121.700175 \
--threads 30 \
--output ~/Downloads/wmts-output/