{"id":15615705,"url":"https://github.com/bostrt/mod_drain","last_synced_at":"2025-04-06T14:28:10.389Z","repository":{"id":137793106,"uuid":"102154825","full_name":"bostrt/mod_drain","owner":"bostrt","description":"An Apache HTTPD module that creates memory leaks. Only useful for training.","archived":false,"fork":false,"pushed_at":"2017-09-02T20:58:30.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T20:35:15.605Z","etag":null,"topics":["httpd","memory-leak","training"],"latest_commit_sha":null,"homepage":"","language":"C","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/bostrt.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":"2017-09-01T21:35:04.000Z","updated_at":"2017-09-01T21:36:38.000Z","dependencies_parsed_at":"2023-05-22T14:00:18.903Z","dependency_job_id":null,"html_url":"https://github.com/bostrt/mod_drain","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"d8f95ca90a26e75dcd1cf66027104b7b3b68671f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bostrt%2Fmod_drain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bostrt%2Fmod_drain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bostrt%2Fmod_drain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bostrt%2Fmod_drain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bostrt","download_url":"https://codeload.github.com/bostrt/mod_drain/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247494851,"owners_count":20947948,"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":["httpd","memory-leak","training"],"created_at":"2024-10-03T07:01:57.778Z","updated_at":"2025-04-06T14:28:10.371Z","avatar_url":"https://github.com/bostrt.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mod_drain\n\n`mod_drain` is an Apache HTTPD 2.4 module designed to create memory leaks. This can be used as a training tool. I am 100% sure this module isn't good for anything else.\n\n## Building\nBuild `mod_drain` with the `apxs` tool shipped with your Apache HTTPD.\n\n```\n# git clone https://github.com/bostrt/mod_drain.git\n# cd mod_drain\n# apxs -i -c mod_drain.c\n```\n\n## Configuration\nAfter building the module, you will need to add configuration to Apache HTTPD that loads the module and sets up the `mod_drain` handler.\n\nFor example:\n```\n# cat /etc/httpd/conf.d/drain.conf\nLoadModule drain_module modules/mod_drain.so\n\u003cLocation \"/drain\"\u003e\n  SetHandler drain-handler\n\u003c/Location\u003e\n```\n\n## Usage\n\n### Basic Usage\nAfter building and configuring `mod_drain`, you can trigger it by sending a request to the location you configured the handler in.\n\nBelow is a curl command that would work with the configuration in the section above.\n\n```\n# curl http://localhost/drain\nmod_drain\n10 MB drained\n```\n\nYou can also change the amount of memory drained by using the `amount` request parameter.\n\n```\n# curl http://localhost/drain?amount=100\nmod_drain\n100 MB drained\n```\n\n### Docker Usage\n\nA `Dockerfile` is provided in this repository so you can build a docker image to play with `mod_drain`. Run the following from inside the `mod_drain` source directory:\n\n```\n# docker built -t mod_drain .\n# docker run -d -p 8080:80 mod_drain\n# curl http://localhost:8080/drain\nmod_drain\n10 MB drained\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbostrt%2Fmod_drain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbostrt%2Fmod_drain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbostrt%2Fmod_drain/lists"}