如何使用 Python 向 OpenStage 40 电话发送 DLS ContactMe 请求
此代码片段使用 Python 向 IP 为 192.168.178.245 的 OpenStage 40 电话发送 ContactMe DLS 配置请求。然后电话将使用 HTTPS 在端口 18443 上联系 192.168.178.10。默认情况下(即如果 OpenStage 40 不在安全模式下,证书不会被验证 - 任何证书都可以!)
openstage_contactme.py
import requests
response = requests.post("http://192.168.178.245:8085/contact_dls.html/ContactDLS", data={
"ContactMe": True,
"dls_ip_addr": "192.168.178.10",
"dls_ip_port": 18443
})
# 响应将是 <Response [204]> 即无内容注意 dls_ip_addr 也可以是主机名!
Check out similar posts by category:
Networking, Python
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow