{ "info": { "author": "Facundo Batista", "author_email": "facundo@taniquetil.com.ar", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Disassemblers", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "yaswfp\r\n======\r\n\r\nYet Another SWF Parser.\r\n\r\nYou can pronounce whatever you like :)\r\n\r\n\r\nHow to use it\r\n-------------\r\n\r\nYou can use ``swfparser.py`` as command line program or as a module.\r\n\r\nIf you execute directly the usage is::\r\n\r\n swfparser.py [-h] [-t] [-e] filepath\r\n\r\n positional arguments:\r\n filepath the SWF file to parse\r\n\r\n optional arguments:\r\n -h, --help show this help message and exit\r\n -t, --show-tags show the first level tags of the file\r\n -e, --extended show all objects with full detail and nested\r\n\r\nIf you want to use it as a module, you can use the ``SWFParser`` class\r\ndirectly or the handy ``parsefile`` function::\r\n\r\n >>> swf = swfparser.parsefile()\r\n >>> swf.header\r\n Header(name=Header, FileLength=4228, ...)\r\n >>> len(swf.tags)\r\n 365\r\n >>> swf.tags[0]\r\n UnknownObject(name=SetBackgroundColor, raw_payload=b'\\xff\\xff\\xff')\r\n >>> swf.tags[3]\r\n >>> obj = swf.tags[3]\r\n >>> obj\r\n PlaceObject2(name=PlaceObject2, CharacterId=1, ...)\r\n >>> obj.CharacterId\r\n 1\r\n >>> obj.Matrix.ScaleX\r\n 65536\r\n\r\nThis follows the `SWF File Format Specification Version 19`_, but it is\r\nnot (yet) 100% covered, so you may find some *unknown objects*.\r\n\r\n\r\nHow to deal with still-unknown-objects\r\n--------------------------------------\r\n\r\nNot all the spec is covered (this is a work in progress!).\r\n\r\nWhen the parser finds a structure that still can't process (because more\r\nprogramming is needed), will just return an UnknownObject object with\r\nthe unparsed bytes, or will raise an exception if you set\r\nthe unknown_alert flag::\r\n\r\n SWFParser.unknown_alert = True\r\n\r\nAdd new structures to the parser is very simple. I'll be very glad to\r\ndo it if you offer a real stream of bytes as an example or even\r\na sample SWF file with the still missing object inside.\r\n\r\n\r\nChecking coverage\r\n-----------------\r\n\r\nThere is an easy way of checking how many of the objects (tags, actions,\r\nstructures, etc) are properly covered by the parser: just use the\r\n``coverage`` parameter::\r\n\r\n $ python3 yaswfp/swfparser.py -c yaswfp/tests/samples/1252533834.swf\r\n Header(Signature='CWS', ...)\r\n Tags count: 55\r\n Coverage is 97.3% of 74 total items\r\n Most common parsed objects:\r\n 22 PlaceObject2\r\n 21 ShowFrame\r\n 10 LineStyleArray\r\n Most common Unknown objects\r\n 2 DefineMorphShape2\r\n\r\n\r\nDevelopment\r\n-----------\r\n\r\nTo run the tests:\r\n\r\n ./test\r\n\r\nYou'll need ``python3-flake8`` and ``python3-nose``. Of course, this is\r\nPython 3.\r\n\r\nTo complete some methods or be able to parse new structures, we should add\r\nexamples that show that new stuff, see current \"sanity\" tests. Yes, unit tests\r\nare desirable, feel free to add those too.\r\n\r\nThe project is hosted in GitHub::\r\n\r\n https://github.com/facundobatista/yaswfp\r\n\r\n\r\nContact\r\n-------\r\n\r\nAny doubt, any question, any suggestion, or whatever, feel free to open\r\nan issue in GitHub or find me in IRC, I'm ``facundobatista`` in Freenode.\r\n\r\nThanks!\r\n\r\n\r\n.. _SWF File Format Specification Version 19: http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/swf/pdf/swf-file-format-spec.pdf", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/facundobatista/yaswfp", "keywords": "", "license": "GPL-3", "maintainer": "", "maintainer_email": "", "name": "yaswfp", "package_url": "https://pypi.org/project/yaswfp/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/yaswfp/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/facundobatista/yaswfp" }, "release_url": "https://pypi.org/project/yaswfp/0.9.3/", "requires_dist": null, "requires_python": null, "summary": "Yet Another SWF Parser.", "version": "0.9.3" }, "last_serial": 1488996, "releases": { "0.1": [], "0.2": [], "0.3": [], "0.4": [], "0.5": [], "0.6": [], "0.7": [], "0.8": [], "0.9": [ { "comment_text": "", "digests": { "md5": "364a0fedc02776d48ca9cb831cb5c48d", "sha256": "afe67fa1456eaac47cf601759c085d60c008ae5dd29955a31d82729c53e695ac" }, "downloads": -1, "filename": "yaswfp-0.9.tar.gz", "has_sig": false, "md5_digest": "364a0fedc02776d48ca9cb831cb5c48d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16180, "upload_time": "2014-08-27T01:55:30", "url": "https://files.pythonhosted.org/packages/60/04/aa000f2cde51febab074987900eebe4da042659c724dd066fe957c6e10f3/yaswfp-0.9.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "e34c916f4c6954545b2ba13b1fa5ca47", "sha256": "c1b03700a3d25bf3963f1c949fd4ceb5e5b6b1243f8e49eca1002fcbc330cc57" }, "downloads": -1, "filename": "yaswfp-0.9.1.tar.gz", "has_sig": false, "md5_digest": "e34c916f4c6954545b2ba13b1fa5ca47", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16210, "upload_time": "2014-08-27T02:06:33", "url": "https://files.pythonhosted.org/packages/c5/63/6f3ba9a0627a8defb52b031678f67d329905ca794512bff4524547099e7c/yaswfp-0.9.1.tar.gz" } ], "0.9.2": [ { "comment_text": "", "digests": { "md5": "be5472d06ddb47a3cfccab5cd452df98", "sha256": "1003befebde13b1ae009cb0d0aa6e599c9d1bed8069d430a9819e5d675d60303" }, "downloads": -1, "filename": "yaswfp-0.9.2.tar.gz", "has_sig": false, "md5_digest": "be5472d06ddb47a3cfccab5cd452df98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29836, "upload_time": "2014-08-27T02:11:42", "url": "https://files.pythonhosted.org/packages/8f/8f/96ab599b74cde9eb42664baaff5d2aa3b0aa3d8b0a98c800f64f8789eba5/yaswfp-0.9.2.tar.gz" } ], "0.9.3": [ { "comment_text": "", "digests": { "md5": "dbb46539778af82ac0684000cdf1365a", "sha256": "6171057367476bbb511ae1ff95f0963f86079dd2fcb0e9771c6d9763ed351c8d" }, "downloads": -1, "filename": "yaswfp-0.9.3.tar.gz", "has_sig": false, "md5_digest": "dbb46539778af82ac0684000cdf1365a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29845, "upload_time": "2014-08-27T02:13:05", "url": "https://files.pythonhosted.org/packages/28/80/162a418d1ae03e79987126feb0c42b876f72d5c9d33df2bed8690c6fc12a/yaswfp-0.9.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dbb46539778af82ac0684000cdf1365a", "sha256": "6171057367476bbb511ae1ff95f0963f86079dd2fcb0e9771c6d9763ed351c8d" }, "downloads": -1, "filename": "yaswfp-0.9.3.tar.gz", "has_sig": false, "md5_digest": "dbb46539778af82ac0684000cdf1365a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29845, "upload_time": "2014-08-27T02:13:05", "url": "https://files.pythonhosted.org/packages/28/80/162a418d1ae03e79987126feb0c42b876f72d5c9d33df2bed8690c6fc12a/yaswfp-0.9.3.tar.gz" } ] }