diff --git a/findfails.py b/findfails.py index 93e19507dd0874711908e473b403ce4f11faf509..62bd5c4d39ca495152e3ce730f9d69fb23c849db 100644 --- a/findfails.py +++ b/findfails.py @@ -6,16 +6,20 @@ import re import time import getpass - urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) +# +# This script will look to see which ports are in a "failed" state and try to reathenticate the port. +# +# + ########################################################################### print(" 1 = UNL-City \n 2 = UNL-East \n 3 = UNO \n 4 = UNK \n Select Campus:") campus = input() print(f"Campus Selected: {campus}") print("----------------------------------") print("----------------------------------") -print(" 1 = test \n Select Role:") +print(" 1 = Find Failed ports \n Select Role:") role = input() if campus == "1": file = [line.strip() for line in open("unlCitySwitches-cx.txt", 'r')] @@ -50,9 +54,6 @@ for selectIP in file: password=Apassword, ) -# create sessions object - - ############################################################################### output = net_connect.send_command(f"show port-access clients") to1 = output.split("\n") @@ -68,7 +69,5 @@ for selectIP in file: print(f"{to3} Reauthentication initiated.") to = to.split(" ")[0] - - net_connect.disconnect() \ No newline at end of file diff --git a/unkSwitches-cx.txt b/unkSwitches-cx.txt index 2a6f9dd3a50ab9717264e676e5d703111cf7fb9e..5cbd4fe115c9feedc2b772024f6b4af1477a7ac2 100644 --- a/unkSwitches-cx.txt +++ b/unkSwitches-cx.txt @@ -1 +1 @@ -10.171.0.53 \ No newline at end of file +10.171.0.19 \ No newline at end of file