Finish Hotfix-1
This commit is contained in:
@@ -12,15 +12,15 @@ class CheckWeb
|
||||
|
||||
public function onWorkerStart()
|
||||
{
|
||||
if (getenv('ENVIRONMENT') === 'master') {
|
||||
new Crontab('0 */10 * * * *', function(){
|
||||
$result = $this->tocurl('https://magicbridgeauto.com');
|
||||
if (!preg_match('/magicbridgeauto/', $result['body'])) {
|
||||
flg("【magicbridgeauto】疑似被篡改");
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
// if (getenv('ENVIRONMENT') === 'master') {
|
||||
// new Crontab('0 */10 * * * *', function(){
|
||||
// $result = $this->tocurl('https://magicbridgeauto.com');
|
||||
// if (!preg_match('/magicbridgeauto/', $result['body'])) {
|
||||
// flg("【magicbridgeauto】疑似被篡改");
|
||||
// }
|
||||
// return true;
|
||||
// });
|
||||
// }
|
||||
|
||||
new Crontab('*/50 * * * * *', function(){
|
||||
$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)
|
||||
{
|
||||
$ch = curl_init();
|
||||
|
||||
Reference in New Issue
Block a user