Skip to main content

Analysis Correlation Engine (ACE) API Python Bindings.

Project description

Python Bindings for ACE REST API

Examples

Connect to a Server

Setting the default remote host:

    >>> import ace_api
       
    >>> server = 'ace.integraldefense.com'
       
    >>> ace_api.set_default_remote_host(server)
       
    >>> ace_api.ping()
    {'result': 'pong'}

Setting the remote host for an Analysis class:

    >>> analysis = ace_api.Analysis('this is the analysis description')

    >>> analysis.set_remote_host('something.else.com').remote_host
    'something.else.com' 

If your ACE instance is listening on a port other than 443, specify it like so::

    >>> ace_api.set_default_remote_host('ace.integraldefense.com:24443')

    >>> ace_api.default_remote_host
    'ace.integraldefense.com:24443'

Submit a File to ACE

    >>> path_to_file = 'Business.doc'
    
    >>> analysis.add_file(path_to_file)
    <ace_api.Analysis object at 0x7f23d57e74e0>
    
    >>> analysis.add_tag('Business.doc').add_tag('suspicious doc')
    <ace_api.Analysis object at 0x7f23d57e74e0>

    >>> analysis.submit()
    <ace_api.Analysis object at 0x7f23d57e74e0>

    >>> analysis.status
    'NEW'

    >>> analysis.status
    'ANALYZING'

    >>> analysis.status
    'COMPLETE (Alerted with 8 detections)'

    >>> result_url = 'https://{}/ace/analysis?direct={}'.format(analysis.remote_host, analysis.uuid)

    >>> print("\nThe results of this submission can be viewed here: {}".format(result_url))

The results of this submission can be viewed here: https://ace.integraldefense.com/ace/analysis?direct=137842ac-9d53-4a25-8066-ad2a1f6cfa17

Submit a URL to Cloudphish

    >>> another_url = 'http://medicci.ru/myATT/tu8794_QcbkoEsv_Xw20pYh7ij'

    >>> cp_result = ace_api.cloudphish_submit(another_url)
       
    >>> cp_result['status']
    'NEW'
       
    >>>  # Query again, a moment later:
    ...
    >>> cp_result = ace_api.cloudphish_submit(another_url)

    >>> cp_result['status']
    'ANALYZED'

    >>> cp_result['analysis_result']
    'ALERT'
       
    >>> result_url = 'https://{}/ace/analysis?direct={}'.format(ace_api.default_remote_host, cp_result['uuid'])

    >>> print("\nThe results of this submission can be viewed here: {}".format(result_url))

The results of this submission can be viewed here: https://ace.integraldefense.com/ace/analysis?direct=732ec396-ce20-463f-82b0-6b043b07f941

Documentation

ACE's API documentation:

View ACE's full documentation here: https://ace-analysis.readthedocs.io/en/latest/

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

ace_api-1.0.7.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

ace_api-1.0.7-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file ace_api-1.0.7.tar.gz.

File metadata

  • Download URL: ace_api-1.0.7.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

File hashes

Hashes for ace_api-1.0.7.tar.gz
Algorithm Hash digest
SHA256 62ba87eedae590dacae59eb8bb00d5b5477d70c709a50398ff61f8d8e55d4a7f
MD5 481093ae862e32499e207f4e9fb66626
BLAKE2b-256 136b299b3ef10cbb7112597c821f6f1d3a3bfaeb1f55d56788fadb564fedc278

See more details on using hashes here.

File details

Details for the file ace_api-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: ace_api-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

File hashes

Hashes for ace_api-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f99c0d45ea4f9be452ad781b18daf3b34318b0c08518649c35dfbb4a91184140
MD5 989d9d2d82033f2e37d2b8ab8eb04df8
BLAKE2b-256 c55c6d621f7b3847dfb31d7b7762c9bb5eca4e6436d81cc1f1a557bca2cd825a

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