{"id":13795659,"url":"https://github.com/jadb/honeypot","last_synced_at":"2025-04-03T15:21:06.726Z","repository":{"id":56995658,"uuid":"50217164","full_name":"jadb/honeypot","owner":"jadb","description":"The Project Honey Pot un-official PHP SDK","archived":false,"fork":false,"pushed_at":"2016-01-23T01:06:22.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T04:14:28.157Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/jadb.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":"2016-01-23T01:06:14.000Z","updated_at":"2024-09-21T11:53:58.000Z","dependencies_parsed_at":"2022-08-21T11:10:22.583Z","dependency_job_id":null,"html_url":"https://github.com/jadb/honeypot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadb%2Fhoneypot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadb%2Fhoneypot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadb%2Fhoneypot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadb%2Fhoneypot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jadb","download_url":"https://codeload.github.com/jadb/honeypot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247024158,"owners_count":20870940,"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":[],"created_at":"2024-08-03T23:01:00.095Z","updated_at":"2025-04-03T15:21:06.699Z","avatar_url":"https://github.com/jadb.png","language":"PHP","readme":"# Honeypot\n\nThe [Project Honey Pot](https://www.projecthoneypot.org)'s *un-official* PHP SDK.\n\nUsing the library, you can start auto-detecting bad visitors (`HttpBL`) and/or help \ndeterring new ones (`Quicklink`).\n\n## Install\n\n```\ncomposer require jadb/honeypot:1.0.x-dev\n```\n\n## Usage\n\n### HttpBL\n\nTo use the [Http::BL](https://www.projecthoneypot.org/httpbl_api.php) API, you will first need \nan API key. Head over and [register](http://www.projecthoneypot.org?rf=202881) if you haven't\nalready (this is a referral link): \n\nOnce you have that, you can just do:\n\n```php\n\u003c?php\n\nif (!(new \\Honeypot\\HttpBL('your-api-key'))-\u003eisSafe('127.0.0.1') {\n    exit('Unsafe visitor');\n}\n```\n\nIf you want more control over the rules:\n\n```php\n\u003c?php\n/**\n * By default, strict mode is used. When not in strict mode, any pass is a pass. This ruleset\n * translates to: 5 days or older, or threat score lower than 2, or visitor type lower than 4.\n */\n$strict = false; \n$age = 5; \n$score = 2;\n$type = 4;\nif (!(new \\Honeypot\\HttpBL('your-api-key'))-\u003eisSafe('127.0.0.1', $age, $score, $type) {\n    exit('Unsafe visitor');\n}\n```\n\nFor even more, you could just get the `Address` object and create your own validation:\n\n```php\n\u003c?php\n$address = (new \\Honeypot\\HttpBL('your-api-key'))-\u003eaddress('127.0.0.1');\n```\n\n**NOTE:** For testing purposes, [dummy data is made available](https://www.projecthoneypot.org/httpbl_api.php).\n\n### Quicklink\n\nTo use [quicklinks](https://www.projecthoneypot.org/manage_quicklink.php) and help deterring new bad IPs, \nyou will need to get a honeypot's URL or [host your own honeypot](https://www.projecthoneypot.org/manage_honey_pots.php).\n\nOnce that is done, you can create up to 8 different links by doing:\n\n```php\n\u003c?php\n// this will create 5 links\necho (new \\Honeypot\\Quicklink('http://link.to.honeypot.org/'))-\u003erender(5);\n```\n\n## Patches \u0026 Features\n\n* Fork\n* Mod, fix\n* Test - this is important, so it's not unintentionally broken\n* Commit - do not mess with license, todo, version, etc. (if you do change any, bump them into commits of\ntheir own that I can ignore when I pull)\n* Pull request - bonus point for topic branches\n\nTo ensure your PRs are considered for upstream, you MUST follow the PSR2 coding standards.\n\n## Bugs \u0026 Feedback\n\nhttp://github.com/jadb/honeypot/issues\n\n## License\n\nCopyright (c) 2015, [Jad Bitar](http://jadb.io) and licensed under [The MIT License](http://www.opensource.org/licenses/mit-license.php).\n","funding_links":[],"categories":["\u003ca id=\"a53d22b9c5d09dc894413453f4755658\"\u003e\u003c/a\u003e未分类","Honeypots"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadb%2Fhoneypot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjadb%2Fhoneypot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadb%2Fhoneypot/lists"}