使用命令行(ping/curl/powershell等)向“about:internet”发起一个网络请求。

huangapple go评论144阅读模式
英文:

make a web request to "about:internet" via cmdline (ping/curl/powershell, etc.)

问题

我们的产品中有大量的网络请求发送到"about:internet",但不清楚它们是如何生成的。

我在"hosts"文件中将一个合法的IP地址映射到"about:internet",但似乎无法使用"ping about:internet"。

但是,如果我直接ping IP地址,它能正常工作。

希望有人知道如何通过命令行发送网络请求到"about:internet"。TIA

英文:

so we are seeing a lot of web requests sent to "about:internet" in our product, but no idea how they are generated

I mapped a legit IP address to about:internet in the hosts file, but ping about:internet doesn't seem to work.

C:\Users\admin>ping about:internet
Ping request could not find host about:internet. Please check the name and try again.

but if I ping the IP address directly, it works good

C:\Users\admin>ping 100.705.033.940

Pinging 100.705.033.940 with 32 bytes of data:
Reply from 100.705.033.940: bytes=32 time=2ms TTL=128
Reply from 100.705.033.940: bytes=32 time<1ms TTL=128
Reply from 100.705.033.940: bytes=32 time<1ms TTL=128
Reply from 100.705.033.940: bytes=32 time<1ms TTL=128

Ping statistics for 100.705.033.940:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 2ms, Average = 0ms

Hoping someone would know how to send a web request [via cmdline] to about:internet. TIA

答案1

得分: 3

关于页面不由域名服务解析。相反,它们是浏览器的内置功能。

参考资料:

  1. https://superuser.com/questions/232352/what-are-all-the-about-pages-in-internet-explorer
  2. https://en.wikipedia.org/wiki/About_URI_scheme

这意味着无法从命令行界面发出此类请求。您至少需要使用浏览器的控制台来执行此操作。


然而,我没有成功使用浏览器的控制台来执行此操作。如果您能找到您的产品发送的请求,然后使用这些URL,或许值得一试。请查看这个链接:https://stackoverflow.com/questions/14248296/making-http-requests-using-chrome-developer-tools。

英文:

The about pages are not resolved by domain service. Instead, those are built-ins of browsers.

References:

  1. https://superuser.com/questions/232352/what-are-all-the-about-pages-in-internet-explorer.
  2. https://en.wikipedia.org/wiki/About_URI_scheme.

What this means is that it is impossible to make such requests from CLI. You will have to at least your browser's console to do this.


I did not succeed in using browser console to do this though. It might worth a try if you can find the requests that you see that your product send, and then use those URLs. Check this: https://stackoverflow.com/questions/14248296/making-http-requests-using-chrome-developer-tools.

huangapple
  • 本文由 发表于 2023年6月1日 02:06:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/76376233.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定