diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2021-09-24 14:58:27 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2021-09-24 14:58:27 +0200 |
commit | 5af70b7dc13e63d85bcba34da628c6ced694602d (patch) | |
tree | 015a0fd0ca88697e89c23ecf3c13eca200a55643 /api | |
parent | dodal sijanec.o (diff) | |
download | sijanec.eu-5af70b7dc13e63d85bcba34da628c6ced694602d.tar sijanec.eu-5af70b7dc13e63d85bcba34da628c6ced694602d.tar.gz sijanec.eu-5af70b7dc13e63d85bcba34da628c6ced694602d.tar.bz2 sijanec.eu-5af70b7dc13e63d85bcba34da628c6ced694602d.tar.lz sijanec.eu-5af70b7dc13e63d85bcba34da628c6ced694602d.tar.xz sijanec.eu-5af70b7dc13e63d85bcba34da628c6ced694602d.tar.zst sijanec.eu-5af70b7dc13e63d85bcba34da628c6ced694602d.zip |
Diffstat (limited to 'api')
-rw-r--r-- | api/php/api.php | 5 | ||||
-rw-r--r-- | api/php/b.txt | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/api/php/api.php b/api/php/api.php index 6fb329e..9033787 100644 --- a/api/php/api.php +++ b/api/php/api.php @@ -28,6 +28,11 @@ header("Content-Type: text/plain"); exit("400: Napaka. Izgleda, kakor da avtomatizirate zahteve. Koda napake: jebise"); } + if (strpos(@file_get_contents("b.txt"), "." . explode(".", $_SERVER["REMOTE_ADDR"])[0] . ".") !== FALSE) { + http_response_code(400); + header("Content-Type: text/plain"); + exit("400: Napaka. Izgleda, da ste na črnem seznamu. Kontaktirajte me."); + } $sporocilo = $_REQUEST['message']; $parent = $_REQUEST['parent']; if (strlen($sporocilo) > 1024 || strlen($parent) > 7+1+256+1+19 || strlen($vzdevek) > 256) { diff --git a/api/php/b.txt b/api/php/b.txt new file mode 100644 index 0000000..6d6b566 --- /dev/null +++ b/api/php/b.txt @@ -0,0 +1,2 @@ +.180. # 180 96 0 0 - 180 127 255 255: Chinanet Jiangsu Province Network (180 110 150 222) +.54. # 54 39 0 0/16: OVH Hosting, Inc. (HO-2) (54 39 29 64) |