{ "info": { "author": "Olli Jarva", "author_email": "olli@jarva.fi", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Topic :: Software Development :: Libraries", "Topic :: System :: Networking :: Monitoring" ], "description": "p0f Python API client\n=====================\n\nThis is a simple API client for p0f3, available at \nhttp://lcamtuf.coredump.cx/p0f3/ . It is not compatible with version 2.x \nor 1.x. Start p0f with ``-s path/to/unix_socket`` option.\n\nBasic usage:\n\n::\n\n from p0f import P0f, P0fException\n\n data = None\n p0f = P0f(\"p0f.sock\") # point this to socket defined with \"-s\" argument.\n try:\n data = p0f.get_info(\"192.168.0.1\")\n except P0fException, e:\n # Invalid query was sent to p0f. Maybe the API has changed?\n print e\n except KeyError, e:\n # No data is available for this IP address.\n print e\n except ValueError, e:\n # p0f returned invalid constant values. Maybe the API has changed?\n print e\n\n if data:\n print \"First seen:\", data[\"first_seen\"]\n print \"Last seen:\", data[\"last_seen\"]\n\n\nDjango integration\n------------------\n\nSee examples/django_models.py for complete Django model of the data returned by p0f.\n\nDjango middleware is available in ``p0f.django.middleware``.\n\nTo use, add ``P0FSOCKET = \"path/to/p0f_unix_socket\"`` to your project's settings.py,\nand ``p0f.django.middleware.P0fMiddleware`` to ``MIDDLEWARE_CLASSES``.\n\nThe middleware adds ``p0f`` attribute to all incoming requests. ``request.p0f`` is\nNone if connection to p0f failed or p0f did not return data for remote IP address.\n\nData fields\n-----------\n\nParts of these descriptions are shamelessly copied from \nhttp://lcamtuf.coredump.cx/p0f3/README :\n\nBy default, following fields are parsed:\n\n- datetime: **first_seen**\n- datetime: **last_seen**\n- timedelta: **uptime**\n- int: **uptime_sec**\n- timedelta: **up_mod_days**\n- datetime: **last_nat**\n- datetime: **last_chg**\n\nAdditionally, **bad_sw** and **os_match_q** are validated. \"ValueError\"\nis raised, if incorrect value is encountered. For all empty fields,\nNone is used instead of empty strings or constants:\n\n- **uptime_min**\n- **uptime_sec**\n- **uptime**\n- **up_mod_days**\n- **last_nat**\n- **last_chg**\n- **distance**\n- **bad_sw**\n- **os_name**\n- **os_flavor**\n- **http_flavor**\n- **link_type**\n- **language**\n\nThis parsing and validation can be disabled with\n\n::\n\n p0f.get_info(\"192.168.0.1\", True)\n\nFull descriptions of the fields:\n\n- int: **first_seen** - unix time (seconds) of first observation of the host.\n- int: **last_seen** - unix time (seconds) of most recent traffic.\n- int: **total_conn** - total number of connections seen.\n- int: **uptime_min** - calculated system uptime, in minutes. Zero if not known.\n- int: **up_mod_days** - uptime wrap-around interval, in days.\n- int: **last_nat** - time of the most recent detection of IP sharing (NAT, load balancing, proxying). Zero if never detected.\n- int: **last_chg** - time of the most recent individual OS mismatch (e.g., due to multiboot or IP reuse).\n- int: **distance** - system distance (derived from TTL; -1 if no data).\n- int: **bad_sw** - p0f thinks the User-Agent or Server strings aren't accurate. The value of 1 means OS difference (possibly due to proxying), while 2 means an outright mismatch. NOTE: If User-Agent is not present at all, this value stays at 0.\n- int: **os_match_q** - OS match quality: 0 for a normal match; 1 for fuzzy (e.g., TTL or DF difference); 2 for a generic signature; and 3 for both.\n- string: **os_name** - Name of the most recent positively matched OS. If OS not known, os_name is empty string. NOTE: If the host is first seen using an known system and then switches to an unknown one, this field is not reset.\n- string: **os_flavor** - OS version. May be empty if no data.\n- string: **http_name** - most recent positively identified HTTP application (e.g. 'Firefox').\n- string: **http_flavor** - version of the HTTP application, if any.\n- string: **link_type** - network link type, if recognized.\n- string: **language** - system language, if recognized.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/ojarva/p0f3-api-py", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ojarva/p0f3-api-py", "keywords": "p0f fingerprinting API client", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "p0f", "package_url": "https://pypi.org/project/p0f/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/p0f/", "project_urls": { "Download": "https://github.com/ojarva/p0f3-api-py", "Homepage": "https://github.com/ojarva/p0f3-api-py" }, "release_url": "https://pypi.org/project/p0f/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "API client for p0f3", "version": "1.0.0" }, "last_serial": 1349277, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "eff850cfef68258ffce337c895eeb6fd", "sha256": "0ee5e67f57da6216a09654f9ae2bf5d0b28e790d4dab58192f8dcf9323534d20" }, "downloads": -1, "filename": "p0f-0.0.2.macosx-10.8-x86_64.exe", "has_sig": false, "md5_digest": "eff850cfef68258ffce337c895eeb6fd", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 70879, "upload_time": "2014-03-01T16:49:57", "url": "https://files.pythonhosted.org/packages/64/cc/50af3ba49e7820456320514b056e7f743792509837d99c9b729cd4bba505/p0f-0.0.2.macosx-10.8-x86_64.exe" }, { "comment_text": "", "digests": { "md5": "7eb33bc2a7f95c8a3c05d201c39b33e3", "sha256": "05a5a3fc9f42e0433b38227098cdf44dcd90f209bbf7a81648c7a43f9d366db3" }, "downloads": -1, "filename": "p0f-0.0.2.tar.gz", "has_sig": false, "md5_digest": "7eb33bc2a7f95c8a3c05d201c39b33e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5360, "upload_time": "2014-03-01T16:49:55", "url": "https://files.pythonhosted.org/packages/c3/21/1403ed296cd84dd76463e5286533b1f0ca3697e44fdd6e4eb6c8ecd8a103/p0f-0.0.2.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "48ffa096ad6c894db05b16566fbca46e", "sha256": "ef6129c0409928f25515652e36e8f550f7eb734d8fadf1adf2d4f9c37ce5bfec" }, "downloads": -1, "filename": "p0f-0.1.0.macosx-10.8-x86_64.exe", "has_sig": false, "md5_digest": "48ffa096ad6c894db05b16566fbca46e", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 71327, "upload_time": "2014-03-02T11:38:09", "url": "https://files.pythonhosted.org/packages/ae/6e/4e18ce43fb9eb633caa678bd1a6b598f2d54af790487f8c5b208d55339f8/p0f-0.1.0.macosx-10.8-x86_64.exe" }, { "comment_text": "", "digests": { "md5": "b8177aaf4ec4761653213e76f371ecf7", "sha256": "6ca5cbd80152240c9525e65c4d9c71ec7f63ee8a0d823bf9ff864b74e5aa7901" }, "downloads": -1, "filename": "p0f-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b8177aaf4ec4761653213e76f371ecf7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5567, "upload_time": "2014-03-02T11:38:07", "url": "https://files.pythonhosted.org/packages/9e/16/8885df34710c6f2b0680bec3b704b811c2f989397416c7de3c0f6eb12b64/p0f-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "8e2e2d8aafb0471bfde0e58983728615", "sha256": "07ba1f9013dd376f554a15d33ce6c8f2bdb374611e8810286382a8a19b23ece6" }, "downloads": -1, "filename": "p0f-0.1.1.macosx-10.8-x86_64.exe", "has_sig": false, "md5_digest": "8e2e2d8aafb0471bfde0e58983728615", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 72859, "upload_time": "2014-03-02T14:07:17", "url": "https://files.pythonhosted.org/packages/24/db/0c6a93f949db301b5051eee8a061f5db3bc4a6250c5c1f519e2217bdcbaa/p0f-0.1.1.macosx-10.8-x86_64.exe" }, { "comment_text": "", "digests": { "md5": "7a547a5b8b996d7c254ab5be735f355d", "sha256": "6212b2aa90e3844f0db7468c4b3ce8fa8af1630354f912ac9120059d983ada80" }, "downloads": -1, "filename": "p0f-0.1.1.tar.gz", "has_sig": false, "md5_digest": "7a547a5b8b996d7c254ab5be735f355d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6598, "upload_time": "2014-03-02T14:07:15", "url": "https://files.pythonhosted.org/packages/97/49/f7592247c9dbbab438d6b0f131319ed2548cc827a6786df4ea2dbceff7f6/p0f-0.1.1.tar.gz" } ], "1.0.0": [ { "comment_text": "built for Darwin-14.0.0", "digests": { "md5": "33186ae1dc349d715d23c7d3d120b619", "sha256": "e66e45fb07ff8a5c060c8e92be83db17de625f3b7b349554933c8f546aaf46b7" }, "downloads": -1, "filename": "p0f-1.0.0.macosx-10.10-x86_64.tar.gz", "has_sig": false, "md5_digest": "33186ae1dc349d715d23c7d3d120b619", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 7014, "upload_time": "2014-12-18T13:53:05", "url": "https://files.pythonhosted.org/packages/33/f8/c9026b3ecb5732df6c80f9a99ed270d185d79a19fa6c7d3e63bc7b6be636/p0f-1.0.0.macosx-10.10-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "5de6a237535562b5cad316ee13f7fcb4", "sha256": "f61cb23ce6b4eb3c7c0d0b5e40b09a53f26790763c93e70dc784302681b3b1a8" }, "downloads": -1, "filename": "p0f-1.0.0.tar.gz", "has_sig": false, "md5_digest": "5de6a237535562b5cad316ee13f7fcb4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5602, "upload_time": "2014-12-18T13:53:01", "url": "https://files.pythonhosted.org/packages/92/97/f6f7f750c7f0b1741788608d62c28aafa9ffd8eb7b31421836e724e9e609/p0f-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "built for Darwin-14.0.0", "digests": { "md5": "33186ae1dc349d715d23c7d3d120b619", "sha256": "e66e45fb07ff8a5c060c8e92be83db17de625f3b7b349554933c8f546aaf46b7" }, "downloads": -1, "filename": "p0f-1.0.0.macosx-10.10-x86_64.tar.gz", "has_sig": false, "md5_digest": "33186ae1dc349d715d23c7d3d120b619", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 7014, "upload_time": "2014-12-18T13:53:05", "url": "https://files.pythonhosted.org/packages/33/f8/c9026b3ecb5732df6c80f9a99ed270d185d79a19fa6c7d3e63bc7b6be636/p0f-1.0.0.macosx-10.10-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "5de6a237535562b5cad316ee13f7fcb4", "sha256": "f61cb23ce6b4eb3c7c0d0b5e40b09a53f26790763c93e70dc784302681b3b1a8" }, "downloads": -1, "filename": "p0f-1.0.0.tar.gz", "has_sig": false, "md5_digest": "5de6a237535562b5cad316ee13f7fcb4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5602, "upload_time": "2014-12-18T13:53:01", "url": "https://files.pythonhosted.org/packages/92/97/f6f7f750c7f0b1741788608d62c28aafa9ffd8eb7b31421836e724e9e609/p0f-1.0.0.tar.gz" } ] }