nightagent 0.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nightagent-0.0.0/LICENSE +121 -0
- nightagent-0.0.0/PKG-INFO +43 -0
- nightagent-0.0.0/README.md +15 -0
- nightagent-0.0.0/nightagent/__init__.py +205 -0
- nightagent-0.0.0/nightagent.egg-info/PKG-INFO +43 -0
- nightagent-0.0.0/nightagent.egg-info/SOURCES.txt +11 -0
- nightagent-0.0.0/nightagent.egg-info/dependency_links.txt +1 -0
- nightagent-0.0.0/nightagent.egg-info/entry_points.txt +2 -0
- nightagent-0.0.0/nightagent.egg-info/requires.txt +1 -0
- nightagent-0.0.0/nightagent.egg-info/top_level.txt +1 -0
- nightagent-0.0.0/setup.cfg +7 -0
- nightagent-0.0.0/setup.py +39 -0
nightagent-0.0.0/LICENSE
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
Creative Commons Legal Code
|
|
2
|
+
|
|
3
|
+
CC0 1.0 Universal
|
|
4
|
+
|
|
5
|
+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
|
6
|
+
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
|
7
|
+
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
|
8
|
+
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
|
9
|
+
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
|
10
|
+
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
|
11
|
+
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
|
12
|
+
HEREUNDER.
|
|
13
|
+
|
|
14
|
+
Statement of Purpose
|
|
15
|
+
|
|
16
|
+
The laws of most jurisdictions throughout the world automatically confer
|
|
17
|
+
exclusive Copyright and Related Rights (defined below) upon the creator
|
|
18
|
+
and subsequent owner(s) (each and all, an "owner") of an original work of
|
|
19
|
+
authorship and/or a database (each, a "Work").
|
|
20
|
+
|
|
21
|
+
Certain owners wish to permanently relinquish those rights to a Work for
|
|
22
|
+
the purpose of contributing to a commons of creative, cultural and
|
|
23
|
+
scientific works ("Commons") that the public can reliably and without fear
|
|
24
|
+
of later claims of infringement build upon, modify, incorporate in other
|
|
25
|
+
works, reuse and redistribute as freely as possible in any form whatsoever
|
|
26
|
+
and for any purposes, including without limitation commercial purposes.
|
|
27
|
+
These owners may contribute to the Commons to promote the ideal of a free
|
|
28
|
+
culture and the further production of creative, cultural and scientific
|
|
29
|
+
works, or to gain reputation or greater distribution for their Work in
|
|
30
|
+
part through the use and efforts of others.
|
|
31
|
+
|
|
32
|
+
For these and/or other purposes and motivations, and without any
|
|
33
|
+
expectation of additional consideration or compensation, the person
|
|
34
|
+
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
|
35
|
+
is an owner of Copyright and Related Rights in the Work, voluntarily
|
|
36
|
+
elects to apply CC0 to the Work and publicly distribute the Work under its
|
|
37
|
+
terms, with knowledge of his or her Copyright and Related Rights in the
|
|
38
|
+
Work and the meaning and intended legal effect of CC0 on those rights.
|
|
39
|
+
|
|
40
|
+
1. Copyright and Related Rights. A Work made available under CC0 may be
|
|
41
|
+
protected by copyright and related or neighboring rights ("Copyright and
|
|
42
|
+
Related Rights"). Copyright and Related Rights include, but are not
|
|
43
|
+
limited to, the following:
|
|
44
|
+
|
|
45
|
+
i. the right to reproduce, adapt, distribute, perform, display,
|
|
46
|
+
communicate, and translate a Work;
|
|
47
|
+
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
48
|
+
iii. publicity and privacy rights pertaining to a person's image or
|
|
49
|
+
likeness depicted in a Work;
|
|
50
|
+
iv. rights protecting against unfair competition in regards to a Work,
|
|
51
|
+
subject to the limitations in paragraph 4(a), below;
|
|
52
|
+
v. rights protecting the extraction, dissemination, use and reuse of data
|
|
53
|
+
in a Work;
|
|
54
|
+
vi. database rights (such as those arising under Directive 96/9/EC of the
|
|
55
|
+
European Parliament and of the Council of 11 March 1996 on the legal
|
|
56
|
+
protection of databases, and under any national implementation
|
|
57
|
+
thereof, including any amended or successor version of such
|
|
58
|
+
directive); and
|
|
59
|
+
vii. other similar, equivalent or corresponding rights throughout the
|
|
60
|
+
world based on applicable law or treaty, and any national
|
|
61
|
+
implementations thereof.
|
|
62
|
+
|
|
63
|
+
2. Waiver. To the greatest extent permitted by, but not in contravention
|
|
64
|
+
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
|
65
|
+
irrevocably and unconditionally waives, abandons, and surrenders all of
|
|
66
|
+
Affirmer's Copyright and Related Rights and associated claims and causes
|
|
67
|
+
of action, whether now known or unknown (including existing as well as
|
|
68
|
+
future claims and causes of action), in the Work (i) in all territories
|
|
69
|
+
worldwide, (ii) for the maximum duration provided by applicable law or
|
|
70
|
+
treaty (including future time extensions), (iii) in any current or future
|
|
71
|
+
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
|
72
|
+
including without limitation commercial, advertising or promotional
|
|
73
|
+
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
|
74
|
+
member of the public at large and to the detriment of Affirmer's heirs and
|
|
75
|
+
successors, fully intending that such Waiver shall not be subject to
|
|
76
|
+
revocation, rescission, cancellation, termination, or any other legal or
|
|
77
|
+
equitable action to disrupt the quiet enjoyment of the Work by the public
|
|
78
|
+
as contemplated by Affirmer's express Statement of Purpose.
|
|
79
|
+
|
|
80
|
+
3. Public License Fallback. Should any part of the Waiver for any reason
|
|
81
|
+
be judged legally invalid or ineffective under applicable law, then the
|
|
82
|
+
Waiver shall be preserved to the maximum extent permitted taking into
|
|
83
|
+
account Affirmer's express Statement of Purpose. In addition, to the
|
|
84
|
+
extent the Waiver is so judged Affirmer hereby grants to each affected
|
|
85
|
+
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
|
86
|
+
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
|
87
|
+
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
|
88
|
+
maximum duration provided by applicable law or treaty (including future
|
|
89
|
+
time extensions), (iii) in any current or future medium and for any number
|
|
90
|
+
of copies, and (iv) for any purpose whatsoever, including without
|
|
91
|
+
limitation commercial, advertising or promotional purposes (the
|
|
92
|
+
"License"). The License shall be deemed effective as of the date CC0 was
|
|
93
|
+
applied by Affirmer to the Work. Should any part of the License for any
|
|
94
|
+
reason be judged legally invalid or ineffective under applicable law, such
|
|
95
|
+
partial invalidity or ineffectiveness shall not invalidate the remainder
|
|
96
|
+
of the License, and in such case Affirmer hereby affirms that he or she
|
|
97
|
+
will not (i) exercise any of his or her remaining Copyright and Related
|
|
98
|
+
Rights in the Work or (ii) assert any associated claims and causes of
|
|
99
|
+
action with respect to the Work, in either case contrary to Affirmer's
|
|
100
|
+
express Statement of Purpose.
|
|
101
|
+
|
|
102
|
+
4. Limitations and Disclaimers.
|
|
103
|
+
|
|
104
|
+
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
|
105
|
+
surrendered, licensed or otherwise affected by this document.
|
|
106
|
+
b. Affirmer offers the Work as-is and makes no representations or
|
|
107
|
+
warranties of any kind concerning the Work, express, implied,
|
|
108
|
+
statutory or otherwise, including without limitation warranties of
|
|
109
|
+
title, merchantability, fitness for a particular purpose, non
|
|
110
|
+
infringement, or the absence of latent or other defects, accuracy, or
|
|
111
|
+
the present or absence of errors, whether or not discoverable, all to
|
|
112
|
+
the greatest extent permissible under applicable law.
|
|
113
|
+
c. Affirmer disclaims responsibility for clearing rights of other persons
|
|
114
|
+
that may apply to the Work or any use thereof, including without
|
|
115
|
+
limitation any person's Copyright and Related Rights in the Work.
|
|
116
|
+
Further, Affirmer disclaims responsibility for obtaining any necessary
|
|
117
|
+
consents, permissions or other rights required for any use of the
|
|
118
|
+
Work.
|
|
119
|
+
d. Affirmer understands and acknowledges that Creative Commons is not a
|
|
120
|
+
party to this document and has no duty or obligation with respect to
|
|
121
|
+
this CC0 or use of the Work.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nightagent
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: Automatically Detect and Repair Common Firewall Issues
|
|
5
|
+
Home-page: https://github.com/gocarta/nightagent
|
|
6
|
+
Download-URL: https://github.com/gocarta/nightagent/tarball/download
|
|
7
|
+
Author: Daniel J. Dufour
|
|
8
|
+
Author-email: daniel.j.dufour@gmail.com
|
|
9
|
+
Keywords: data,python
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: netmiko
|
|
17
|
+
Dynamic: author
|
|
18
|
+
Dynamic: author-email
|
|
19
|
+
Dynamic: classifier
|
|
20
|
+
Dynamic: description
|
|
21
|
+
Dynamic: description-content-type
|
|
22
|
+
Dynamic: download-url
|
|
23
|
+
Dynamic: home-page
|
|
24
|
+
Dynamic: keywords
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
Dynamic: requires-dist
|
|
27
|
+
Dynamic: summary
|
|
28
|
+
|
|
29
|
+
# nightagent
|
|
30
|
+
> Automatically Detect and Repair Common Firewall Issues
|
|
31
|
+
|
|
32
|
+
## install
|
|
33
|
+
```
|
|
34
|
+
pip install nightagent
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## usage (in cli)
|
|
38
|
+
```sh
|
|
39
|
+
> nightagent --device-type paloalto_panos --hostname 192.168.1.1 --username admin monitor
|
|
40
|
+
> password:
|
|
41
|
+
> secret:
|
|
42
|
+
```
|
|
43
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# nightagent
|
|
2
|
+
> Automatically Detect and Repair Common Firewall Issues
|
|
3
|
+
|
|
4
|
+
## install
|
|
5
|
+
```
|
|
6
|
+
pip install nightagent
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## usage (in cli)
|
|
10
|
+
```sh
|
|
11
|
+
> nightagent --device-type paloalto_panos --hostname 192.168.1.1 --username admin monitor
|
|
12
|
+
> password:
|
|
13
|
+
> secret:
|
|
14
|
+
```
|
|
15
|
+
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# /// script
|
|
2
|
+
# requires-python = ">=3.10"
|
|
3
|
+
# dependencies = [
|
|
4
|
+
# "netmiko",
|
|
5
|
+
# ]
|
|
6
|
+
# ///
|
|
7
|
+
|
|
8
|
+
import argparse
|
|
9
|
+
from netmiko import ConnectHandler
|
|
10
|
+
import getpass
|
|
11
|
+
import re
|
|
12
|
+
from time import sleep
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class NightAgent:
|
|
16
|
+
def __init__(self, device_type: str, hostname: str, username: str, password: str, secret: str, port: int = 22):
|
|
17
|
+
self.device_type = device_type
|
|
18
|
+
self.hostname = hostname
|
|
19
|
+
self.username = username
|
|
20
|
+
self.password = password
|
|
21
|
+
self.secret = secret
|
|
22
|
+
self.port = port
|
|
23
|
+
self.connection = None
|
|
24
|
+
|
|
25
|
+
def login(self) -> bool:
|
|
26
|
+
try:
|
|
27
|
+
self.connection = ConnectHandler(
|
|
28
|
+
device_type=self.device_type,
|
|
29
|
+
host=self.hostname,
|
|
30
|
+
username=self.username,
|
|
31
|
+
password=self.password,
|
|
32
|
+
secret=self.secret,
|
|
33
|
+
)
|
|
34
|
+
print("[nightagent] logged in")
|
|
35
|
+
self.connection.enable()
|
|
36
|
+
print("[nightagent] entered enable mode")
|
|
37
|
+
sleep(0.5)
|
|
38
|
+
self._disable_paging()
|
|
39
|
+
print("[nightagent] disabled paging")
|
|
40
|
+
return True
|
|
41
|
+
except Exception as e:
|
|
42
|
+
print(f"[nightagent] failed to login: {e}")
|
|
43
|
+
return False
|
|
44
|
+
|
|
45
|
+
def logout(self):
|
|
46
|
+
if self.connection:
|
|
47
|
+
try:
|
|
48
|
+
self.connection.disconnect()
|
|
49
|
+
print("[nightagent] logged out and closed SSH connection")
|
|
50
|
+
return True
|
|
51
|
+
except Exception as e:
|
|
52
|
+
print(f"[nightagent] exception while attempting to log out: {e}")
|
|
53
|
+
return False
|
|
54
|
+
else:
|
|
55
|
+
print("[nightagent] you are not logged in, so no need to log out")
|
|
56
|
+
return True
|
|
57
|
+
|
|
58
|
+
def _disable_paging(self):
|
|
59
|
+
if self.device_type in ["arista_eos", "cisco_ios", "cisco_nxos", "cisco_xe", "cisco_xr"]:
|
|
60
|
+
self.connection.send_command("terminal length 0")
|
|
61
|
+
elif self.device_type in ["cisco_asa"]:
|
|
62
|
+
self.connection.send_command("terminal pager 0")
|
|
63
|
+
# elif self.device_type in ["fortinet"]:
|
|
64
|
+
# self.connection.send_command("config system console\nset output standard\nend")
|
|
65
|
+
elif self.device_type in ["hp_procurve"]:
|
|
66
|
+
self.connection.send_command("no page")
|
|
67
|
+
elif self.device_type in ["juniper_junos"]:
|
|
68
|
+
self.connection.send_command("terminal length 0")
|
|
69
|
+
elif self.device_type in ["paloalto_panos"]:
|
|
70
|
+
self.connection.send_command("set cli pager off")
|
|
71
|
+
|
|
72
|
+
def _run_command_on_firewall(self, command: str) -> str:
|
|
73
|
+
if not self.connection:
|
|
74
|
+
raise RuntimeError("[nightagent] can't run command on firewall because you haven't logged in yet")
|
|
75
|
+
|
|
76
|
+
print(f'[nightagent] executing command: "{command}"')
|
|
77
|
+
output = self.connection.send_command(command)
|
|
78
|
+
print(f'[nightagent] finished command: "{command}"')
|
|
79
|
+
return output
|
|
80
|
+
|
|
81
|
+
def check_tunnel_health(self) -> bool:
|
|
82
|
+
if not self.connection:
|
|
83
|
+
raise Exception("[nightagent] can't check tunnel health because you need to log in first")
|
|
84
|
+
|
|
85
|
+
output = self._run_command_on_firewall("show vpn-sessiondb detail l2l")
|
|
86
|
+
|
|
87
|
+
# print("[nightagent] show vpn-sessiondb detail l2l:\n", output)
|
|
88
|
+
|
|
89
|
+
indicators = {
|
|
90
|
+
"Rekey Left(D)": r"Rekey Left\(D\): (\d+) K-Bytes",
|
|
91
|
+
"Bytes Tx": r"Bytes Tx {0,10}: ?([0-9]+)",
|
|
92
|
+
"Pkts Tx": r"Pkts Tx {0,10}: ?([0-9]+)",
|
|
93
|
+
"Bytes Rx": r"Bytes Rx {0,10}: ?([0-9]+)",
|
|
94
|
+
"Pkts Rx": r"Pkts Rx {0,10}: ?([0-9]+)",
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
for name, pattern in indicators.items():
|
|
98
|
+
matches = re.findall(pattern, output)
|
|
99
|
+
if not matches:
|
|
100
|
+
print(f"[WARN] Could not find indicator: {name}")
|
|
101
|
+
return False
|
|
102
|
+
|
|
103
|
+
for match in matches:
|
|
104
|
+
value = int(match)
|
|
105
|
+
if value == 0:
|
|
106
|
+
print(f"[nightagent] detected unhealthy tunnel because {name} is {value}")
|
|
107
|
+
return False
|
|
108
|
+
|
|
109
|
+
return True
|
|
110
|
+
|
|
111
|
+
def clear_security_associations(self):
|
|
112
|
+
print("[nightagent] clearing IPsec security associations")
|
|
113
|
+
self._run_command_on_firewall("clear crypto ipsec sa")
|
|
114
|
+
print("[nightagent] finished clearing IPsec security associations")
|
|
115
|
+
|
|
116
|
+
def monitor(self, recheck_time: int = 15, doublecheck_time: int = 60, ask: bool = False):
|
|
117
|
+
number_of_exceptions = 0
|
|
118
|
+
while True:
|
|
119
|
+
try:
|
|
120
|
+
print(f"[nightagent] sleeping {recheck_time} seconds")
|
|
121
|
+
sleep(recheck_time)
|
|
122
|
+
|
|
123
|
+
print("[nightagent] logging in")
|
|
124
|
+
sleep(1)
|
|
125
|
+
self.login()
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
print("[nightagent] checking tunnel health")
|
|
129
|
+
sleep(1)
|
|
130
|
+
healthy = self.check_tunnel_health()
|
|
131
|
+
if healthy:
|
|
132
|
+
print("[nightagent] tunnel is healthy")
|
|
133
|
+
sleep(1)
|
|
134
|
+
else:
|
|
135
|
+
print("[nightagent] tunnel is unhealthy")
|
|
136
|
+
sleep(1)
|
|
137
|
+
print(f"[nightagent] pausing {doublecheck_time} before double-checking")
|
|
138
|
+
sleep(doublecheck_time)
|
|
139
|
+
healthy = self.check_tunnel_health()
|
|
140
|
+
if healthy is False:
|
|
141
|
+
print("[nightagent] tunnel is still unhealthy, so clear security associations")
|
|
142
|
+
if ask is False or input("type yes to proceed").lower() in ["y", "yes"]:
|
|
143
|
+
self.clear_security_associations()
|
|
144
|
+
print("[nightagent] sleeping 5 minutes to let tunnel rebuild before checking again")
|
|
145
|
+
sleep(5 * 60)
|
|
146
|
+
|
|
147
|
+
sleep(0.5)
|
|
148
|
+
|
|
149
|
+
print("[nightagent] logging out")
|
|
150
|
+
self.logout()
|
|
151
|
+
except Exception as e:
|
|
152
|
+
print(e)
|
|
153
|
+
number_of_exceptions += 1
|
|
154
|
+
|
|
155
|
+
if number_of_exceptions >= 3:
|
|
156
|
+
print("[nightagent] hit maximum number of exceptions, so returning from monitor")
|
|
157
|
+
return False
|
|
158
|
+
|
|
159
|
+
def main():
|
|
160
|
+
parser = argparse.ArgumentParser(
|
|
161
|
+
prog="nightagent",
|
|
162
|
+
description="NightAgent - automatically check and fix firewall issues",
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
parser.add_argument("--device-type", required=False, help="Netmiko device_type (e.g. paloalto_panos)")
|
|
166
|
+
parser.add_argument("--hostname", required=False, help="Firewall hostname or IP")
|
|
167
|
+
parser.add_argument("--username", required=False, help="SSH username")
|
|
168
|
+
parser.add_argument("--password", required=False, help="SSH password")
|
|
169
|
+
parser.add_argument("--secret", required=False, help="SSH secret")
|
|
170
|
+
parser.add_argument("--port", type=int, default=22, help="SSH port (default: 22)")
|
|
171
|
+
|
|
172
|
+
# Actions
|
|
173
|
+
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
174
|
+
|
|
175
|
+
monitor = subparsers.add_parser("monitor", help="Continuously monitor tunnel health")
|
|
176
|
+
monitor.add_argument("--recheck", type=int, default=15, help="Seconds between checks")
|
|
177
|
+
monitor.add_argument("--doublecheck", type=int, default=60, help="Seconds before re‑check")
|
|
178
|
+
monitor.add_argument("--ask", action="store_true", help="Ask/prompt before clearing security associations")
|
|
179
|
+
|
|
180
|
+
args = parser.parse_args()
|
|
181
|
+
|
|
182
|
+
device_type = args.device_type or input("device-type: ")
|
|
183
|
+
hostname = args.hostname or input("hostname: ").strip()
|
|
184
|
+
username = args.username or input("username: ").strip()
|
|
185
|
+
password = args.password or getpass.getpass("password: ")
|
|
186
|
+
secret = args.secret or getpass.getpass("secret: ")
|
|
187
|
+
|
|
188
|
+
agent = NightAgent(
|
|
189
|
+
device_type=device_type,
|
|
190
|
+
hostname=hostname,
|
|
191
|
+
username=username,
|
|
192
|
+
password=password,
|
|
193
|
+
secret=secret,
|
|
194
|
+
port=args.port,
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
if args.command == "monitor":
|
|
198
|
+
agent.monitor(
|
|
199
|
+
recheck_time=args.recheck,
|
|
200
|
+
doublecheck_time=args.doublecheck,
|
|
201
|
+
ask=args.ask,
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
if __name__ == "__main__":
|
|
205
|
+
main()
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nightagent
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: Automatically Detect and Repair Common Firewall Issues
|
|
5
|
+
Home-page: https://github.com/gocarta/nightagent
|
|
6
|
+
Download-URL: https://github.com/gocarta/nightagent/tarball/download
|
|
7
|
+
Author: Daniel J. Dufour
|
|
8
|
+
Author-email: daniel.j.dufour@gmail.com
|
|
9
|
+
Keywords: data,python
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: netmiko
|
|
17
|
+
Dynamic: author
|
|
18
|
+
Dynamic: author-email
|
|
19
|
+
Dynamic: classifier
|
|
20
|
+
Dynamic: description
|
|
21
|
+
Dynamic: description-content-type
|
|
22
|
+
Dynamic: download-url
|
|
23
|
+
Dynamic: home-page
|
|
24
|
+
Dynamic: keywords
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
Dynamic: requires-dist
|
|
27
|
+
Dynamic: summary
|
|
28
|
+
|
|
29
|
+
# nightagent
|
|
30
|
+
> Automatically Detect and Repair Common Firewall Issues
|
|
31
|
+
|
|
32
|
+
## install
|
|
33
|
+
```
|
|
34
|
+
pip install nightagent
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## usage (in cli)
|
|
38
|
+
```sh
|
|
39
|
+
> nightagent --device-type paloalto_panos --hostname 192.168.1.1 --username admin monitor
|
|
40
|
+
> password:
|
|
41
|
+
> secret:
|
|
42
|
+
```
|
|
43
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
setup.cfg
|
|
4
|
+
setup.py
|
|
5
|
+
nightagent/__init__.py
|
|
6
|
+
nightagent.egg-info/PKG-INFO
|
|
7
|
+
nightagent.egg-info/SOURCES.txt
|
|
8
|
+
nightagent.egg-info/dependency_links.txt
|
|
9
|
+
nightagent.egg-info/entry_points.txt
|
|
10
|
+
nightagent.egg-info/requires.txt
|
|
11
|
+
nightagent.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
netmiko
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nightagent
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from setuptools import setup
|
|
2
|
+
from os import path
|
|
3
|
+
|
|
4
|
+
this_directory = path.abspath(path.dirname(__file__))
|
|
5
|
+
|
|
6
|
+
with open(path.join(this_directory, "README.md")) as f:
|
|
7
|
+
long_description = f.read()
|
|
8
|
+
|
|
9
|
+
setup(
|
|
10
|
+
name="nightagent",
|
|
11
|
+
packages=["nightagent"],
|
|
12
|
+
package_dir={"nightagent": "nightagent"},
|
|
13
|
+
package_data={
|
|
14
|
+
"nightagent": [
|
|
15
|
+
"__init__.py",
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
entry_points={
|
|
19
|
+
'console_scripts': ['nightagent=nightagent.__init__:main'],
|
|
20
|
+
},
|
|
21
|
+
version="0.0.0",
|
|
22
|
+
description="Automatically Detect and Repair Common Firewall Issues",
|
|
23
|
+
long_description=long_description,
|
|
24
|
+
long_description_content_type="text/markdown",
|
|
25
|
+
author="Daniel J. Dufour",
|
|
26
|
+
author_email="daniel.j.dufour@gmail.com",
|
|
27
|
+
url="https://github.com/gocarta/nightagent",
|
|
28
|
+
download_url="https://github.com/gocarta/nightagent/tarball/download",
|
|
29
|
+
keywords=["data", "python"],
|
|
30
|
+
classifiers=[
|
|
31
|
+
"Development Status :: 4 - Beta",
|
|
32
|
+
"Programming Language :: Python :: 3",
|
|
33
|
+
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
|
|
34
|
+
"Operating System :: OS Independent",
|
|
35
|
+
],
|
|
36
|
+
install_requires=[
|
|
37
|
+
"netmiko",
|
|
38
|
+
],
|
|
39
|
+
)
|