Archived
23 lines
542 B
Python
23 lines
542 B
Python
#!/usr/bin/env python3
|
|
import requests
|
|
import os
|
|
|
|
URL = "https://www.wordfence.com/api/intelligence/v2/vulnerabilities/scanner"
|
|
OUT_FILE = "wordfence_CVE.json"
|
|
|
|
def main():
|
|
print("API request.....")
|
|
r = requests.get(URL, timeout=60)
|
|
r.raise_for_status()
|
|
|
|
script_dir = os.path.dirname(os.path.abspath(__file__))
|
|
out_path = os.path.join(script_dir, OUT_FILE)
|
|
|
|
with open(out_path, "w", encoding="utf-8") as f:
|
|
f.write(r.text)
|
|
|
|
print("File Saved!")
|
|
|
|
if __name__ == "__main__":
|
|
main()
|