Skip to content

hannob/httpstime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

httpstime

⚠️ I do not recommend using this script any more. Instead, use an NTP client implementation that supports NTS / RFC 8915.

Simple bash script to set the system time via HTTPS. Born out of frustration with all other existing solutions, see also:

By default it will use the HTTP Date header from www.google.com to set the time. Alternatively another hostname can be passed on the command line.

Unlike NTP setting the time via HTTPS provides protection against man in the middle attacks.

The accuracy is worse than NTP, as the time resolution is only in seconds and network transmission times aren't considered.

Security considerations

This provides no protection against rogue Google servers sending a bad time.

In theory the server could try to attack the parser in the "date" tool. However I tested it with american fuzzy lop and it seems robust.

About

Setting the system time over HTTPS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages