{"id":22967942,"url":"https://github.com/satta/gommunityid","last_synced_at":"2025-07-25T13:06:52.549Z","repository":{"id":136980513,"uuid":"199336125","full_name":"satta/gommunityid","owner":"satta","description":"Go implementation of the Community ID flow hashing standard","archived":false,"fork":false,"pushed_at":"2025-04-17T04:34:26.000Z","size":48,"stargazers_count":20,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T18:39:39.371Z","etag":null,"topics":["bro","community-id","flow-hashing","go","golang","network-monitoring","network-security","network-security-monitoring","suricata","zeek"],"latest_commit_sha":null,"homepage":"","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/satta.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-07-28T20:53:44.000Z","updated_at":"2025-04-17T04:34:24.000Z","dependencies_parsed_at":"2024-12-14T21:15:23.770Z","dependency_job_id":"316ac80e-1544-4329-b7e1-6006583753b5","html_url":"https://github.com/satta/gommunityid","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/satta/gommunityid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satta%2Fgommunityid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satta%2Fgommunityid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satta%2Fgommunityid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satta%2Fgommunityid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/satta","download_url":"https://codeload.github.com/satta/gommunityid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satta%2Fgommunityid/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267009854,"owners_count":24020684,"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-07-25T02:00:09.625Z","response_time":70,"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":["bro","community-id","flow-hashing","go","golang","network-monitoring","network-security","network-security-monitoring","suricata","zeek"],"created_at":"2024-12-14T21:15:10.128Z","updated_at":"2025-07-25T13:06:52.522Z","avatar_url":"https://github.com/satta.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gommunityid\n\n[![Status](https://github.com/satta/gommunityid/actions/workflows/go.yml/badge.svg)](https://github.com/satta/gommunityid/actions)\n[![Coverage Status](https://coveralls.io/repos/github/satta/gommunityid/badge.svg?branch=master)](https://coveralls.io/github/satta/gommunityid?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/satta/gommunityid)](https://goreportcard.com/report/github.com/satta/gommunityid)\n[![Documentation](https://godoc.org/github.com/satta/gommunityid?status.svg)](http://godoc.org/github.com/satta/gommunityid)\n\ngommunityid is a Golang implementation of the [Community ID flow hashing algorithm](https://github.com/corelight/community-id-spec). Its API design was clearly and obviously inspired by the [Python reference implementation](https://github.com/corelight/pycommunityid).\n\n## Usage\n\n```Go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\n\t\"github.com/satta/gommunityid\"\n)\n\nfunc main() {\n\t// Get instance for version 1, seed 0\n\tcid, _ := gommunityid.GetCommunityIDByVersion(1, 0)\n\n\t// Obtain flow tuple. This can be done any way you like.\n\tft := gommunityid.MakeFlowTuple(net.IPv4(1, 2, 3, 4), net.IPv4(5, 6, 7, 8), 9, 10, 1)\n\n\t// Calculate Base64-encoded value\n\tcommunityid := cid.CalcBase64(ft)\n\tfmt.Printf(\"%s\\n\", communityid)\n\n\t// Calculate hex-encoded value\n\tcommunityid = cid.CalcHex(ft)\n\tfmt.Printf(\"%s\\n\", communityid)\n\n\t// Calculate byte slice\n\tcommunityidByte := cid.Calc(ft)\n\tfmt.Printf(\"%v\\n\", communityidByte)\n}\n```\nThere is also a [convenience function](https://godoc.org/github.com/satta/gommunityid#PcapFlowTupleSource) for parsing pcap files and automated FlowTuple generation for all supported protocols.\n\n## Command line interface\n\nThis package builds a simple [command line tool](cmd/gommunityid.go) to calculate IDs for pcaps:\n```\n$ ./gommunityid pcap\nUsage: gommunityid pcap [options] \u003cpcap-file\u003e\n  -seed uint\n    \tseed value (default 0)\n  -version uint\n    \tCommunity ID version (default 1)\n$ gommunityid pcap testdata/tcp.pcap\n1071580904.891921 | 1:LQU9qZlK+B5F3KDmev6m5PMibrg= | 128.232.110.120 66.35.250.204 6 34855 80\n1071580905.035577 | 1:LQU9qZlK+B5F3KDmev6m5PMibrg= | 66.35.250.204 128.232.110.120 6 80 34855\n1071580905.035724 | 1:LQU9qZlK+B5F3KDmev6m5PMibrg= | 128.232.110.120 66.35.250.204 6 34855 80\n1071580905.037333 | 1:LQU9qZlK+B5F3KDmev6m5PMibrg= | 128.232.110.120 66.35.250.204 6 34855 80\n1071580905.181581 | 1:LQU9qZlK+B5F3KDmev6m5PMibrg= | 66.35.250.204 128.232.110.120 6 80 34855\n1071580905.184528 | 1:LQU9qZlK+B5F3KDmev6m5PMibrg= | 66.35.250.204 128.232.110.120 6 80 34855\n1071580905.184844 | 1:LQU9qZlK+B5F3KDmev6m5PMibrg= | 128.232.110.120 66.35.250.204 6 34855 80\n1071580905.184698 | 1:LQU9qZlK+B5F3KDmev6m5PMibrg= | 66.35.250.204 128.232.110.120 6 80 34855\n1071580905.184920 | 1:LQU9qZlK+B5F3KDmev6m5PMibrg= | 128.232.110.120 66.35.250.204 6 34855 80\n1071580905.184736 | 1:LQU9qZlK+B5F3KDmev6m5PMibrg= | 66.35.250.204 128.232.110.120 6 80 34855\n1071580905.203025 | 1:LQU9qZlK+B5F3KDmev6m5PMibrg= | 128.232.110.120 66.35.250.204 6 34855 80\n1071580905.346457 | 1:LQU9qZlK+B5F3KDmev6m5PMibrg= | 66.35.250.204 128.232.110.120 6 80 34855\n```\nand explicit tuples:\n```\n$ gommunityid tuple\nUsage: gommunityid tuple [options] \u003cproto\u003e \u003csrcip\u003e \u003cdstip\u003e \u003csrcport\u003e \u003cdstport\u003e\n  -seed uint\n    \tseed value (default 0)\n  -version uint\n    \tCommunity ID version (default 1)\n$ gommunityid tuple 6 66.35.250.204 128.232.110.120 80 34855\n1:LQU9qZlK+B5F3KDmev6m5PMibrg=\n```\n\n## Author/Contact\n\nSascha Steinbiss\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatta%2Fgommunityid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsatta%2Fgommunityid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatta%2Fgommunityid/lists"}