{"id":15489306,"url":"https://github.com/floydz/assemblylinepython","last_synced_at":"2025-10-31T20:30:37.425Z","repository":{"id":217372460,"uuid":"743294302","full_name":"FloydZ/AssemblyLinePython","owner":"FloydZ","description":"Python Wrapper aournd AssemblyLine. Generate amd64 assembly on the fly","archived":false,"fork":false,"pushed_at":"2024-06-16T14:45:19.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-17T03:38:50.299Z","etag":null,"topics":["assembly","assemblyline","x86-64"],"latest_commit_sha":null,"homepage":"","language":"Python","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/FloydZ.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":"2024-01-14T22:30:04.000Z","updated_at":"2024-06-16T14:45:22.000Z","dependencies_parsed_at":"2024-01-19T12:44:01.065Z","dependency_job_id":"68584624-6152-4791-a03e-27df6795798f","html_url":"https://github.com/FloydZ/AssemblyLinePython","commit_stats":null,"previous_names":["floydz/assemblylinepython"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloydZ%2FAssemblyLinePython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloydZ%2FAssemblyLinePython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloydZ%2FAssemblyLinePython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FloydZ%2FAssemblyLinePython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FloydZ","download_url":"https://codeload.github.com/FloydZ/AssemblyLinePython/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239231115,"owners_count":19603989,"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":["assembly","assemblyline","x86-64"],"created_at":"2024-10-02T07:04:55.581Z","updated_at":"2025-10-31T20:30:37.382Z","avatar_url":"https://github.com/FloydZ.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"AssemblyLineLibrary\n===================\nWrapper around [AssemblyLine](https://github.com/0xADE1A1DE/AssemblyLine)\nto generate machine of x86_64 assembly code on the fly without calling an \nassembler or compiler.\n\nUsage:\n-----\nOne can either assemble a file:\n```python\nt = AssemblyLineBinary(path_to_file)\nt.print().strict().run()\n```\n\nor a string:\n```python\ntesxt = \"mov rax, 0x0\\nadd rax, 0x2; adds two\"\nt = AssemblyLineBinary(test)\nt.print().strict().run()\n```\n\nFlags:\n------\nThe wrapper library supports the same flags as [asmline](https://github.com/0xADE1A1DE/AssemblyLine/tree/main/tools).\nE.g.:\n```python\nt = AssemblyLineBinary(test)\nt.assemble()\n    # memory will initialize with random memory\n    .rand()\n    # output the assembly in a hex format\n    .print()\n    # output the assembly into file\n    .Print(file)\n    # output the machine code into an object file\n    .object_(file)\n    # each input will be aligned to the given boundary in bytes. NOP instructions\n    # are used for the alignment\n    .chunk(chunk_size)\n    # Enables nasm-style mov-immediate register-size handling.\n    .nasm_mov_imm()\n    # Disables nasm-style mov-immediate register-size handling.\n    .strict_mov_imm()\n    # The immediate value will be checked for leading 0's, to decide if the\n    # nasm mov style should be used or not.\n    .smart_mov_imm()\n    # In SIB addressing if the index register is esp or rsp then the base and\n    # index registers will be swapped.\n    .nasm_sib_index_base_swap()\n    #\n    .strict_sib_index_base_swap()\n    # In SIB addressing if there is no base register present and scale is equal\n    # to 2; the base register will be set to the index register and the scale\n    # will be reduced to 1.\n    .nasm_sib_no_base()\n    #\n    .strict_sib_no_base()\n    # equivalent to `.nasm_sib_index_base_swap().nasm_sib_no_base()`\n    .nasm_sib()\n    # equivalent to `.strict_sib_index_base_swap().strict_sib_no_base()`\n    .strict_sib()\n    # equivalent to `.nasm_mov_imm().nasm_sib()`\n    .nasm()\n    # equivalent to `.strict_mov_imm().strict_sib()`\n    .strict()\n```\nmore details are [here](https://github.com/FloydZ/AssemblyLinePython/blob/ed17efe46a4e474368bb5ded5108643eb90424ab/AssemblyLinePython/execute.py#L159)\n\nInstall:\n========\nvia pip:\n```bash\npip install git+https://github.com/FloydZ/AssemblyLinePython\n```\nNote: the following packages need to be accessible via shell:\n- `autoconf`\n- `automake`\n- `libtool`\n- `pkg-config`\n\nThese can be installed via:\n### Ubuntu:\n```shell \nsudo apt install autotools make pkg-config\n```\n\n### Arch:\n```shell \nsudo pacman -S autotools make pkg-config\n```\n\n### NixOS:\n```shell \nnix-shell\n```\n\nBuild:\n======\nYou can build the project either via `nix`:\n```bash\ngit clone https://github.com/FloydZ/AssemblyLinePython\ncd AssemblyLinePython\nnix-shell  \n```\nwhich gives you a precompiled development environment or run:\n```bash\ngit clone https://github.com/FloydZ/AssemblyLinePython\ncd AssemblyLinePython\npip install -r requirements.txt\n./build.sh\n\n# build the python package for development\npip install --editable .\n```\n\nKnown bugs:\n===========\n- implement the incremental API\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloydz%2Fassemblylinepython","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloydz%2Fassemblylinepython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloydz%2Fassemblylinepython/lists"}