移除网站篡改检查
This commit is contained in:
@@ -12,15 +12,15 @@ class CheckWeb
|
|||||||
|
|
||||||
public function onWorkerStart()
|
public function onWorkerStart()
|
||||||
{
|
{
|
||||||
if (getenv('ENVIRONMENT') === 'master') {
|
// if (getenv('ENVIRONMENT') === 'master') {
|
||||||
new Crontab('0 */10 * * * *', function(){
|
// new Crontab('0 */10 * * * *', function(){
|
||||||
$result = $this->tocurl('https://magicbridgeauto.com');
|
// $result = $this->tocurl('https://magicbridgeauto.com');
|
||||||
if (!preg_match('/magicbridgeauto/', $result['body'])) {
|
// if (!preg_match('/magicbridgeauto/', $result['body'])) {
|
||||||
flg("【magicbridgeauto】疑似被篡改");
|
// flg("【magicbridgeauto】疑似被篡改");
|
||||||
}
|
// }
|
||||||
return true;
|
// return true;
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
new Crontab('*/50 * * * * *', function(){
|
new Crontab('*/50 * * * * *', function(){
|
||||||
$userIds = User::where('status', 1)->pluck('id')->toArray();
|
$userIds = User::where('status', 1)->pluck('id')->toArray();
|
||||||
@@ -36,18 +36,6 @@ class CheckWeb
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function check()
|
|
||||||
{
|
|
||||||
$result = $this->tocurl('https://magicbridgeauto.com');
|
|
||||||
if (!preg_match('/magicbridgeauto/', $result['body'])) {
|
|
||||||
// flg("【magicbridgeauto】未检查到异常");
|
|
||||||
// } else {
|
|
||||||
flg("【magicbridgeauto】疑似被篡改");
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function tocurl($url, $header = null, $content = null)
|
public function tocurl($url, $header = null, $content = null)
|
||||||
{
|
{
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
|
|||||||
Reference in New Issue
Block a user