# khulnasoft-analyze
A cross-platform CLI tool which enables analyzing files with Khulnasoft Analyze.
# Prerequisites
Python 3.6 and above
Python and pip should be available in your path
# Installation
`pip install khulnasoft-analyze-cli`
# Usage
## Proxies
The CLI supports proxies. To use a proxy, set the environment variable `HTTP_PROXY` or `HTTPS_PROXY` to the proxy address.
## Login
To begin using the cli, first you should login with your API key:
`khulnasoft-analyze login <api_key>`
If you are running the CLI against an on premise deployment, enter the url:
`khulnasoft-analyze login <api_key> http://<address>/api`
## Analyze
Send a file or a directory for analysis in Khulnasoft Analyze.
### Usage
`khulnasoft-analyze analyze PATH`
### Parameters
PATH: Path to file or directory to send the files inside for analysis.
### Examples:
Send a single file for analysis:
$ khulnasoft-analyze analyze C:\threat.exe
Send all files in directory for analysis:
$ khulnasoft-analyze analyze C:\files-to-analyze
For complete documentation please run `khulnasoft-analyze analyze --help`
## Analyze hashes file
Send a text file with list of hashes
### Usage
`khulnasoft-analyze analyze_by_list PATH`
### Parameters
PATH: Path to txt file.
### Example
Send txt file with hashes for analysis:
$ khulnasoft-analyze analyze_by_list ~/files/hashes.txt
For complete documentation please run `khulnasoft-analyze analyze_by_list --help`
## Index
Send a file or a directory for indexing
### Usage
`khulnasoft-analyze index PATH INDEX_AS [FAMILY_NAME]`
### Parameters
PATH: Path to file or directory to index
INDEX_AS: `malicious` or `trusted`
FAMILY_NAME: The family name (optional)
### Example
index a single file:
$ khulnasoft-analyze index ~/files/threat.exe.sample malicious family_name
index all files in directory:
$ khulnasoft-analyze index ~/files/files-to-index trusted
For complete documentation please run `khulnasoft-analyze index --help`
## Index hashes file
Send a text file with list of hashes to index
### Usage
`khulnasoft-analyze index_by_list PATH --index-as=INDEX [FAMILY_NAME]`
### Parameters
PATH: Path to txt file
--index-as: `malicious` or `trusted`
FAMILY_NAME: The family name (optional)
### Example
Send a file with hashes and verdict for indexing:
$ khulnasoft-analyze index_by_list ~/files/hashes.txt --index-as=malicious family_name
For complete documentation please run `khulnasoft-analyze index --help`
## Upload offline endpoint scan
Upload an offline scan created by running the Khulnasoft Endpoint Scanner with '-o' flag
### Usage
`khulnasoft-analyze upload_endpoint_scan OFFLINE_SCAN_DIRECTORY`
### Parameters
OFFLINE_SCAN_DIRECTORY: Path to directory with offline endpoint scan results
### Examples:
Upload a directory with offline endpoint scan results:
$ khulnasoft-analyze upload_endpoint_scan /home/user/offline_scans/scan_MYPC_2019-01-01_00-00-00
For complete documentation plrase run `khulnasoft-analyze upload_endpoint_scan --help`
## Upload multiple offline endpoint scans
Upload multiple offline scans created by running the Khulnasoft Endpoint Scanner with '-o' flag
### Usage
`khulnasoft-analyze upload_endpoint_scans_in_directory OFFLINE_SCANS_ROOT_DIRECTORY`
### Parameters
OFFLINE_SCANS_ROOT_DIRECTORY: Path to root directory containing offline endpoint scan results
### Examples:
Upload a directory with offline endpoint scan results:
$ khulnasoft-analyze upload_endpoint_scans /home/user/offline_scans
For complete documentation please run `khulnasoft-analyze upload_endpoint_scans_in_directory --help`
## Upload all subdirectories with .eml files to analyze
Upload a directory with .eml files
### Parameter
UPLOAD_EMAILS_IN_DIRECTORY: Path to root directory containing the .eml fiels
### Examples:
$ khulnasoft-analyze upload_emails_in_directory /path/to/emails_root_directory
# Troubleshooting
The cli produce a log file named `khulnasoft-analyze-cli.log` in the current working directory.
To enable console output, set the environment variable `KHULNASOFT_DEBUG=1`.
Raw data
{
"_id": null,
"home_page": null,
"name": "khulnasoft-analyze-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "khulnasoft",
"author": "Khulnasoft Labs ltd.",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/6e/d2/e46213562d56625fa7efb63571653c51bf93e7b7f74d3d41e774f66e21cb/khulnasoft_analyze_cli-1.11.tar.gz",
"platform": null,
"description": "# khulnasoft-analyze\n\nA cross-platform CLI tool which enables analyzing files with Khulnasoft Analyze.\n\n# Prerequisites\nPython 3.6 and above\n\nPython and pip should be available in your path\n\n# Installation\n`pip install khulnasoft-analyze-cli`\n\n# Usage\n\n## Proxies\nThe CLI supports proxies. To use a proxy, set the environment variable `HTTP_PROXY` or `HTTPS_PROXY` to the proxy address.\n\n## Login\nTo begin using the cli, first you should login with your API key:\n\n`khulnasoft-analyze login <api_key>`\n\nIf you are running the CLI against an on premise deployment, enter the url:\n\n`khulnasoft-analyze login <api_key> http://<address>/api`\n \n\n## Analyze\nSend a file or a directory for analysis in Khulnasoft Analyze.\n\n### Usage\n`khulnasoft-analyze analyze PATH`\n\n### Parameters\nPATH: Path to file or directory to send the files inside for analysis.\n\n### Examples:\nSend a single file for analysis:\n\n $ khulnasoft-analyze analyze C:\\threat.exe\n\nSend all files in directory for analysis:\n\n $ khulnasoft-analyze analyze C:\\files-to-analyze\n\nFor complete documentation please run `khulnasoft-analyze analyze --help`\n \n## Analyze hashes file\nSend a text file with list of hashes\n\n### Usage\n`khulnasoft-analyze analyze_by_list PATH`\n\n### Parameters\nPATH: Path to txt file.\n\n### Example\nSend txt file with hashes for analysis:\n\n $ khulnasoft-analyze analyze_by_list ~/files/hashes.txt\n\nFor complete documentation please run `khulnasoft-analyze analyze_by_list --help`\n\n## Index\nSend a file or a directory for indexing\n\n### Usage\n`khulnasoft-analyze index PATH INDEX_AS [FAMILY_NAME]`\n\n### Parameters\nPATH: Path to file or directory to index\n\nINDEX_AS: `malicious` or `trusted`\n\nFAMILY_NAME: The family name (optional)\n\n### Example\nindex a single file:\n \n $ khulnasoft-analyze index ~/files/threat.exe.sample malicious family_name\n \nindex all files in directory:\n\n $ khulnasoft-analyze index ~/files/files-to-index trusted\n\nFor complete documentation please run `khulnasoft-analyze index --help`\n\n## Index hashes file\nSend a text file with list of hashes to index\n\n### Usage \n`khulnasoft-analyze index_by_list PATH --index-as=INDEX [FAMILY_NAME]`\n\n### Parameters\nPATH: Path to txt file \n\n--index-as: `malicious` or `trusted`\n\nFAMILY_NAME: The family name (optional)\n\n### Example\nSend a file with hashes and verdict for indexing:\n \n $ khulnasoft-analyze index_by_list ~/files/hashes.txt --index-as=malicious family_name\n\nFor complete documentation please run `khulnasoft-analyze index --help`\n\n## Upload offline endpoint scan\nUpload an offline scan created by running the Khulnasoft Endpoint Scanner with '-o' flag\n\n### Usage\n`khulnasoft-analyze upload_endpoint_scan OFFLINE_SCAN_DIRECTORY`\n\n### Parameters\nOFFLINE_SCAN_DIRECTORY: Path to directory with offline endpoint scan results\n\n### Examples:\nUpload a directory with offline endpoint scan results:\n \n $ khulnasoft-analyze upload_endpoint_scan /home/user/offline_scans/scan_MYPC_2019-01-01_00-00-00\n\nFor complete documentation plrase run `khulnasoft-analyze upload_endpoint_scan --help`\n\n## Upload multiple offline endpoint scans\nUpload multiple offline scans created by running the Khulnasoft Endpoint Scanner with '-o' flag\n\n### Usage\n`khulnasoft-analyze upload_endpoint_scans_in_directory OFFLINE_SCANS_ROOT_DIRECTORY`\n\n### Parameters\nOFFLINE_SCANS_ROOT_DIRECTORY: Path to root directory containing offline endpoint scan results\n\n### Examples:\nUpload a directory with offline endpoint scan results:\n \n $ khulnasoft-analyze upload_endpoint_scans /home/user/offline_scans\n\nFor complete documentation please run `khulnasoft-analyze upload_endpoint_scans_in_directory --help`\n\n## Upload all subdirectories with .eml files to analyze\nUpload a directory with .eml files\n\n### Parameter\nUPLOAD_EMAILS_IN_DIRECTORY: Path to root directory containing the .eml fiels\n\n### Examples:\n $ khulnasoft-analyze upload_emails_in_directory /path/to/emails_root_directory\n\n# Troubleshooting\nThe cli produce a log file named `khulnasoft-analyze-cli.log` in the current working directory.\nTo enable console output, set the environment variable `KHULNASOFT_DEBUG=1`.\n",
"bugtrack_url": null,
"license": "Apache License v2",
"summary": "Client library for Khulnasoft cloud service",
"version": "1.11",
"project_urls": null,
"split_keywords": [
"khulnasoft"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b38280515879e0278acacae2c85ab9421494eeae9bd20f47d02ae851cec8c1c7",
"md5": "173a283e4bd92dfb81cf50313e8e1919",
"sha256": "f6377ccef84ddf4b7b8631e98627dee4a83723c60af0a57ded4854bdca2d3c63"
},
"downloads": -1,
"filename": "khulnasoft_analyze_cli-1.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "173a283e4bd92dfb81cf50313e8e1919",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 17390,
"upload_time": "2024-06-27T19:42:53",
"upload_time_iso_8601": "2024-06-27T19:42:53.417354Z",
"url": "https://files.pythonhosted.org/packages/b3/82/80515879e0278acacae2c85ab9421494eeae9bd20f47d02ae851cec8c1c7/khulnasoft_analyze_cli-1.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6ed2e46213562d56625fa7efb63571653c51bf93e7b7f74d3d41e774f66e21cb",
"md5": "5fd439694dc6b7f6fd9a35787ed5955c",
"sha256": "113d997ad1a0a47e1892dfeff9ab2b9be61b1417c328dc2c5718c55fc373bdcb"
},
"downloads": -1,
"filename": "khulnasoft_analyze_cli-1.11.tar.gz",
"has_sig": false,
"md5_digest": "5fd439694dc6b7f6fd9a35787ed5955c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 16195,
"upload_time": "2024-06-27T19:42:54",
"upload_time_iso_8601": "2024-06-27T19:42:54.792741Z",
"url": "https://files.pythonhosted.org/packages/6e/d2/e46213562d56625fa7efb63571653c51bf93e7b7f74d3d41e774f66e21cb/khulnasoft_analyze_cli-1.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-27 19:42:54",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "khulnasoft-analyze-cli"
}