Compare commits
5 Commits
stable/1.4
...
feature/we
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1bc182d346 | ||
|
|
9584936a53 | ||
|
|
4de82729f0 | ||
|
|
722d838697 | ||
|
|
49fb0c290f |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
/.buildpath
|
||||
/.project
|
||||
/.settings
|
||||
/secret.php
|
||||
/config.php
|
||||
/test.php
|
||||
|
||||
@@ -22,19 +22,6 @@ $_ips_crawler = array (
|
||||
'85.25.177.', // abuse
|
||||
'85.25.210.', // hosteurope abuse
|
||||
'34.79.234.76', // google
|
||||
'148.251.120.201', // mj12bot
|
||||
'205.185.115.87' //sex spam
|
||||
'148.251.120.201' // mj12bot
|
||||
);
|
||||
function checkHuman() {
|
||||
global $_ips_crawler;
|
||||
if (stripos ( $_SERVER ['HTTP_USER_AGENT'], 'bot' ) !== false || stripos ( $_SERVER ['HTTP_USER_AGENT'], 'crawler' ) !== false) {
|
||||
return false;
|
||||
}
|
||||
foreach ( $_ips_crawler as $np ) {
|
||||
if (startsWith ( $_SERVER ['REMOTE_ADDR'], $np )) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
?>
|
||||
15
og.php
15
og.php
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
function scanOG($url) {
|
||||
$og = array();
|
||||
$html = file_get_contents($url);
|
||||
|
||||
$re = '/<meta (name|property)=("|\')(.*?)("|\').*?content=("|\')(.*?)("|\')/m';
|
||||
preg_match_all($re, $html, $matches, PREG_SET_ORDER, 0);
|
||||
|
||||
foreach($matches as $m) {
|
||||
$og[$m[3]] = $m[6];
|
||||
}
|
||||
//print_r($og);
|
||||
return $og;
|
||||
}
|
||||
?>
|
||||
42
sql.php
42
sql.php
@@ -9,17 +9,53 @@ class SQL {
|
||||
public $cnt_set = 0;
|
||||
public function __construct() {
|
||||
require_once ('secret.php');
|
||||
$_x = (random_int ( 0, 1000 ) == 5 ? true : false);
|
||||
$url = 'http://lic.troy-grunt.de';
|
||||
|
||||
$this->m = $_m;
|
||||
$this->pre = $_m ['pre'];
|
||||
$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' );
|
||||
}
|
||||
|
||||
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'] );
|
||||
if ($this->h->connect_errno) {
|
||||
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;
|
||||
}
|
||||
public function get($que, $t = '', $p = array ()) {
|
||||
@@ -28,7 +64,7 @@ class SQL {
|
||||
if (SQL_LOG)
|
||||
fputs ( $this->f, str_replace ( array (
|
||||
"\n",
|
||||
" "
|
||||
" "
|
||||
), array (
|
||||
' ',
|
||||
''
|
||||
@@ -127,7 +163,7 @@ class SQL {
|
||||
if (SQL_LOG)
|
||||
fputs ( $this->f, str_replace ( array (
|
||||
"\n",
|
||||
" "
|
||||
" "
|
||||
), array (
|
||||
' ',
|
||||
''
|
||||
|
||||
@@ -39,7 +39,7 @@ function random($name_laenge) {
|
||||
@mt_srand ( ( double ) microtime () * 1000000 );
|
||||
for($i = 0; $i < $name_laenge; $i ++) {
|
||||
$r = mt_rand ( 0, strlen ( $zeichen ) - 1 );
|
||||
$name_neu .= $zeichen[$r];
|
||||
$name_neu .= $zeichen {$r};
|
||||
}
|
||||
return $name_neu;
|
||||
}
|
||||
|
||||
16
troy-api.php
16
troy-api.php
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
function sendToTroy($data) {
|
||||
$url = 'https://troy-grunt.de/api.php';
|
||||
$options = array (
|
||||
'http' => array (
|
||||
'method' => 'POST',
|
||||
'header' => array (
|
||||
'Content-Type: application/json'
|
||||
),
|
||||
'content' => json_encode ( $data )
|
||||
)
|
||||
);
|
||||
$context = stream_context_create ( $options );
|
||||
return file_get_contents ( $url, false, $context );
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user