{ "info": { "author": "@nezlooy", "author_email": "r.bazhin@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python", "Topic :: Software Development :: Testing" ], "description": "pyZZUF\r\n======\r\n\r\nPython implementation of bit-flip `zzuf`_ mutator.\r\n\r\nNo more ``os.system``, ``subprocess.check_output`` and\r\n``subprocess.Popen`` |:thumbsup:|\r\n\r\nBasic usage\r\n-----------\r\n\r\nInline\r\n~~~~~~\r\n\r\n.. code:: python\r\n\r\n from pyZZUF import *\r\n\r\n print pyZZUF('good').mutate()\r\n\r\nOptions\r\n~~~~~~~\r\n\r\n.. code:: python\r\n\r\n from pyZZUF import *\r\n\r\n zzuf = pyZZUF('good')\r\n\r\n # Random seed (default 0)\r\n zzuf.set_seed(9)\r\n # Bit fuzzing ratio (default 0.004)\r\n zzuf.set_ratio(0.91)\r\n\r\n # Offsets and ranges\r\n zzuf.set_offset(6)\r\n # Only fuzz bytes at offsets within \r\n zzuf.set_fuzz_bytes([[0, 3], [6, EOF]])\r\n\r\n # Protect bytes and characters in \r\n zzuf.set_protected([0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39])\r\n # Append more bytes\r\n zzuf.set_protected(\"0123456789\", True)\r\n\r\n # Refuse bytes and characters in \r\n zzuf.set_refused(\"abcd\")\r\n # Append more bytes\r\n zzuf.set_refused([0x00, 0xFF], True)\r\n\r\n # Permit bytes and characters in \r\n zzuf.set_permitted('bad')\r\n # Append more bytes\r\n zzuf.set_permitted('!', True)\r\n\r\n # Fuzzing mode ([xor] set unset)\r\n zzuf.set_fuzz_mode(FUZZ_MODE_XOR)\r\n\r\n print zzuf.mutate()\r\n\r\nMutagen\r\n~~~~~~~\r\n\r\n.. code:: python\r\n\r\n zzuf = pyZZUF('good')\r\n\r\n for data in zzuf.mutagen(start=0.0, stop=1, step=0.1):\r\n if __debug__:\r\n seed, ratio, index = data.get_state()\r\n print data.tostring().encode('hex'), seed, ratio, index\r\n if data == 'bad!':\r\n break\r\n\r\nInheritance of the previous state (meat)\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n.. code:: python\r\n\r\n zzuf = pyZZUF('good')\r\n\r\n for data in zzuf.mutagen(start=0.0, stop=1, step=0.1, inheritance=True):\r\n if __debug__:\r\n seed, ratio, index = data.get_state()\r\n print data.tostring().encode('hex'), seed, ratio, index\r\n if data == 'bad!':\r\n break\r\n\r\nStream-generator with restoring state of mutator\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n.. code:: python\r\n\r\n obj = pyZZUF('good')\r\n gen = obj.mutagen(start=0.0, stop=1, step=0.01)\r\n\r\n while True:\r\n try:\r\n data = gen.next()\r\n seed, ratio, index = data.get_state()\r\n \r\n if __debug__:\r\n print data.tostring().encode('hex'), seed, ratio, index\r\n\r\n if seed == 20:\r\n # Set next state of generator (, ).\r\n # In this example, it makes an infinite loop!\r\n gen.send((0, 0.0))\r\n\r\n if data == 'bad!':\r\n break\r\n except StopIteration:\r\n break\r\n\r\nCheck of identity\r\n-----------------\r\n\r\n.. code:: bash\r\n\r\n $ echo -n \"The quick brown fox jumps over the lazy dog\" | zzuf -r0.04 | hd\r\n\r\n 00000000 54 68 65 20 71 75 69 63 6b 20 62 72 6f 57 6c 20 |The quick broWl |\r\n 00000010 66 4f 58 20 6a 75 6f 70 73 24 6f 76 75 72 20 74 |fOX juops$ovur t|\r\n 00000020 68 65 21 6c 61 7a 78 20 66 6f 67 |he!lazx fog|\r\n 0000002b\r\n\r\n $ python -c \"import pyZZUF, sys; sys.stdout.write(pyZZUF.pyZZUF('The quick brown fox jumps over the lazy dog', ratio=0.04).mutate().tostring())\" | hd\r\n\r\n 00000000 54 68 65 20 71 75 69 63 6b 20 62 72 6f 57 6c 20 |The quick broWl |\r\n 00000010 66 4f 58 20 6a 75 6f 70 73 24 6f 76 75 72 20 74 |fOX juops$ovur t|\r\n 00000020 68 65 21 6c 61 7a 78 20 66 6f 67 |he!lazx fog|\r\n 0000002b\r\n\r\nInstallation\r\n------------\r\n\r\n pip install pyZZUF\r\n\r\nNotes\\*\r\n-------\r\n\r\nUse `PyPy`_ for speedup\r\n\r\n.. _PyPy: http://pypy.org/\r\n\r\n.. _zzuf: http://caca.zoy.org/wiki/zzuf\r\n\r\n.. |:thumbsup:| image:: https://assets-cdn.github.com/images/icons/emoji/unicode/1f44d.png\r\n :height: 20px\r\n :width: 20px", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nezlooy/pyZZUF", "keywords": "fuzzer zzuf mutator", "license": "UNKNOWN", "maintainer": "", "maintainer_email": "", "name": "pyZZUF", "package_url": "https://pypi.org/project/pyZZUF/", "platform": "POSIX,Windows", "project_url": "https://pypi.org/project/pyZZUF/", "project_urls": { "Homepage": "https://github.com/nezlooy/pyZZUF" }, "release_url": "https://pypi.org/project/pyZZUF/0.1/", "requires_dist": null, "requires_python": null, "summary": "Python implementation of zzuf mutator - little bit-flip atomic bomb", "version": "0.1" }, "last_serial": 5479199, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "9f8caee836fa0aee0d8cfeb12ab2fed9", "sha256": "cc27fd45e2b8127aa13e409c1b79379f5fa07bda9de3b21d65b6cbc1ca05bb3e" }, "downloads": -1, "filename": "pyZZUF-0.1-py2.7.egg", "has_sig": false, "md5_digest": "9f8caee836fa0aee0d8cfeb12ab2fed9", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 8033, "upload_time": "2014-11-04T22:08:10", "url": "https://files.pythonhosted.org/packages/d3/80/c6db42e65c2c7c2fe4cb547716f51e4005f194e2974e498094bd4087f758/pyZZUF-0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "6209888d7003430ec644eaace37eac2b", "sha256": "06614a6dc9dc6136ac27ff8ac773454709fb21a285359c16ee4e058e128a941d" }, "downloads": -1, "filename": "pyZZUF-0.1-py2.7.tar.gz", "has_sig": false, "md5_digest": "6209888d7003430ec644eaace37eac2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4344, "upload_time": "2014-11-04T23:40:15", "url": "https://files.pythonhosted.org/packages/88/e3/b90b1fe2a6bf9a67a9da297185d82b24c7c5d911b58618272445b1278c5d/pyZZUF-0.1-py2.7.tar.gz" }, { "comment_text": "", "digests": { "md5": "78ced9264d2658d110691ccfbe4dc61d", "sha256": "ba393f731a145b00f4cf03ac227bebde0c47238a616f27b671f3a2f4a29b4480" }, "downloads": -1, "filename": "pyZZUF-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "78ced9264d2658d110691ccfbe4dc61d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4320, "upload_time": "2019-07-03T02:28:19", "url": "https://files.pythonhosted.org/packages/37/c4/76457104c8017a7ac1bc8d1e0ce04bb32384979a4023baa9d8be56315d90/pyZZUF-0.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9f8caee836fa0aee0d8cfeb12ab2fed9", "sha256": "cc27fd45e2b8127aa13e409c1b79379f5fa07bda9de3b21d65b6cbc1ca05bb3e" }, "downloads": -1, "filename": "pyZZUF-0.1-py2.7.egg", "has_sig": false, "md5_digest": "9f8caee836fa0aee0d8cfeb12ab2fed9", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 8033, "upload_time": "2014-11-04T22:08:10", "url": "https://files.pythonhosted.org/packages/d3/80/c6db42e65c2c7c2fe4cb547716f51e4005f194e2974e498094bd4087f758/pyZZUF-0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "6209888d7003430ec644eaace37eac2b", "sha256": "06614a6dc9dc6136ac27ff8ac773454709fb21a285359c16ee4e058e128a941d" }, "downloads": -1, "filename": "pyZZUF-0.1-py2.7.tar.gz", "has_sig": false, "md5_digest": "6209888d7003430ec644eaace37eac2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4344, "upload_time": "2014-11-04T23:40:15", "url": "https://files.pythonhosted.org/packages/88/e3/b90b1fe2a6bf9a67a9da297185d82b24c7c5d911b58618272445b1278c5d/pyZZUF-0.1-py2.7.tar.gz" }, { "comment_text": "", "digests": { "md5": "78ced9264d2658d110691ccfbe4dc61d", "sha256": "ba393f731a145b00f4cf03ac227bebde0c47238a616f27b671f3a2f4a29b4480" }, "downloads": -1, "filename": "pyZZUF-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "78ced9264d2658d110691ccfbe4dc61d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4320, "upload_time": "2019-07-03T02:28:19", "url": "https://files.pythonhosted.org/packages/37/c4/76457104c8017a7ac1bc8d1e0ce04bb32384979a4023baa9d8be56315d90/pyZZUF-0.1-py3-none-any.whl" } ] }