zoukankan      html  css  js  c++  java
  • 果然python是直接可以使用requests去请求https站点的,意味着一般的扫描工具可以直接扫描https站点

    # coding:utf-8
    import requests
    # 请求地址
    # url = "https://www.qlchat.com"
    url = "https://www.baidu.com"
    headers = {
            'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chro'
                          'me/53.0.2785.104 Safari/537.36 Core/1.53.2372.400 QQBrowser/9.5.10548.400'
    }
    r = requests.get(url,headers=headers,verify=False)
    print(r.status_code)
    print(r.text)
    

      

    然后修改:

    # coding:utf-8
    import requests
    # 请求地址
    # url = "https://www.qlchat.com"
    url = "https://www.baidu.com/xxx"
    headers = {
            'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chro'
                          'me/53.0.2785.104 Safari/537.36 Core/1.53.2372.400 QQBrowser/9.5.10548.400'
    }
    r = requests.get(url,headers=headers,verify=False)
    print(r.status_code)
    print(r.text)
    
    
    ------返回------
    404
    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>404 Not Found</title>
    </head><body>
    <h1>Not Found</h1>
    <p>The requested URL /xxx was not found on this server.</p>
    </body></html>
    

      

  • 相关阅读:
    栈的操作总结
    C语言复习大纲
    生理周期
    石子合并
    幸运数字
    最长&最短文本
    C++引用
    C++入门
    直角三角形
    思维的囚徒--读书摘记和自己的肤浅解读--2021.1
  • 原文地址:https://www.cnblogs.com/bonelee/p/15100040.html
Copyright © 2011-2022 走看看