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 more details.
Release files for infocyteapiquery 1.1.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| infocyteapiquery-1.1.16.tar.gz | 12.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| infocyteapiquery-1.1.16-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.5 kB
Release files / infocyteapiquery-1.1.16.tar.gz
| Download URL | infocyteapiquery-1.1.16.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a39e1d8072ac8b62ef02713ee8bc1207a859741e23d263857d2c1b1c1fa30140
|
|
BLAKE2b-256 checksum How to use checksums |
4d4d4f9b3d44c9320d91746ee6278a76241623b3fe98ad9f7cee48be08e53817
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / infocyteapiquery-1.1.16-py3-none-any.whl
| Download URL | infocyteapiquery-1.1.16-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
264a04a0bda2dc12f577681e63297cdd212aea62a96a7762c0d342b286b3f071
|
|
BLAKE2b-256 checksum How to use checksums |
edd2dbe1878ebdda56915ad048d0ce2e9e4ce554556adc664d788993a6ab471f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|