{ "info": { "author": "Olli Jarva", "author_email": "olli@jarva.fi", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Topic :: Software Development :: Libraries" ], "description": "Browser upgrade detection\n=========================\n\nThis small library detects browser downgrades and major changes,\nincluding OS/browser family changes. It could be used as an indicator\nof user browser authenticity: if authentication cookies are used\non downgraded browser, it might be restored from a backup.\n\nSimilarly, cookie that appears on completely different platform\nor browser is probably either stolen or copied. This check is not\nfoolproof, as attacker can easily spoof user-agent too.\n\nExample usage:\n\n::\n\n from browser_compare import *\n\n old_ua = 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0'\n new_ua = 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0'\n another_ua = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:27.0) Gecko/20100101 Firefox/27.0'\n\n bc = BrowserCompare(old_ua, new_ua)\n print bc.compare() # True\n\n bc = BrowserCompare(new_ua, old_ua)\n print bc.compare() # raises UADowngradedException\n\n bc = BrowserCompare(old_ua, another_ua)\n print bc.compare() # raises UAChangedException\n\nUse ``UAException`` to catch any problems with user-agents, if you don't\ncare why it was rejected. Additional information is available in \n``exception.msg``.\n\nLicense\n-------\n\nLicensed under MIT license:\n\nCopyright (c) 2014 Olli jarva olli@jarva.fi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/ojarva/browser-compare", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ojarva/browser-compare", "keywords": "browser user-agent", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "browser_compare", "package_url": "https://pypi.org/project/browser_compare/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/browser_compare/", "project_urls": { "Download": "https://github.com/ojarva/browser-compare", "Homepage": "https://github.com/ojarva/browser-compare" }, "release_url": "https://pypi.org/project/browser_compare/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "Library for detecting browser changes", "version": "0.0.1" }, "last_serial": 1025572, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "321c5b07daf5025a469ba1a6455d77ee", "sha256": "6d71edae1cdffc13e3f306559edaad4d6cd9310dc3f46eb96ae6561a30703425" }, "downloads": -1, "filename": "browser_compare-0.0.1.tar.gz", "has_sig": false, "md5_digest": "321c5b07daf5025a469ba1a6455d77ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2788, "upload_time": "2014-03-10T16:36:29", "url": "https://files.pythonhosted.org/packages/f8/47/9883d7abb65a431b080a6480f25d36b8251d52c9497ce4cfeffb7259893b/browser_compare-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "321c5b07daf5025a469ba1a6455d77ee", "sha256": "6d71edae1cdffc13e3f306559edaad4d6cd9310dc3f46eb96ae6561a30703425" }, "downloads": -1, "filename": "browser_compare-0.0.1.tar.gz", "has_sig": false, "md5_digest": "321c5b07daf5025a469ba1a6455d77ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2788, "upload_time": "2014-03-10T16:36:29", "url": "https://files.pythonhosted.org/packages/f8/47/9883d7abb65a431b080a6480f25d36b8251d52c9497ce4cfeffb7259893b/browser_compare-0.0.1.tar.gz" } ] }