{ "info": { "author": "Daniel Rodriguez", "author_email": "danjrod@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development" ], "description": "fritzchecksum\n=============\n\nSmall pip installable module and Windows GUI (32 & 64 bits) to calculate the\nCRC of an AVM's Fritz!Box configuration file.\n\nThe command line/gui versions allow to overwrite the CRC directly in the read\nfile or save it to a new file.\n\nInstallation\n------------\n\n - *GUI* (look in **Releases** for the latest zip files)\n\n The *zip* files contain standalone versions that need no installation. Any\n settings/paths will be saved to the ``ini`` file in the same directory.\n\n Simply unpack and run\n\n - *Command Line* and *module*\n\n Simply run::\n\n pip install fritzchecksum\n\n The command line utility is also named ``fritzchecksum``\n\n\nCommand Line Utility\n--------------------\n\nThe usage is as follows::\n\n $ fritzchecksum --help\n usage: fritzchecksum-script.py [-h] [--change | --output OUTPUT] input\n\n FritzChecksum Calculator/Overwriter\n\n positional arguments:\n input Write input to output with new CRC\n\n optional arguments:\n -h, --help show this help message and exit\n --change, -c Change CRC directly in input file\n --output OUTPUT, -o OUTPUT\n Write input to output with new CRC\n\n\nModule *fritzchecksum*\n----------------------\n\nIn your code do things like::\n\n import fritzchecksum\n\n ...\n ...\n\n myexport = open('myexportdatei', 'r')\n oldcrc, newcrc = fritzchecksum.calc_crc32(myexport)\n\n ...\n\nThe module contains two Python 1st class citizens:\n\n - function *calc_crc32(fin, fout=None, logcb=log_null)*\n\n Calculates the CRC of a Fritz!Box configuration export file and writes\n the new CRC sum to a new configuration file\n\n Accepts:\n\n - fin: a file-like\n - fout: None or a file-like object. If a file, then the input will be\n written to the output with the new calculated CRC\n - logcb (default: ``log_null`` which is an empty stub)\n a logger which must a accepts \\*args (print will work)\n\n Returns:\n\n (oldcrc, newcrc) -> tuple\n\n oldcrc and newcrc will be strings representing a CRC32 in hexadecimal\n format if everything went fine\n\n oldcrc can be ``None`` which means an ``IOError`` exception has been\n raised and the operation has not completed successfully. In that case\n the 2nd value in the tuple contains the raised exception\n\n Note: the escape character '\\' is escaped iself in some of the\n lines. CRC calculation will be wrong if the character is not\n un-escaped.\n\n The file is composed of the following:\n\n - A global \"CONFIGURATION EXPORT\" section\n\n Some variables (a=b) may be defined at this level. This definition\n contributes to the the CRC calculation by concatenating a and b and\n null terminating the result.\n\n - Subsections:\n\n The name (null terminated) of the subsection contributes to the CRC\n calculation\n\n - XXXBINFILE Section\n\n Lines represent hexadecimal values. The values (binary converted)\n are used directly in the calculation of the CRC (stripping eol\n before)\n\n - CFGFILE Section\n\n It is a textfile embedded in the larger export file. All lines\n including '\\n' contribute to the CRC except the last line which\n must be stripped of the EOL character before being included in\n the CRC calculation\n\n\n - class *ExportFile*\n\n Class to encapsulate the parsing of an export file and overwriting of\n the CRC value\n\n After loading a file it keeps the loaded content in an internal ``fout``\n\n With the following methods:\n\n - *load(self, fin, out=True)*\n\n Loads from a file-like/string object ``fin`` and will update internal\n ``status``, ``error``, ``oldcrc`` and ``newcrc``\n\n if ``out`` is ``False`` no internal buffering of the loaded input will\n be made\n\n Returns:\n tuple -> (status, error)\n\n If status is ST_OK (True) error will be None\n If status is ST_ERROR (False) error will be the raised exception\n\n - *load_file(self, fin, out=True)*\n Loads from a file-like object ``fin`` and will update internal\n ``status``, ``error``, ``oldcrc`` and ``newcrc``\n\n if ``out`` is ``False`` no internal buffering of the loaded input will\n be made\n\n Returns:\n tuple -> (status, error)\n\n If status is ST_OK (True) error will be None\n If status is ST_ERROR (False) error will be the raised exception\n\n - *save(self, fout)*\n Writes the internal ``self.fout`` file to a file-like/string ``fout``\n\n Returns:\n tuple -> (status, error)\n\n If status is ST_OK (True) error will be None\n If status is ST_ERROR (False) error will be the raised exception\n\n - *save_file(self, fout)*\n Writes the internal ``self.fout`` file to a file-like object ``fout``\n\n Returns:\n tuple -> (status, error)\n\n If status is ST_OK (True) error will be None\n If status is ST_ERROR (False) error will be the raised exception", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/mementum/fritzchecksum/tarball/0.0.3", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mementum/fritzchecksum", "keywords": "development", "license": "GPLv3+", "maintainer": null, "maintainer_email": null, "name": "fritzchecksum", "package_url": "https://pypi.org/project/fritzchecksum/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/fritzchecksum/", "project_urls": { "Download": "https://github.com/mementum/fritzchecksum/tarball/0.0.3", "Homepage": "https://github.com/mementum/fritzchecksum" }, "release_url": "https://pypi.org/project/fritzchecksum/0.0.3/", "requires_dist": null, "requires_python": null, "summary": "AVM Fritz!Box Checksum Calculator/Overwriter", "version": "0.0.3" }, "last_serial": 1932250, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "25e0ba8d8efbe632acd9b3dbb06286fb", "sha256": "89f9021c3018c557e2ab0fafd34b01b7ac5e3243fe392ca7af6fdc7e63795549" }, "downloads": -1, "filename": "fritzchecksum-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "25e0ba8d8efbe632acd9b3dbb06286fb", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 13729, "upload_time": "2016-01-31T16:43:17", "url": "https://files.pythonhosted.org/packages/bd/e7/3b619ac36f0375345116aa61f476504f88b82ede050556493a31b0c696ce/fritzchecksum-0.0.1-py2-none-any.whl" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "5d48c36983702ce7aa87bc1cc0b27761", "sha256": "684f81af089134055dfd7cf1c0bec9bd02667f7088a57af28a9ddcd2c1cce8b2" }, "downloads": -1, "filename": "fritzchecksum-0.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "5d48c36983702ce7aa87bc1cc0b27761", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 13737, "upload_time": "2016-01-31T17:05:26", "url": "https://files.pythonhosted.org/packages/33/2a/d6c7c6db13cdf39bb0f1ffad89d79ad5860ff4140a00af43228495bca3ff/fritzchecksum-0.0.3-py2-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5d48c36983702ce7aa87bc1cc0b27761", "sha256": "684f81af089134055dfd7cf1c0bec9bd02667f7088a57af28a9ddcd2c1cce8b2" }, "downloads": -1, "filename": "fritzchecksum-0.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "5d48c36983702ce7aa87bc1cc0b27761", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 13737, "upload_time": "2016-01-31T17:05:26", "url": "https://files.pythonhosted.org/packages/33/2a/d6c7c6db13cdf39bb0f1ffad89d79ad5860ff4140a00af43228495bca3ff/fritzchecksum-0.0.3-py2-none-any.whl" } ] }