{"id":15576340,"url":"https://github.com/damnever/hosts-hijacking","last_synced_at":"2026-04-22T11:33:55.142Z","repository":{"id":141674711,"uuid":"284475988","full_name":"damnever/hosts-hijacking","owner":"damnever","description":"[NSFW] Hijack UDP-based(libc recvfrom) DNS A/AAAA response with LD_PRELOAD.","archived":false,"fork":false,"pushed_at":"2020-08-06T15:16:01.000Z","size":15,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-29T07:17:25.776Z","etag":null,"topics":["dns","hosts","ld-preload","libc"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/damnever.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}},"created_at":"2020-08-02T14:19:00.000Z","updated_at":"2024-01-10T08:23:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"b12b243a-ebaf-4453-901d-688fb2e8b01e","html_url":"https://github.com/damnever/hosts-hijacking","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/damnever/hosts-hijacking","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damnever%2Fhosts-hijacking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damnever%2Fhosts-hijacking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damnever%2Fhosts-hijacking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damnever%2Fhosts-hijacking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damnever","download_url":"https://codeload.github.com/damnever/hosts-hijacking/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damnever%2Fhosts-hijacking/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32134307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T08:34:57.708Z","status":"ssl_error","status_checked_at":"2026-04-22T08:34:55.583Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dns","hosts","ld-preload","libc"],"created_at":"2024-10-02T18:46:43.361Z","updated_at":"2026-04-22T11:33:55.114Z","avatar_url":"https://github.com/damnever.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hosts-hijacking\n\nHijack UDP-based([libc recvfrom](https://man7.org/linux/man-pages/man2/recvfrom.2.html)) DNS A/AAAA response with LD_PRELOAD.\n\n```\n# make build\n\n# cat /path/to/hosts\n10.8.8.8 google.com\n\n# HOSTS_HIJACKING=/path/to/hosts LD_PRELOAD=$(pwd)/src/hosts-hijacking.so xx-cmd-using-libc-recvfrom\n```\n\n## Why\n\n- We want to keep the dirty hack at the client-side.\n- We have no permission to change the hosts file(or we do not want to change it, see below).\n- No side effect to other processes.\n\n## NOTES\n\n- NOT FULLY TESTED!!!\n- If you want to use it with golang, the most reliable way is compiling the golang program with `-tags netcgo`(DO NOT use cross-platform compile).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamnever%2Fhosts-hijacking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamnever%2Fhosts-hijacking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamnever%2Fhosts-hijacking/lists"}