From 378033c21986bfdae8d22e638f4dcf28c05ccfd9 Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Wed, 25 Jan 2017 11:38:36 -0600 Subject: [PATCH] Updated fmc-acp.py - add raw input for username --- fmc-acp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fmc-acp.py b/fmc-acp.py index 7ff603b..b1c5de8 100755 --- a/fmc-acp.py +++ b/fmc-acp.py @@ -22,7 +22,7 @@ results=[] ipaddr = raw_input("Enter your FMC IP address or hostname: ") -user1="api" +user1= raw_input("Enter your FMC username: ") pass1= raw_input("Enter your FMC password: ") querystring = {"limit":"1000"} headers = { @@ -90,7 +90,7 @@ def getSubdictData(subdict, fieldname, prop2): for i in results: response = requests.request("GET", i, headers=headers, verify=False) - raw=response.json() + raw=json.loads(response.text) raw.setdefault('name', "noname_rule") raw.setdefault('action', "no_action") raw.setdefault('sourceNetworks', "any-src")