Skip to content

Instantly share code, notes, and snippets.

@RaceFPV
RaceFPV / add-to-asa-blacklist.py
Created February 5, 2019 16:18
Netmiko python script to add a new ip address to a blacklist group on multiple Cisco ASA firewalls
#!/usr/bin/env python3
#This script assumes there is a network object-group on all Cisco ASAs called 'grp..blacklist', and that the group is attached to the correct ACL/interface
#import all the modules we need
import sys
import os
import netmiko
from netmiko import ConnectHandler
print('imported modules')
global:
edition: ee
appConfig:
ldap:
servers:
main:
label: 'LDAP'
host: 'yourdomain.com'
port: 389
uid: 'sAMAccountName'