{ "info": { "author": "David D. Dorfman", "author_email": "d3dave@users.noreply.github.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: Microsoft :: Windows", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Software Development" ], "description": "cough\r\n=====\r\n\r\nA library for building COFF object files.\r\n\r\n\r\nTutorial\r\n--------\r\n\r\nStart with the ObjectModule class::\r\n\r\n module = ObjectModule()\r\n\r\nNow, let's create a '.text' section::\r\n\r\n section = Section(b'.text', SectionFlags.MEM_EXECUTE)\r\n\r\nAdd a bit of code::\r\n\r\n section.data = b'\\x29\\xC0\\xC3' # return 0\r\n section.size_of_raw_data = len(section.data)\r\n\r\nGood enough, let's add it to our module::\r\n\r\n module.sections.append(section)\r\n\r\nTo make use of that bit of code, we are going to need an exported symbol::\r\n\r\n main = SymbolRecord(b'main', section_number=1, storage_class=StorageClass.EXTERNAL)\r\n\r\nSet the value to the offset in the section::\r\n\r\n main.value = 0\r\n\r\nAnd add it to our module::\r\n\r\n module.symbols.append(main)\r\n\r\nThat's enough, let's write our module to a file::\r\n\r\n with open('test.obj', 'wb') as obj_file:\r\n obj_file.write(module.get_buffer())", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/d3dave/cough", "keywords": "coff pe obj build development", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "cough", "package_url": "https://pypi.org/project/cough/", "platform": "", "project_url": "https://pypi.org/project/cough/", "project_urls": { "Homepage": "https://github.com/d3dave/cough" }, "release_url": "https://pypi.org/project/cough/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "Write COFF object files", "version": "0.2.1" }, "last_serial": 3619048, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "730ec9ed2e08bfd25d6bfafe768fbab1", "sha256": "e0c5faf5825c5b41462f548d1b067846c61e2ecb04dbbece2c0fe43eb5378d18" }, "downloads": -1, "filename": "cough-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "730ec9ed2e08bfd25d6bfafe768fbab1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8664, "upload_time": "2017-06-10T20:55:28", "url": "https://files.pythonhosted.org/packages/df/bb/aa20e92ac273bb5d1ac60322b730bbb608a2a19f2b971800adde17b884eb/cough-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ed69a8daafb2ee6a854672a3c7791426", "sha256": "fdbfd1da086b7aa53ee19fe58ba6aa934941741bd9e8126fe9a70231e75fd393" }, "downloads": -1, "filename": "cough-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ed69a8daafb2ee6a854672a3c7791426", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5637, "upload_time": "2017-06-10T20:55:30", "url": "https://files.pythonhosted.org/packages/62/75/a964a590441a3f5efb716e8df24d471baba210e20b28bf4f3f98efc5eb9f/cough-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "730ec9ed2e08bfd25d6bfafe768fbab1", "sha256": "e0c5faf5825c5b41462f548d1b067846c61e2ecb04dbbece2c0fe43eb5378d18" }, "downloads": -1, "filename": "cough-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "730ec9ed2e08bfd25d6bfafe768fbab1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8664, "upload_time": "2017-06-10T20:55:28", "url": "https://files.pythonhosted.org/packages/df/bb/aa20e92ac273bb5d1ac60322b730bbb608a2a19f2b971800adde17b884eb/cough-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ed69a8daafb2ee6a854672a3c7791426", "sha256": "fdbfd1da086b7aa53ee19fe58ba6aa934941741bd9e8126fe9a70231e75fd393" }, "downloads": -1, "filename": "cough-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ed69a8daafb2ee6a854672a3c7791426", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5637, "upload_time": "2017-06-10T20:55:30", "url": "https://files.pythonhosted.org/packages/62/75/a964a590441a3f5efb716e8df24d471baba210e20b28bf4f3f98efc5eb9f/cough-0.2.1.tar.gz" } ] }