Skip to content

Instantly share code, notes, and snippets.

@theel0ja
Created December 5, 2019 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theel0ja/28f9b2c6fbe3d6d5fc4547680b211fcc to your computer and use it in GitHub Desktop.
Save theel0ja/28f9b2c6fbe3d6d5fc4547680b211fcc to your computer and use it in GitHub Desktop.
const index = require("./index");
(async () => {
const results = {};
results.hstsPreloadOrg = await index.lookup("hstspreload.org", "chromium.hstspreload.lelux.fi", {
servers: ["127.0.0.1"],
includeTxt: false,
});
results.mailGoogleCom = await index.lookup("mail.google.com", "chromium.hstspreload.lelux.fi", {
servers: ["127.0.0.1"],
includeTxt: false,
});
results.httpForeverCom = await index.lookup("httpforever.com", "chromium.hstspreload.lelux.fi", {
servers: ["127.0.0.1"],
includeTxt: false,
});
/**
* Whole .dev TLD is preloaded
* https://security.googleblog.com/2017/09/broadening-hsts-to-secure-more-of-web.html
*/
results.Dev = await index.lookup("dagfdsfgsfdgsdf.dev", "chromium.hstspreload.lelux.fi", {
servers: ["127.0.0.1"],
includeTxt: false,
});
// eslint-disable-next-line no-console
console.log(results);
// {
// hstsPreloadOrg: true,
// mailGoogleCom: true,
// httpForeverCom: false,
// Dev: true
// }
})();
@theel0ja
Copy link
Author

theel0ja commented Dec 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment