Skip to main content

Client library for Khulnasoft cloud service

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

khulnasoft_analyze_cli-1.11.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

khulnasoft_analyze_cli-1.11-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file khulnasoft_analyze_cli-1.11.tar.gz.

File metadata

  • Download URL: khulnasoft_analyze_cli-1.11.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for khulnasoft_analyze_cli-1.11.tar.gz
Algorithm Hash digest
SHA256 113d997ad1a0a47e1892dfeff9ab2b9be61b1417c328dc2c5718c55fc373bdcb
MD5 5fd439694dc6b7f6fd9a35787ed5955c
BLAKE2b-256 6ed2e46213562d56625fa7efb63571653c51bf93e7b7f74d3d41e774f66e21cb

See more details on using hashes here.

File details

Details for the file khulnasoft_analyze_cli-1.11-py3-none-any.whl.

File metadata

File hashes

Hashes for khulnasoft_analyze_cli-1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 f6377ccef84ddf4b7b8631e98627dee4a83723c60af0a57ded4854bdca2d3c63
MD5 173a283e4bd92dfb81cf50313e8e1919
BLAKE2b-256 b38280515879e0278acacae2c85ab9421494eeae9bd20f47d02ae851cec8c1c7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page