HSTS::Preloaded - inspect Chrome's HSTS preloaded list


version 1.0.1


This is a library to work with Chrome's HSTS preloaded list.

One can submit hosts for inclusion to the list with the form

And in the source code of Chromium one can see the list of hosts that are currently in the list:

This library simplifies the work with the preloaded list.



    my $h = HSTS::Preloaded->new();

The constructor. It creates new object. It downloads all the info from Chrome's HSTS preloaded list and stores it in the object. This is the only method that interacts with intenet. All other methods uses data that object already have.


    my $result = $h->host_is_in_hsts_preloaded_list( $host );

Method returns true value if the specified host is in HSTS preloaded list. Otherwise method returns false value.

For example:

    $h->host_is_in_hsts_preloaded_list(''); # true
    $h->host_is_in_hsts_preloaded_list(''); # false


    my $data = $h->get_all_hsts_preloaded_list_data();

Returns all the data. You can read the descrioption of the data structure

This remoted returns perl hashref. For the boolean values that were in JSON file the JSON::PP::Boolean objects are used.

Here is an example of some part of the data.

    my $partial_data = $h->get_all_hsts_preloaded_list_data()->{entries}->[619];

The $partial_data will be:

        include_subdomains => JSON::PP::Boolean  {
            public methods (0)
            private methods (1) : __ANON__
            internals: 1
        mode               => "force-https",
        name               => "",
        pins               => "dropbox",


Ivan Bessarabov <>


This software is copyright (c) 2015 by Ivan Bessarabov.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.