{"id":14066348,"url":"https://github.com/hrbrmstr/hhhash","last_synced_at":"2025-10-29T01:30:49.701Z","repository":{"id":179857799,"uuid":"664228313","full_name":"hrbrmstr/hhhash","owner":"hrbrmstr","description":"#️⃣ 🕸️ 👤 HTTP Headers Hashing","archived":false,"fork":false,"pushed_at":"2023-07-10T14:42:42.000Z","size":28,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"batman","last_synced_at":"2025-01-17T21:00:50.983Z","etag":null,"topics":["cybersecurity","hash","http","r","rstats"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hrbrmstr.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-07-09T10:09:54.000Z","updated_at":"2023-11-13T22:49:35.000Z","dependencies_parsed_at":"2024-02-19T18:22:07.117Z","dependency_job_id":null,"html_url":"https://github.com/hrbrmstr/hhhash","commit_stats":null,"previous_names":["hrbrmstr/hhhash"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fhhhash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fhhhash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fhhhash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Fhhhash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrbrmstr","download_url":"https://codeload.github.com/hrbrmstr/hhhash/tar.gz/refs/heads/batman","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236719507,"owners_count":19194046,"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","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":["cybersecurity","hash","http","r","rstats"],"created_at":"2024-08-13T07:05:03.344Z","updated_at":"2025-10-29T01:30:44.413Z","avatar_url":"https://github.com/hrbrmstr.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"\n[![Project Status: Active – The project has reached a stable, usable\nstate and is being actively\ndeveloped.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![Signed\nby](https://img.shields.io/badge/Keybase-Verified-brightgreen.svg)](https://keybase.io/hrbrmstr)\n![Signed commit\n%](https://img.shields.io/badge/Signed_Commits-100%25-lightgrey.svg)\n[![R](https://github.com/hrbrmstr/hhhash/workflows/R/badge.svg)](https://github.com/hrbrmstr/hhhash/actions?query=workflow%3AR)\n![Minimal R\nVersion](https://img.shields.io/badge/R%3E%3D-4.0.0-blue.svg)\n![License](https://img.shields.io/badge/License-MIT-blue.svg)\n\n# hhhash\n\nHTTP Headers Hashing\n\n## Description\n\nHTTP Headers Hashing (HHHash) is a technique used to create a\nfingerprint of an HTTP server based on the headers it returns. HHHash\nemploys one-way hashing to generate a hash value for the set of header\nkeys returned by the server. See\n\u003chttps://www.foo.be/2023/07/HTTP-Headers-Hashing_HHHash\u003e for more info.\n\n## What’s Inside The Tin\n\nThe following functions are implemented:\n\n- `build_hash_from_response`: Build a hash from headers in an curl\n  response object\n- `build_hash_from_url`: Build a hash from headers retrieved from a URL\n- `hash_headers`: Build a hash from a vector of HTTP header keys\n- `sha256`: Convience wrapper for digest::digest() with algo = “sha256”\n  and serialize = FALSE\n\n## Installation\n\n``` r\nremotes::install_github(\"hrbrmstr/hhhash\")\n```\n\nNOTE: To use the ‘remotes’ install options you will need to have the\n[{remotes} package](https://github.com/r-lib/remotes) installed.\n\n## Usage\n\n``` r\nlibrary(hhhash)\n\n# current version\npackageVersion(\"hhhash\")\n## [1] '0.1.1'\n```\n\n``` r\nbuild_hash_from_url(\"https://www.circl.lu/\")\n## [1] \"hhh:1:78f7ef0651bac1a5ea42ed9d22242ed8725f07815091032a34ab4e30d3c3cefc\"\n```\n\n``` r\nres \u003c- curl::curl_fetch_memory(\"https://www.circl.lu/\", curl::new_handle())\n\nbuild_hash_from_response(res)\n## [1] \"hhh:1:78f7ef0651bac1a5ea42ed9d22242ed8725f07815091032a34ab4e30d3c3cefc\"\n```\n\n``` r\nc(\n  \"Date\", \"Server\", \"Strict-Transport-Security\",\n  \"Last-Modified\", \"ETag\", \"Accept-Ranges\",\n  \"Content-Length\", \"Content-Security-Policy\",\n  \"X-Content-Type-Options\", \"X-Frame-Options\",\n  \"X-XSS-Protection\", \"Content-Type\"\n) -\u003e keys\n\nhash_headers(keys)\n## [1] \"hhh:1:78f7ef0651bac1a5ea42ed9d22242ed8725f07815091032a34ab4e30d3c3cefc\"\n```\n\n## hhhash Metrics\n\n| Lang | \\# Files |  (%) | LoC |  (%) | Blank lines |  (%) | \\# Lines |  (%) |\n|:-----|---------:|-----:|----:|-----:|------------:|-----:|---------:|-----:|\n| R    |        4 | 0.25 |  26 | 0.18 |          14 | 0.39 |       56 | 0.47 |\n| C    |        2 | 0.12 |  24 | 0.17 |           4 | 0.11 |        3 | 0.03 |\n| JSON |        1 | 0.06 |  20 | 0.14 |           0 | 0.00 |        0 | 0.00 |\n| YAML |        1 | 0.06 |   1 | 0.01 |           0 | 0.00 |        0 | 0.00 |\n| SUM  |        8 | 0.50 |  71 | 0.50 |          18 | 0.50 |       59 | 0.50 |\n\n{cloc} 📦 metrics for hhhash\n\n## Code of Conduct\n\nPlease note that this project is released with a Contributor Code of\nConduct. By participating in this project you agree to abide by its\nterms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrbrmstr%2Fhhhash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrbrmstr%2Fhhhash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrbrmstr%2Fhhhash/lists"}