{"id":21845250,"url":"https://github.com/entysec/libpawn","last_synced_at":"2025-04-14T13:13:09.406Z","repository":{"id":177005220,"uuid":"658309176","full_name":"EntySec/libpawn","owner":"EntySec","description":"C library that is intended for providing methods for executing and injecting code.","archived":false,"fork":false,"pushed_at":"2024-08-14T11:33:06.000Z","size":149,"stargazers_count":11,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T02:22:16.844Z","etag":null,"topics":["c-programming","dll-injection","elf-format","elf-loader","elf-parser","injector","loader","macho-loader","macho-parser","pe-loader","reflective-injection","reflective-pe-loaders","rop"],"latest_commit_sha":null,"homepage":"","language":"C","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/EntySec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"entysec"}},"created_at":"2023-06-25T11:30:19.000Z","updated_at":"2024-08-27T15:44:13.000Z","dependencies_parsed_at":"2023-09-29T23:03:12.234Z","dependency_job_id":"c5ed5f44-9326-4a3e-8f0d-7157692045c5","html_url":"https://github.com/EntySec/libpawn","commit_stats":null,"previous_names":["entysec/libpawn"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EntySec%2Flibpawn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EntySec%2Flibpawn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EntySec%2Flibpawn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EntySec%2Flibpawn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EntySec","download_url":"https://codeload.github.com/EntySec/libpawn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886328,"owners_count":21177644,"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":["c-programming","dll-injection","elf-format","elf-loader","elf-parser","injector","loader","macho-loader","macho-parser","pe-loader","reflective-injection","reflective-pe-loaders","rop"],"created_at":"2024-11-27T23:08:46.211Z","updated_at":"2025-04-14T13:13:09.379Z","avatar_url":"https://github.com/EntySec.png","language":"C","readme":"# libpawn\n\n[![Developer](https://img.shields.io/badge/developer-EntySec-blue.svg)](https://entysec.com)\n[![Language](https://img.shields.io/badge/language-C-grey.svg)](https://github.com/EntySec/libpawn)\n[![Forks](https://img.shields.io/github/forks/EntySec/libpawn?style=flat\u0026color=green)](https://github.com/EntySec/libpawn/forks)\n[![Stars](https://img.shields.io/github/stars/EntySec/libpawn?style=flat\u0026color=yellow)](https://github.com/EntySec/libpawn/stargazers)\n[![CodeFactor](https://www.codefactor.io/repository/github/EntySec/libpawn/badge)](https://www.codefactor.io/repository/github/EntySec/libpawn)\n\nC library that is intended for providing methods for executing and injecting code.\n\n## Features\n\n* Supports different ways of loading executable files in-memory.\n* Supports most common executable file formats: `ELF`, `PE` and `Mach-O`.\n* Lightweight and small library that can be ported to almost every single program.\n\n## Building libpawn\n\n```shell\ncmake -B build\ncd build\nmake\nsudo make install\n```\n\n| Arch | Support |\n|------|---------|\n| **x64** | yes |\n| **aarch64** | yes |\n| **armv5l** | yes |\n| **i486** | yes |\n| **mips** | yes |\n| **powerpc** | yes |\n| **s390x** | yes |\n| **armv5b** | yes |\n| **mips64** | yes |\n| **mipsel** | yes |\n| **powerpc64le** | yes |\n\n## API usage\n\n```c\n#include \u003cpawn.h\u003e\n```\n\n### Mach-O\n\nExecute main function from Mach-O bundle from buffer and pass `argv` and `env` as arguments.\n\n```c\nint pawn_exec_bundle(usigned char *bundle, size_t size, char *argv[], char *env[]);\n```\n\n### ELF\n\nExecute ELF from buffer and pass `argv` and `env` to it.\n\n```c\nint pawn_exec(unsigned char *elf, char *argv[], char *env[])\n```\n\n**NOTE:** This method does not work for statically linked targets since it uses dynamic interpreter as a part of ELF loading chain.\n\nWrite ELF to the file descriptor from buffer and execute it.\n\n```c\nint pawn_exec_fd(unsigned char *elf, char *argv[], char *env[])\n```\n\n### Examples\n\n* For examples - [examples](https://github.com/EntySec/libpawn/tree/main/examples)\n","funding_links":["https://github.com/sponsors/entysec"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentysec%2Flibpawn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentysec%2Flibpawn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentysec%2Flibpawn/lists"}