果然python是直接可以使用requests去请求https站点的,意味着一般的扫描工具可以直接扫描https站点

1
2
3
4
5
6
7
8
9
10
11
12
# 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)

  

 

然后修改:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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>

  

posted @   bonelee  阅读(420)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」
历史上的今天:
2020-08-04 JanusGraph架构——gremlin是提交spark任务计算,数据读写转给后端DB做读写
2017-08-04 elasticsearch如何安全重启节点
2017-08-04 ES等待任务——是master节点上的task任务
点击右上角即可分享
微信分享提示