本帖最后由 MMMM 于 2022-5-11 23:58 编辑
国际版:site_task(站点任务)
- #coding: utf-8
- import os,sys,time
- os.chdir(‘/www/server/panel/’)
- sys.path.insert(0,"class/")
- import public
- oldEdate = public.readFile(‘data/edate.pl’)
- if not oldEdate: oldEdate = ‘0000-00-00’
- mEdate = time.strftime(‘%Y-%m-%d’,time.localtime())
- edateSites = public.M(‘sites’).where(‘edate>? AND edate<? AND (status=? OR status=?)’,(‘0000-00-00′,mEdate,1,u’正在运行’)).field(‘id,name’).select()
- import panelSite
- siteObject = panelSite.panelSite()
- for site in edateSites:
- get = public.dict_obj()
- get.id = site[‘id’]
- get.name = site[‘name’]
- siteObject.SiteStop(get)
- oldEdate = mEdate
- public.writeFile(‘data/edate.pl’,mEdate)
复制代码
国内版:https://github.com/aaPanel/BaoTa/blob/7.x/script/site_task.py(这里面有个jb毛) https://github.com/aaPanel/BaoTa/blob/7.x/class/public.py(自己看看2861行-2878行到底逻辑是在干嘛!)
?????????实在不行,自己用wireshark抓抓,看看到底有没有异常流量。
|