解析Firefox HSTS预加载列表 [英] Parse Firefox HSTS Preloading list

查看:121
本文介绍了解析Firefox HSTS预加载列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要解析Mozilla的dveloper论坛上提到的Mozilla的HSTS预加载列表: https://developer.mozilla.org/zh-CN/docs/Web/Security/HTTP_strict_transport_security

I need to parse the Mozilla's HSTS preloading list Which is mentioned on the dveloper forum of Mozilla: https://developer.mozilla.org/en-US/docs/Web/Security/HTTP_strict_transport_security

作为"Firefox HSTS预加载列表的咨询:

as "Consultation of the Firefox HSTS preload list : https://dxr.mozilla.org/comm-central/source/mozilla/security/manager/ssl/nsSTSPreloadList.inc " Please explain the format and comments mentioned in this file.

Chrome提供JSON格式的HSTS预加载列表,这很容易解释.

Chrome provides HSTS preloading list in JSON format which is self explanatory.

推荐答案

nsSTSPreloadList.inc 是C ++代码,由

nsSTSPreloadList.inc is C++ code, generated from chromium/src/net/+/master/http/transport_security_state_static.json.

生成它的代码为: http://mxr.mozilla.org/mozilla-central/source/security/manager/tools/getHSTSPreloadList.js -您可以从中找出输出格式.

The code that generates it is: http://mxr.mozilla.org/mozilla-central/source/security/manager/tools/getHSTSPreloadList.js -- you can figure out the output format from that.

顺便说一句,生成文件的格式最近已更改,因此答案将取决于您感兴趣的Firefox版本.

BTW, the format of the generated file was recently changed, so the answer will depend on what version of Firefox you're interested in.

使用当前格式,看起来您可以提取如下注释:/*主机名,true */-并完成操作.

With the current format, it looks like you can extract the comments that look like this: /* hostname, true */ - and be done with it.

这篇关于解析Firefox HSTS预加载列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆