Used to get API data from Infocyte Cloud Instances into the pandas DataFrame
Project description
Infocyte API Query
Description:
Python module | Used to get API data from Infocyte Cloud Instances into the pandas DataFrame | Defaults to 90 days
Required Modules (Installed as prerequisite)
- requests (Addition)
- pandas (Addition)
- paginateit (Addition)
- tqdm (Addition)
- json
- subprocess
- re
Installation
pip install --upgrade infocyteapiquery
How to use API Query?
Takes 3 arguments:
-
cname --> Cloud Instance Name <cname.infocyte.com>
-
apikey --> APIKEY or the API Token
-
apiquery --> API GET Method
>>> from infocyteapiquery import infocyteapiquery as ic >>> cname = "m...n" >>> apikey = "J8ARPa3iQR6...8HGUkElBBXra4mdEq" >>> apiquery = "ModuleDetails" >>> >>> icdata = ic.query(cname, apikey, apiquery) Loading ModuleDetails: 100%|█████████████████████████████████████████████████████████████ | 9/9 Loop(s) >>> >>> icdata.shape (9183, 37) >>> >>> icdata.columns Index(['size', 'signatureType', 'serialNumber', 'subjectName', 'issuerName', 'timestampIssuer', 'timestampSubject', 'id', 'fileRepId', 'staticAnalysis', 'dynamicAnalysis', 'localBlacklist', 'localWhitelist', 'blacklist', 'whitelist', 'malicious', 'notMalicious', 'suspicious', 'unknown', 'threatScore', 'threatName', 'threatWeight', 'compromised', 'failed', 'hasAvScan', 'avPositives', 'avTotal', 'synapse', 'flagId', 'flagName', 'flagColor', 'flagWeight', 'name', 'path', 'managed', 'signed', 'md5', 'sha1', 'sha256', 'ssdeep'], (dtype='object')
How to use PowerShell Query?
Takes 3 arguments:
-
cname --> Cloud Instance Name <cname.infocyte.com>
-
apikey --> APIKEY or the API Token
-
pscmd --> PowerShell Script Commands
>>> from infocyteapiquery import infocyteapiquery as ic >>> cname = "m...n" >>> apikey = "J8ARPa3iQR6...8HGUkElBBXra4mdEq" >>> >>>pscmd = ''' ... $psvariable = Get-ICAlert ... ($psvariable).name ... ''' >>> psdata = ic.ps(cname, apikey, pscmd) Loading : 100%|███████████████████████████████████████████████████████████████████████ | 1/1 Line(s) >>> >>> print(psdata) rdpwrap.dll calculator.exe rundll32.exe ... ... cmd.exe python.exe cmd.exe
How to use Encoded PowerShell Query?
Takes 3 arguments:
-
cname --> Cloud Instance Name <cname.infocyte.com>
-
apikey --> APIKEY or the API Token
-
psecmd --> PowerShell Script Commands Support Pipe and Complex filters
>>> from infocyteapiquery import infocyteapiquery as ic >>> cname = "m...n" >>> apikey = "J8ARPa3iQR6...8HGUkElBBXra4mdEq" >>> >>>psecmd = '$man = Get-ICAlert;($man).name|Sort-Object|Get-Unique' >>> psedata = ic.pse(cname, apikey, psecmd) Loading : 100%|███████████████████████████████████████████████████████████████████████ | 1/1 Line(s) >>> >>> print(psedata) BitComet_1.74_setup.exe bitcomet_setup_EBTmD-1.exe calc.exe Calculator.exe calculator.exe Calculator.exe ... ... cmd.exe python.exe
Note: PowerShell output is extracted in string format (Refer PowerShell "ConvertTo" feature for more details)
Query and PowerShell Tips & Tricks
Please refer Wiki Section of Github for details. Wiki here
License
© 2021 Manjesh N
This repository is licensed under the Apache 2.0 license. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file infocyteapiquery-1.1.15.tar.gz
.
File metadata
- Download URL: infocyteapiquery-1.1.15.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b09867b2b2b337b0909dcef6b189181bf82e265f36c5d45be4780ef9d97913d7 |
|
MD5 | 1af147c5d3350ac980224209c8071fc5 |
|
BLAKE2b-256 | 4ecf9d5da0cd78d399fb8564e6409989d7d08c87c69c59706a29dcb5a2bf266b |
File details
Details for the file infocyteapiquery-1.1.15-py3-none-any.whl
.
File metadata
- Download URL: infocyteapiquery-1.1.15-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c6b549a1ea08e7a0c2b071b10027b1eca0f70fb18685433c8b1148ad66b79c5 |
|
MD5 | 7bca8098545158f9b4c7f42c711167c9 |
|
BLAKE2b-256 | 495c5d27b94d3084d4e4e71fdc607c8f1b987e9c73b279d8f8a3b6c688837d1c |