加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

Windows是否有任何内置的实用程序来编码/解码URL?

发布时间:2020-12-13 22:27:58 所属栏目:Windows 来源:网络整理
导读:Windows中的certutil可用于执行Base64编码和解除.是否有用于URL编码和解码的内置实用程序?网上有很多免费工具.但我特意寻找Windows内置实用程序或者不是可以在Windows上运行的简单脚本. 谢谢! 解决方法 Base64 VBA 可以使用VBA完成Base64编码和解码.例如,
Windows中的certutil可用于执行Base64编码和解除.是否有用于URL编码和解码的内置实用程序?网上有很多免费工具.但我特意寻找Windows内置实用程序或者不是可以在Windows上运行的简单脚本.

谢谢!

解决方法

Base64 VBA

可以使用VBA完成Base64编码和解码.例如,您可以复制/粘贴this code并将其放入Excel VBA中,然后使用它的方法对Base64进行编码和解码.

URL编码/解码VBA

How can I URL encode a string in Excel VBA?和Does VBA have any built in URL decoding?是URL解码器.使用这些工具,您应该能够在Windows环境中使用MS Office产品(如Excel和VBA)进行编码和解码.

Base64 PowerShell

如果你使用PowerShell,请查看:http://vstepic.blogspot.com/2013/02/how-to-convert-string-to-base64-and.html.摘自该网站:

PS C:Temp>$b  = [System.Text.Encoding]::UTF8.GetBytes("Hello World")
PS C:Temp>[System.Convert]::ToBase64String($b)
SGVsbG8gV29ybGQ=

PS C:Temp>$b  = [System.Convert]::FromBase64String("SGVsbG8gV29ybGQ=")
PS C:Temp>[System.Text.Encoding]::UTF8.GetString($b)
Hello World

URL编码/解码PowerShell

对于URL编码/解码,您可以使用:

[Reflection.Assembly]::LoadWithPartialName("System.Web") | Out-Null
[System.Web.HttpUtility]::UrlEncode("http://test.com/?path=what is")
http%3a%2f%2ftest.com%2f%3fpath%3dwhat+is

[System.Web.HttpUtility]::UrlDecode("http%3a%2f%2ftest.com%2f%3fpath%3dwhat+is")
http://test.com/?path=what is

参考:https://gallery.technet.microsoft.com/scriptcenter/Encoding-and-Decoding-URL-99dc4256

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读