当前位置:网站首页>Win32 API 访问路由的加密网页
Win32 API 访问路由的加密网页
2022-07-04 15:44:00 【全栈程序员站长】
通过WinHttp的WinHttpSetCredentials函数来访问加密网页。
网页的用户名密码加密类型共有五种,分别是:
WINHTTP_AUTH_SCHEME_BASIC | Indicates basic authentication is available. |
---|---|
WINHTTP_AUTH_SCHEME_NTLM | Indicates NTLM authentication is available. |
WINHTTP_AUTH_SCHEME_PASSPORT | Indicates passport authentication is available. |
WINHTTP_AUTH_SCHEME_DIGEST | Indicates digest authentication is available. |
WINHTTP_AUTH_SCHEME_NEGOTIATE | Selects between NTLM and Kerberos authentication. |
而MSDN中的加密网页示例不包含WINHTTP_AUTH_SCHEME_BASIC类型,而路由中的加密类型恰巧就是这种类型。
在WinHttpSendRequest之前加上WinHttpSetCredentials,就行了。
bResults = WinHttpSetCredentials( hRequest,
WINHTTP_AUTH_TARGET_SERVER,
WINHTTP_AUTH_SCHEME_BASIC,
L"admin",
L"",
NULL );
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/110767.html原文链接:https://javaforall.cn
边栏推荐
- [glide] cache implementation - memory and disk cache
- The 18th IET AC / DC transmission International Conference (acdc2022) was successfully held online
- 【Go ~ 0到1 】 第六天 文件的读写与创建
- PingCode 性能测试之负载测试实践
- leetcode:421. The maximum XOR value of two numbers in the array
- 防火墙基础透明模式部署和双机热备
- Kunming Third Ring Road Closure project will pass through these places. Is there one near your home?
- 建筑建材行业经销商协同系统解决方案:赋能企业构建核心竞争力
- 将Opencv绘制图片显示在MFC Picture Control控件上
- Is it safe for CITIC Securities to open an account online? Is the account opening fee charged
猜你喜欢
Solution du système de gestion de la chaîne d'approvisionnement du parc logistique intelligent
Which domestic cloud management platform manufacturer is good in 2022? Why?
Go micro tutorial - Chapter 2 go micro V3 using gin and etcd
码农版隐秘的角落:作为开发者最讨厌的5件
【HCIA持续更新】网络管理与运维
51 single chip microcomputer temperature alarm based on WiFi control
居家打工年入800多万,一共五份全职工作,他还有时间打游戏
Internet addiction changes brain structure: language function is affected, making people unable to speak neatly
Wuzhicms code audit
NFT liquidity market security issues occur frequently - Analysis of the black incident of NFT trading platform quixotic
随机推荐
雨量预警广播自动化数据平台BWII 型广播预警监测仪
MD5加密的两种方式
[acwing] 58 weeks 4489 Longest subsequence
Learn more about the basic situation of 2022pmp examination
tx.origin安全问题总结
The 18th IET AC / DC transmission International Conference (acdc2022) was successfully held online
图像检索(image retrieval)
PingCode 性能测试之负载测试实践
Perfectly integrated into win11 style, Microsoft's new onedrive client is the first to see
开发者,MySQL专栏完更,助你轻松从安装到入门进阶
The Ministry of human resources and Social Security announced the new construction occupation
离线、开源版的 Notion—— 笔记软件Anytype 综合评测
新的职业已经出现,怎么能够停滞不前 ,人社部公布建筑新职业
【Go ~ 0到1 】 第六天 文件的读写与创建
斑马识别成狗,AI犯错的原因被斯坦福找到了丨开源
Vscode modification indentation failed, indent four spaces as soon as it is saved
C# 服务器日志模块
Solve the El input input box For number number input problem, this method can also be used to replace the problem of removing the arrow after type= "number"
kaili不能输入中文怎么办???
CocosCreator事件派發使用