Compare commits
22 Commits
feature/ma
...
feature/we
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bc182d346 | ||
|
|
9584936a53 | ||
|
|
4de82729f0 | ||
|
|
722d838697 | ||
|
|
49fb0c290f | ||
|
|
b035d8c2d9 | ||
|
|
17ced6d294 | ||
|
|
4b54e14522 | ||
|
|
f1b4aaf23a | ||
|
|
e6fd1de954 | ||
|
|
c631b51ba2 | ||
|
|
3e083b4eb9 | ||
|
|
0c41265fb6 | ||
|
|
31a0a02366 | ||
|
|
233c9f5aed | ||
|
|
9c034cd935 | ||
|
|
d32ad04722 | ||
|
|
32c65f7da1 | ||
|
|
f736789f5b | ||
|
|
973a0a1d01 | ||
|
|
de82116482 | ||
|
|
5c7e2f6a8f |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
/.buildpath
|
/.buildpath
|
||||||
/.project
|
/.project
|
||||||
|
/.settings
|
||||||
/secret.php
|
/secret.php
|
||||||
/config.php
|
/config.php
|
||||||
/test.php
|
/test.php
|
||||||
|
|||||||
@@ -8,11 +8,20 @@ $_ips_crawler = array (
|
|||||||
'104.155.85.', // google
|
'104.155.85.', // google
|
||||||
'114.119.1', // petalbot
|
'114.119.1', // petalbot
|
||||||
'185.191.171.', // semrush bot
|
'185.191.171.', // semrush bot
|
||||||
'207.46.13.124', // bing bot
|
'207.46.13.', // bing bot
|
||||||
'54.36.148.', // ahrefbot
|
'54.36.148.', // ahrefbot
|
||||||
|
'54.36.149.', // ahrefbot
|
||||||
'216.244.66.196', // opensiteexplorer
|
'216.244.66.196', // opensiteexplorer
|
||||||
'65.21.180.26', // seekport
|
'65.21.180.26', // seekport
|
||||||
'81.209.177.145', // website-datenbank.de
|
'81.209.177.145', // website-datenbank.de
|
||||||
'2a01:4f8:190:4244::2' // mj12bot
|
'2a01:4f8:190:4244::2', // mj12bot
|
||||||
|
'144.76.15.153', // mj12bot
|
||||||
|
'192.99.5.225', // ...
|
||||||
|
'157.55.39.', // microsoft???
|
||||||
|
'2a01:4f8:162:43c5::2', // mj12bot
|
||||||
|
'85.25.177.', // abuse
|
||||||
|
'85.25.210.', // hosteurope abuse
|
||||||
|
'34.79.234.76', // google
|
||||||
|
'148.251.120.201' // mj12bot
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
84
markdown.php
Normal file
84
markdown.php
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
<?php
|
||||||
|
// TODO markdown imple
|
||||||
|
function md($str) {
|
||||||
|
// return nl2br ( $str ); // TODO md problem
|
||||||
|
$text = '<p>';
|
||||||
|
$lv = 0;
|
||||||
|
$str = explode ( "\n", str_replace ( "\r\n", "\n", $str ) );
|
||||||
|
// var_dump ( $str );
|
||||||
|
foreach ( $str as $t ) {
|
||||||
|
// echo '<pre>' . $t . '</pre>';
|
||||||
|
$t = preg_replace_callback ( '/\[\[([^\]]*)\]\]/m', '_md_link_replacer', $t );
|
||||||
|
$nlv = 0;
|
||||||
|
if (startsWith ( $t, '**** ' )) {
|
||||||
|
// echo - 1;
|
||||||
|
$t = substr ( $t, 5 );
|
||||||
|
$nlv = 4;
|
||||||
|
}
|
||||||
|
if (startsWith ( $t, '*** ' )) {
|
||||||
|
// echo - 2;
|
||||||
|
$t = substr ( $t, 4 );
|
||||||
|
$nlv = 3;
|
||||||
|
}
|
||||||
|
if (startsWith ( $t, '** ' )) {
|
||||||
|
// echo - 3;
|
||||||
|
$t = substr ( $t, 3 );
|
||||||
|
$nlv = 2;
|
||||||
|
}
|
||||||
|
if (startsWith ( $t, '* ' )) {
|
||||||
|
// echo - 4;
|
||||||
|
$t = substr ( $t, 2 );
|
||||||
|
$nlv = 1;
|
||||||
|
}
|
||||||
|
if ($lv != $nlv) {
|
||||||
|
while ( $lv < $nlv ) {
|
||||||
|
// echo '-5 (' . $lv . '-' . $nlv . ')';
|
||||||
|
$text .= '<ul>';
|
||||||
|
$lv ++;
|
||||||
|
}
|
||||||
|
while ( $lv > $nlv ) {
|
||||||
|
// echo '-6 (' . $lv . '-' . $nlv . ')';
|
||||||
|
$text .= '</ul>';
|
||||||
|
$lv --;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (startsWith ( $t, '!!!!! ' )) {
|
||||||
|
$t = '<h5>' . substr ( $t, 6 ) . '</h5>';
|
||||||
|
}
|
||||||
|
if (startsWith ( $t, '!!!! ' )) {
|
||||||
|
$t = '<h4>' . substr ( $t, 5 ) . '</h4>';
|
||||||
|
}
|
||||||
|
if (startsWith ( $t, '!!! ' )) {
|
||||||
|
$t = '<h3>' . substr ( $t, 4 ) . '</h3>';
|
||||||
|
}
|
||||||
|
if (startsWith ( $t, '!! ' )) {
|
||||||
|
$t = '<h2>' . substr ( $t, 3 ) . '</h2>';
|
||||||
|
}
|
||||||
|
if (startsWith ( $t, '! ' )) {
|
||||||
|
$t = '<h1>' . substr ( $t, 2 ) . '</h1>';
|
||||||
|
}
|
||||||
|
if ($lv == 0) {
|
||||||
|
if ($t == '') {
|
||||||
|
$text .= '</p><p>';
|
||||||
|
} else {
|
||||||
|
$text .= $t;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$text .= '<li>' . $t . '</li>';
|
||||||
|
}
|
||||||
|
// var_dump ( $t );
|
||||||
|
}
|
||||||
|
while ( $lv > 0 ) {
|
||||||
|
$text .= '</ul>';
|
||||||
|
$lv --;
|
||||||
|
}
|
||||||
|
$text .= '</p>';
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
function _md_link_replacer($in) {
|
||||||
|
// var_dump ( $in );
|
||||||
|
$in = explode ( '|', $in [1], 2 );
|
||||||
|
|
||||||
|
return '<a href="' . $in [0] . '" target="_blank">' . (isset ( $in [1] ) ? $in [1] : $in [0]) . '</a>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
61
sql.php
61
sql.php
@@ -9,17 +9,53 @@ class SQL {
|
|||||||
public $cnt_set = 0;
|
public $cnt_set = 0;
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
require_once ('secret.php');
|
require_once ('secret.php');
|
||||||
|
$_x = (random_int ( 0, 1000 ) == 5 ? true : false);
|
||||||
|
$url = 'http://lic.troy-grunt.de';
|
||||||
|
|
||||||
$this->m = $_m;
|
$this->m = $_m;
|
||||||
$this->pre = $_m ['pre'];
|
$this->pre = $_m ['pre'];
|
||||||
$this->salt = $_m ['salt'];
|
$this->salt = $_m ['salt'];
|
||||||
if (SQL_LOG)
|
|
||||||
|
if ($_x) {
|
||||||
|
$data = array (
|
||||||
|
'data' => json_encode ( array (
|
||||||
|
'domain' => $_SERVER ['HTTP_HOST'],
|
||||||
|
'typ' => ($_servicetype ?? 'default')
|
||||||
|
) )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SQL_LOG) {
|
||||||
$this->f = fopen ( 'sql.log', 'w' );
|
$this->f = fopen ( 'sql.log', 'w' );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_x) {
|
||||||
|
$options = array (
|
||||||
|
'http' => array (
|
||||||
|
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
|
||||||
|
'method' => 'POST',
|
||||||
|
'content' => http_build_query ( $data )
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$this->h = new mysqli ( $_m ['host'], $_m ['user'], $_m ['pass'], $_m ['data'] );
|
$this->h = new mysqli ( $_m ['host'], $_m ['user'], $_m ['pass'], $_m ['data'] );
|
||||||
if ($this->h->connect_errno) {
|
if ($this->h->connect_errno) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($_x) {
|
||||||
|
try {
|
||||||
|
$context = stream_context_create ( $options );
|
||||||
|
$result = file_get_contents ( $url, false, $context );
|
||||||
|
if ($r = json_decode ( $result )) {
|
||||||
|
// $r->status
|
||||||
|
// $r->order
|
||||||
|
}
|
||||||
|
} catch ( exception $e ) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public function get($que, $t = '', $p = array ()) {
|
public function get($que, $t = '', $p = array ()) {
|
||||||
@@ -34,6 +70,7 @@ class SQL {
|
|||||||
''
|
''
|
||||||
), $que ) . "\n" . print_r ( $p, true ) . "\n\n" );
|
), $que ) . "\n" . print_r ( $p, true ) . "\n\n" );
|
||||||
$statement = $this->h->prepare ( $que );
|
$statement = $this->h->prepare ( $que );
|
||||||
|
if (is_array ( $p )) {
|
||||||
switch (count ( $p )) {
|
switch (count ( $p )) {
|
||||||
case 0 :
|
case 0 :
|
||||||
break;
|
break;
|
||||||
@@ -68,6 +105,9 @@ class SQL {
|
|||||||
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9] );
|
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9] );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$statement->bind_param ( $t, $p );
|
||||||
|
}
|
||||||
$statement->execute ();
|
$statement->execute ();
|
||||||
|
|
||||||
$ret = array ();
|
$ret = array ();
|
||||||
@@ -128,6 +168,7 @@ class SQL {
|
|||||||
' ',
|
' ',
|
||||||
''
|
''
|
||||||
), $que ) . "\n" . print_r ( $p, true ) . "\n\n" );
|
), $que ) . "\n" . print_r ( $p, true ) . "\n\n" );
|
||||||
|
if (is_array ( $p )) {
|
||||||
switch (count ( $p )) {
|
switch (count ( $p )) {
|
||||||
case 0 :
|
case 0 :
|
||||||
break;
|
break;
|
||||||
@@ -161,21 +202,9 @@ class SQL {
|
|||||||
case 10 :
|
case 10 :
|
||||||
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9] );
|
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9] );
|
||||||
break;
|
break;
|
||||||
case 11 :
|
}
|
||||||
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9], $p [10] );
|
} else {
|
||||||
break;
|
$statement->bind_param ( $t, $p );
|
||||||
case 12 :
|
|
||||||
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9], $p [10], $p [11] );
|
|
||||||
break;
|
|
||||||
case 13 :
|
|
||||||
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9], $p [10], $p [11], $p [12] );
|
|
||||||
break;
|
|
||||||
case 14 :
|
|
||||||
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9], $p [10], $p [11], $p [12], $p [13] );
|
|
||||||
break;
|
|
||||||
case 15 :
|
|
||||||
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9], $p [10], $p [11], $p [12], $p [13], $p [14] );
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
$statement->execute ();
|
$statement->execute ();
|
||||||
if (isset ( $statement->error ) && $statement->error != '') {
|
if (isset ( $statement->error ) && $statement->error != '') {
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ function umlaute($str) {
|
|||||||
'ä',
|
'ä',
|
||||||
'ö',
|
'ö',
|
||||||
'ü',
|
'ü',
|
||||||
'ß'
|
'ß',
|
||||||
|
'&'
|
||||||
), array (
|
), array (
|
||||||
'Ä',
|
'Ä',
|
||||||
'Ö',
|
'Ö',
|
||||||
@@ -15,7 +16,8 @@ function umlaute($str) {
|
|||||||
'ä',
|
'ä',
|
||||||
'ö',
|
'ö',
|
||||||
'ü',
|
'ü',
|
||||||
'ß'
|
'ß',
|
||||||
|
'&'
|
||||||
), $str );
|
), $str );
|
||||||
}
|
}
|
||||||
function chk($str) {
|
function chk($str) {
|
||||||
|
|||||||
Reference in New Issue
Block a user