{"id":18402444,"url":"https://github.com/filosottile/hstools","last_synced_at":"2025-09-21T22:31:17.465Z","repository":{"id":29517408,"uuid":"33055825","full_name":"FiloSottile/hstools","owner":"FiloSottile","description":"Library and tools to interact with and analyze Tor HSDirs.","archived":false,"fork":false,"pushed_at":"2016-02-22T10:39:02.000Z","size":684,"stargazers_count":73,"open_issues_count":0,"forks_count":6,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-05-06T00:38:54.027Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hsdir.org","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FiloSottile.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-29T00:29:00.000Z","updated_at":"2024-12-02T03:44:35.000Z","dependencies_parsed_at":"2022-08-28T18:01:14.651Z","dependency_job_id":null,"html_url":"https://github.com/FiloSottile/hstools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FiloSottile/hstools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiloSottile%2Fhstools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiloSottile%2Fhstools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiloSottile%2Fhstools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiloSottile%2Fhstools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FiloSottile","download_url":"https://codeload.github.com/FiloSottile/hstools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FiloSottile%2Fhstools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276318278,"owners_count":25621648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T02:42:31.197Z","updated_at":"2025-09-21T22:31:17.183Z","avatar_url":"https://github.com/FiloSottile.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a Go library and a collection of tools to interact with and analyze Tor HSDirs.\n\n## Bruteforcing tool\n\n`brute` will bruteforce Identity Keys that will be the 6 HSDir for the given onion\nat the given time, considering the given consensus state (which should probably just be the most\n[recent](https://collector.torproject.org/recent/relay-descriptors/consensuses/).\n\n    ./bin/brute 2015-05-23-23-00-00-consensus facebookcorewwwi.onion 2015-05-29T12:00:00Z\n\nYou should really patch your Go standard library with the provided reduced-primalty patch, it will make the bruteforce\n20 times as fast and complete checks are performed anyway by the tool itself (ProTip: have a separate Go tree for this\nsecurity-shattering patch!)\n\n## Preprocessing\n\nFirst, download consensus files from the following two addresses:\n\nhttps://collector.torproject.org/archive/relay-descriptors/consensuses/  \nhttps://collector.torproject.org/recent/relay-descriptors/consensuses/\n\nand make sure they are named like this (this is what you will get by just unpacking the tarballs):\n\n    $DIR/consensuses-2015-01/01/2015-01-01-00-00-00-consensus\n\nThen there are two steps to preprocessing:\n\n    preprocess $DIR 2015-01-01-00 2015-05-28-10\n    grind pckcns.dat \u003e stats.jsonl\n\nThis should leave you with the following three files: `pckcns.dat`, `keys.db` and `stats.jsonl`\n\n## Analysis tools\n\n### scrolls\n\n`scrolls` will go through consensuses in a time frame and print the HSDir set every time it changed,\nwith color-coded suspiciousness scores.\n\n    ./bin/scrolls pckcns.dat keys.db stats.jsonl facebookcorewwwi.onion 2015-05-01-01 2015-05-28-10\n    \n![image](https://cloud.githubusercontent.com/assets/1225294/7873542/e206bdf6-05a3-11e5-99db-d9d89a2bf4ec.png)\n\n* \"Dist score\" is a normalized score of how near the first HSDir is to the Descriptor ID, compared to the\n  expected mean and average deviation on the ring.\n* \"Dist4 score\" is the same, but for the distance of the 4th node.\n* \"Age\" is how many hours before the node got the HSDir flag (or appeared). ∞ means since the beginning of the time frame.\n* \"Long\" is how many hours after the node lost the HSDir flag (or disappeared). ∞ means until the end of the time frame.\n* \"Colo keys\" is how many other Identity Keys have been observed on IPs that hosted this Identity Key.\n\n### curiosity\n\n`curiosity` will generate statistics about correlations between IPs and multiple Identity Keys.\n\n    ./bin/curiosity data/keys.db colocated | sort -g\n    \n    [...]\n    57 keys on 1 IPs - EFA4BF05D097357832B8C7EE3391C8A534CB06F1 [178.32.143.175]\n    57 keys on 1 IPs - FADD1E620505CD8B1E22DC9CC503D06592C24EF9 [178.32.143.175]\n    57 keys on 1 IPs - FFCCB39F28DB9926F9D34D97F1D98EEA834EED38 [178.32.143.175]\n    57 keys on 3 IPs - 0045D088EB8E8E3634F3C82A8010A50BC18938D4 [54.242.144.249 23.20.33.81 23.22.192.88]\n    57 keys on 3 IPs - 01120D3FA96BA5B5F5FBB5E1581E8C73E0EFE24D [54.242.144.249 23.20.33.81 23.22.192.88]\n    57 keys on 3 IPs - 01C5B224668F77D3662956DDEC15DA46A252CC23 [54.242.144.249 23.20.33.81 23.22.192.88]\n    57 keys on 3 IPs - 027B74EEB1A43CFA490D3AE7C4CCC11F5F26A3A7 [54.242.144.249 23.20.33.81 23.22.192.88]\n    57 keys on 3 IPs - 03D401D7B671098945BD5B14E3D54278CBCF5067 [54.242.144.249 23.20.33.81 23.22.192.88]\n\n## Coming soon\n\n* automated orchestration tool to easily deploy defensive arrays of HSDirs\n* real-time targeted and generic statistical monitoring tools\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilosottile%2Fhstools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilosottile%2Fhstools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilosottile%2Fhstools/lists"}