Giter Club home page Giter Club logo

fireeye-python's Introduction

PyPI version Python versions supported

FireEye Client Library for Python

This is the Python client library for all things FireEye API. Currently it only supports FireEye's Detection On Demand but will have support for other FireEye API's soon.

For more API information, visit the FireEye Developer Hub

Installation

To install the Python client library:

pip install fireeyepy

To upgrade your installed library:

pip install fireeyepy --upgrade

Alternatively, you can clone the repository via the command line:

git clone https://github.com/fireeye/fireeye-python.git

Usage

Begin by importing the 'fireeye' module:

import fireeyepy

Detection On Demand

Construct a Detection object with your api key:

detection = fireeyepy.Detection(key=api_key)

To obtain a free trial API key, subscribe on the AWS Marketplace

Upload A File

  import fireeyepy

  detection = fireeyepy.Detection(key="yourapikeyhere")

  result = detection.submit_file(
    files={
      "file": ('filename', open('./path/to/filename', 'rb'))
    }
  )

With configuration options:

  result = detection.submit_file(
    body={
      "file_name": "different_name.txt",
      "screenshot": true
    },
    files={
      "file": ('filename', open('./path/to/filename', 'rb'))
    }
  )

Submit URLs

  import fireeyepy

  detection = fireeyepy.Detection(key="yourapikeyhere")

  result = detection.submit_urls(["url1","url2",...])

Retrieve File or URL Report

response = detection.get_report(report_id)

You may also provide the optional extended=True flag to get the full, in-depth report:

response = detection.get_report(report_id, extended=True)

Retrieve Presigned URL for Dashboard Report

result = detection.get_presigned_url(report_id)

Perform Hash Lookup

response = detection.get_hash(hash)

Get a report artifact

artifact = detection.get_artifact(report_id="8d0aa90b-8bf3-4483-ae3b-0ded00d157ab", artifact_type="screenshot")

Get the health of the Detection on Demand service

health = detection.get_health()

fireeye-python's People

Contributors

jtviolet avatar mckibbenc avatar mckibbenc-fireeye avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.