summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/php/api.php5
-rw-r--r--api/php/b.txt2
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)