Code Monkey home page Code Monkey logo

firepyer's Introduction

Firepyer

Firepyer provides a way of interacting with Cisco Firepower devices via their REST APIs in Python. Currently FTD devices using FDM (not FMC) are supported. The intended usage is to replace some of the tedious clicking tasks from the GUI, perform actions on a large number of devices or execute bulk imports of objects, rules etc.

The following versions have been used in development (others should work but YMMV):

  • Python 3.9 (3.8+ is required)
  • FTD 6.6.1-91

Please see the brief instructions below on installing and using Firepyer and visit the documentation for a more comprehensive guide and examples.

Installation

The latest release is available to download from PyPI, simply using pip install firepyer.

Alternatively, as this project is still in early development, the best place to get the most recent features is directly from the source GitHub repo.

Usage

All functionailty for interacting with an FTD device is contained within the Fdm class and it’s methods. Authentication is taken care of transparently when calling a method, so this doesn’t need to be done explicilty.

Import the Fdm class and instantiate an object, passing in your FTD hostname/IP, username and password (and ignoring SSL verification if using an untrusted/self-signed cert):

>>> from firepyer import Fdm
>>> fdm = Fdm(host='192.168.45.45', username='admin', password='Admin123', verify=False)

Then call any of the available methods to run against your FTD:

>>> fdm.get_hostname()
     'firepyer2120'

>>> fdm.get_net_objects('any-ipv4')
     {'description': None,
      'dnsResolution': None,
      'id': '00f7b297-4d44-11eb-9e04-13721b05d633',
      'isSystemDefined': True,
      'links': {'self': 'https://192.168.45.45/api/fdm/latest/object/networks/00f7b297-4d44-11eb-9e04-13721b05d633'},
      'name': 'any-ipv4',
      'subType': 'NETWORK',
      'type': 'networkobject',
      'value': '0.0.0.0/0',
      'version': 'kxd2dzxm2gtwn'}

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.