{"id":23067675,"url":"https://github.com/martinclauss/syscall_number","last_synced_at":"2025-07-05T18:08:34.863Z","repository":{"id":43176066,"uuid":"191306836","full_name":"martinclauss/syscall_number","owner":"martinclauss","description":"This tool gives you the Linux system call number (32bit and 64bit x86) for a system call name (e.g., read, write, ...).","archived":false,"fork":false,"pushed_at":"2023-11-29T13:24:54.000Z","size":22,"stargazers_count":25,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T14:04:50.937Z","etag":null,"topics":["asm","assembly","cli","ctf","exploit-development","linux","pwn","python","rop","shellcode-development","syscalls","x86-32","x86-64"],"latest_commit_sha":null,"homepage":null,"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/martinclauss.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}},"created_at":"2019-06-11T06:20:22.000Z","updated_at":"2023-11-15T04:45:33.000Z","dependencies_parsed_at":"2023-11-29T14:44:16.001Z","dependency_job_id":null,"html_url":"https://github.com/martinclauss/syscall_number","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/martinclauss/syscall_number","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinclauss%2Fsyscall_number","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinclauss%2Fsyscall_number/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinclauss%2Fsyscall_number/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinclauss%2Fsyscall_number/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinclauss","download_url":"https://codeload.github.com/martinclauss/syscall_number/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinclauss%2Fsyscall_number/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263781604,"owners_count":23510497,"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":["asm","assembly","cli","ctf","exploit-development","linux","pwn","python","rop","shellcode-development","syscalls","x86-32","x86-64"],"created_at":"2024-12-16T05:18:09.713Z","updated_at":"2025-07-05T18:08:34.804Z","avatar_url":"https://github.com/martinclauss.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# syscall_number\n\n## Description\n\nWith this little script you can search for Intel x86 Linux system call names and get the system call number as a result. There are websites like https://filippo.io/linux-syscall-table/ or https://www.informatik.htw-dresden.de/~beck/ASM/syscall_list.html but who wants to google all the time when he/she can have a command-line tool that works for 32bit **and** 64bit!\n\n## Requirements\n\n### gcc with 32bit support\n\nUbuntu:\n```\nsudo apt-get install gcc gcc-multilib\n```\n\nFedora:\n```\nsudo dnf install gcc glibc-devel.i686\n```\n\n## Installation\n\nMake sure you have a Python version \u003e= 3.6! (check with `python3 --version`)\n\nCreate and activate a virtual environment:\n\n```\npython3 -m venv venv\nsource ./venv/bin/activate\n```\n\nThis virtual environment must then be active everytime you want to use `syscall_number`.\n\n```\npython3 -m pip install git+https://github.com/martinclauss/syscall_number.git\n```\n\nNow you can run the command without the `.py` extension from everywhere:\n```\nsyscall_number --help\n```\n\n## Updates\n\nYou won't get new features / bug fixes automatically but you can easily update:\n\n```\npython3 -m pip install --upgrade git+https://github.com/martinclauss/syscall_number.git\n```\n\n## Uninstallation\n\n```\npython3 -m pip uninstall syscall_number\n```\n\n## Usage\n\n```shell\n# the first time the command takes a bit longer since it builds a cache for all system calls\n# query the system call (-s) read for 32bit (-b 32):\nsyscall_number -s read -b 32\n\n# this should run a lot faster\n# query the system call (-s) write for 64bit (-b 64):\nsyscall_number -s write -b 64\n\n# reverse lookup is also possible with decimal and hexadecimal numbers\nsyscall_number -n 11 -b 32\nsyscall_number -n 0xb -b 32 \n\n# this lists all (-a) 32bit (-b 32) system calls:\nsyscall_number -a -b 32\n\n# and this lists all (-a) 64bit (-b 64) system calls:\nsyscall_number -a -b 64\n\n# reverse search is also possible with grep:\nsyscall_number -a -b 32 | grep read\n\n# if you just want the system call number without any additional text use -q:\nsyscall_number -s connect -b 32 -q\n\n# or in a more complex scenario with pwntools' asm script (http://docs.pwntools.com/en/stable/asm.html)\necho \"mov eax, $(syscall_number -s exit -b 32 -q); mov ebx, 42; int 0x80\" | asm\n\n# additionally show an excerpt of the man page for the system call with -m:\nsyscall_number -s read -b 32 -m\n\n\n```\n\n\n## Alternatives\n\n[pwntools](http://docs.pwntools.com/en/stable/) also provides a similar but more complex method with the `syscall()` function: [32bit](http://docs.pwntools.com/en/stable/shellcraft/i386.html#pwnlib.shellcraft.i386.linux.syscall) and [64bit](http://docs.pwntools.com/en/stable/shellcraft/amd64.html#pwnlib.shellcraft.amd64.linux.syscall).\n\n## Contribution\n\nPull Requests are welcome! :)\n\n## Thanks\n\n[@tbehner](https://github.com/tbehner)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinclauss%2Fsyscall_number","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinclauss%2Fsyscall_number","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinclauss%2Fsyscall_number/lists"}