{"id":16894060,"url":"https://github.com/firefart/its-a-trap","last_synced_at":"2025-07-24T22:41:26.906Z","repository":{"id":212264055,"uuid":"731046906","full_name":"firefart/its-a-trap","owner":"firefart","description":"Simple golang webserver that listens for basic auth or post requests and sends a notification when a user enters a password.","archived":false,"fork":false,"pushed_at":"2024-10-05T12:06:03.000Z","size":106,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-14T17:17:33.835Z","etag":null,"topics":["basic-authentication","go","golang","hacking","phishing","post","tool","tools","webserver"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firefart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-12-13T08:42:49.000Z","updated_at":"2024-10-05T12:06:07.000Z","dependencies_parsed_at":"2023-12-19T10:32:09.684Z","dependency_job_id":"50650869-544b-4fc1-9694-cec5f2113831","html_url":"https://github.com/firefart/its-a-trap","commit_stats":null,"previous_names":["firefart/its-a-trap"],"tags_count":0,"template":false,"template_full_name":"firefart/go-webserver-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firefart%2Fits-a-trap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firefart%2Fits-a-trap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firefart%2Fits-a-trap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firefart%2Fits-a-trap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firefart","download_url":"https://codeload.github.com/firefart/its-a-trap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239648540,"owners_count":19674391,"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":["basic-authentication","go","golang","hacking","phishing","post","tool","tools","webserver"],"created_at":"2024-10-13T17:17:32.424Z","updated_at":"2025-02-19T11:30:41.452Z","avatar_url":"https://github.com/firefart.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# its-a-trap\n\nSimple golang webserver that listens for basic auth or post requests and sends a notification when a user enters a\npassword.\n\nYou need to add your custom templates and post the `username` and `password` parameter to `/login` when using the post\nmode.\n\n## Folder Layout\n\n```text\nits-a-trap/custom\n├── assets\n│   └── styles.css\n└── templates\n    ├── finish.html\n    └── index.html\n```\n\nThis will serve `index.html` and show `finish.html` upon sending a post request. You can use the `asset_folder` to store\nyour custom assets needed for the templates. In basic auth mode only `finish.html` is shown.\n\n## basic auth example\n\n```json\n{\n  \"server\": {\n    \"listen\": \"127.0.0.1\",\n    \"port\": 8000\n  },\n  \"method\": \"basic\",\n  \"cloudflare\": false,\n  \"timeout\": \"5s\",\n  \"basic\": {\n    \"realm\": \"restricted\"\n  },\n  \"template\": {\n    \"folder\": \"./custom/templates\",\n    \"index_template\": \"index.html\",\n    \"finish_template\": \"finish.html\",\n    \"asset_folder\": \"./custom/assets\"\n  }\n}\n```\n\n## post example\n\n```json\n{\n  \"server\": {\n    \"listen\": \"127.0.0.1\",\n    \"port\": 8000\n  },\n  \"method\": \"post\",\n  \"cloudflare\": false,\n  \"timeout\": \"5s\",\n  \"template\": {\n    \"folder\": \"./custom/templates\",\n    \"index_template\": \"index.html\",\n    \"finish_template\": \"finish.html\",\n    \"asset_folder\": \"./custom/assets\"\n  }\n}\n```\n\nIn POST mode you have access to the following variables inside the template:\n\n- `{{ .LoginURL }}` - The URL to post to\n- `{{ .UsernameParameter }}` - the username parameter name\n- `{{ .PasswordParameter }}` - the password parameter name\n\nExample:\n\n```html\n\u003cform action=\"{{ .LoginURL }}\" method=\"post\"\u003e\n  \u003clabel for=\"fname\"\u003eUsername:\u003c/label\u003e\n  \u003cinput type=\"text\" id=\"fname\" name=\"{{ .UsernameParameter }}\"\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003clabel for=\"fpass\"\u003ePassword:\u003c/label\u003e\n  \u003cinput type=\"password\" id=\"fpass\" name=\"{{ .PasswordParameter }}\"\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003cinput type=\"submit\" value=\"Submit\"\u003e\n\u003c/form\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirefart%2Fits-a-trap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirefart%2Fits-a-trap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirefart%2Fits-a-trap/lists"}