当前位置:网站首页>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
边栏推荐
- Learn more about the basic situation of 2022pmp examination
- S2b2b solution for lighting industry: efficiently enable the industrial supply chain and improve the economic benefits of enterprises
- Which domestic cloud management platform manufacturer is good in 2022? Why?
- MVC模式和三层架构
- tp配置多数据库
- 长城证券安全不 证券开户
- Hidden corners of coder Edition: five things that developers hate most
- 一文掌握数仓中auto analyze的使用
- 公司要上监控,Zabbix 和 Prometheus 怎么选?这么选准没错!
- Wuzhicms code audit
猜你喜欢
Analysis of abnormal frequency of minor GC in container environment
Go micro tutorial - Chapter 2 go micro V3 using gin and etcd
Perfectly integrated into win11 style, Microsoft's new onedrive client is the first to see
PingCode 性能测试之负载测试实践
Implementation of super large-scale warehouse clusters in large commercial banks
OPPO小布推出预训练大模型OBERT,晋升KgCLUE榜首
建筑建材行业经销商协同系统解决方案:赋能企业构建核心竞争力
容器环境minor gc异常频繁分析
La 18e Conférence internationale de l'IET sur le transport d'électricité en courant alternatif et en courant continu (acdc2022) s'est tenue avec succès en ligne.
C# 服务器日志模块
随机推荐
解读数据安全治理能力评估框架2.0,第四批DSG评估征集中
Go micro tutorial - Chapter 2 go micro V3 using gin and etcd
ARTS_20220628
Kunming Third Ring Road Closure project will pass through these places. Is there one near your home?
kaili不能输入中文怎么办???
【测试开发】软件测试——基础篇
新享科技发布小程序UniPro小优 满足客户移动办公场景
关于nacos启动时防火墙开启8848的坑
长城证券开户安全吗 证券账户怎么开通
码农版隐秘的角落:作为开发者最讨厌的5件
【云原生】服务网格是什么“格”?
[acwing] 58 weeks 4489 Longest subsequence
被PMP考试“折磨”出来的考试心得,值得你一览
[template] [Luogu p4630] duathlon Triathlon (round square tree)
手里10万元存款买什么理财产品收益最高?
网页游戏引擎
Learn more about the basic situation of 2022pmp examination
缓存穿透、缓存击穿、缓存雪崩分别是什么
Is it safe for Anxin securities to open an account online? Is the account opening fee charged
《吐血整理》保姆级系列教程-玩转Fiddler抓包教程(2)-初识Fiddler让你理性认识一下