惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
T
Tenable Blog
Project Zero
Project Zero
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
S
Schneier on Security
Scott Helme
Scott Helme
S
Securelist
Know Your Adversary
Know Your Adversary
Vercel News
Vercel News
IT之家
IT之家
V
V2EX
F
Fortinet All Blogs
Simon Willison's Weblog
Simon Willison's Weblog
K
Kaspersky official blog
博客园_首页
T
Tailwind CSS Blog
The GitHub Blog
The GitHub Blog
Spread Privacy
Spread Privacy
Microsoft Security Blog
Microsoft Security Blog
Cisco Talos Blog
Cisco Talos Blog
The Register - Security
The Register - Security
有赞技术团队
有赞技术团队
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
L
LINUX DO - 热门话题
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CXSECURITY Database RSS Feed - CXSecurity.com
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Threat Research - Cisco Blogs
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy & Cybersecurity Law Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CERT Recently Published Vulnerability Notes
S
SegmentFault 最新的问题
AWS News Blog
AWS News Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
P
Proofpoint News Feed
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost

博客园 - CrossBug

fiddler右键集成生成python requests请求代码 python3.12 源码静态编译解决AttributeError: module 'sys' has no attribute 'winver' 随便存一下 不想跟上时间的步伐 pytesseract 修改源码后也报错f"{tesseract_cmd} is not installed or it's not in your PATH."解决方法 解决Can't open /usr/lib/grub/update-grub_lib 活了 世界无我 markdown_test 关于mimikatz在webshell运行 用户中心 - 博客园 用户中心 - 博客园 关于sqlmap常用 思科设备各级密码: 关于时钟频率 Error when connecting to the GNS3 server: Cannot connect to http://127.0.0.1:3080. Please check if GNS3 is allowed in your antivirus and firewall. And that server version is 2.1.8. GNS3 Could桥接本地网卡报错:unable to create NIO Ethernet for bridge ' Error opening adapter: centos安装GNS3 GNS3 IOU VM
可用性自动化V3
CrossBug · 2018-07-29 · via 博客园 - CrossBug
#! /usr/bin/env python
# coding=utf-8
import requests
import datetime
import json
import ssl
import time

today = datetime.date.today()
timenow = datetime.datetime.now()


inputcookie=raw_input('Enter Cookie:')
cookie='PHPSESSID='+inputcookie
def get_json():  # 获取事件中心第一条数据
    url = 'http://yunying.jiance.360.net/Statistics/getEventListPages?page=1&limit=5&start_time=%s+08%%3A30&end_time=%s+20%%3A30&status=3&type=monitor&_=0_153256687554390904' % (today, today)
    headers = {
        "Host": "yunying.jiance.360.net",
        "Accept": "application/json, text/javascript, */*; q=0.01",
        "Accept-Language": "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2",
        "Referer": "http://yunying.jiance.360.net/",
        "X-Requested-With": "XMLHttpRequest",
        "Cookie": cookie,
        "Connection": "keep-alive"
    }
    r = requests.get(url, headers=headers)
    json_data = r.content
    sf = open('getEventListPages.json', 'wb')
    sf.write(json_data)
    sf.close()
def getHtml():
    try:
        url = affected_url
        data = requests.get(url,timeout=3,verify=False)
        status = data.status_code  # 取网站状态码
        forstatus=str(status)
        if '200' in forstatus:
            timenow = datetime.datetime.now()
            print 'Time:',timenow,'网站正常访问,更新状态为【已修复】'
            send_monitorRecover(urlid)
        else:
            print 'Time:',timenow,'状态码为:', status, "【不进行处理】"
    except Exception, e:
        print "未知错误"
def send_monitorRecover(urlid):  # 发送已修复包
    url = 'http://yunying.jiance.360.net/Statistics/monitorRecover'
    payload = {"id": "%s" % urlid}
    headers = {
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0",
        "Host": "yunying.jiance.360.net",
        "Accept": "application/json, text/javascript, */*; q=0.01",
        "Accept-Language": "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2",
        "Accept-Encoding": "gzip, deflate",
        "Referer": "http://yunying.jiance.360.net/",
        "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
        "X-Requested-With": "XMLHttpRequest",
        "Content-Length": "12",
        "Cookie": cookie,
        "Connection": "keep-alive"
    }
    r = requests.post(url, data=payload, headers=headers)
    if '64cd' in r.text:
        print '当前时间:',timenow,'[已修复]'
    else:
        print '当前时间:',timenow,'[未成功]'



while True:
    getjsondata = get_json()
    filename = 'getEventListPages.json'
    with open(filename) as f:
        json_data = json.load(f)
    for i in range(5):
        affected_url = json_data["data"]["list"][i]["affected_url"]
        urlid = json_data["data"]["list"][i]["id"]
        print 'URL:%s ID:%s' % (affected_url, urlid)
        time.sleep(3)
        getHtml()