Skip to content

Commit

Permalink
add waf download function.
Browse files Browse the repository at this point in the history
  • Loading branch information
rshewitt committed Dec 18, 2023
1 parent aee51a6 commit ea67f06
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions harvester/extract/waf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,13 @@ def traverse_waf(url, files=[], file_ext=".xml", folder="/", filters=[]):
traverse_waf(folder, files=files, filters=filters)

return files


def download_waf(files):
output = []
for file in files:
res = requests.get(file)
if res.status_code == 200:
output.append(res.content)

return output

0 comments on commit ea67f06

Please sign in to comment.