This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def read_file(filename, chunk_size=1024*1024, delimiter='\n'): | |
with open(filename, 'r', encoding="utf8") as f: | |
carry_forward = '' | |
chunk = 'INITIALIZED' | |
while len(chunk) > 0: | |
chunk = f.read(chunk_size) | |
augmented_chunk = carry_forward + chunk | |
lines = augmented_chunk.split(delimiter) | |
carry_forward = lines.pop() | |
yield from lines |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import xmltodict | |
import json | |
import off | |
FINDINGS_FILE = r'qualys\qualys_hosts.xml' | |
SEVERITIES = ['Low', 'Low', 'Medium', 'Medium', 'High'] | |
CONFIDENCES = { 'Potential': 'Medium', 'Confirmed': 'High' } | |
OFF_FILE = r'offl.json' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set "VIRTUAL_ENV=%CD%\temp" | |
set "PATH=%VIRTUAL_ENV%\Scripts;%PATH%" | |
set "PROMPT=(VIRTUAL) $P$G%" | |
python -m venv temp | |
pip install -r requirements.txt | |
python main.py |
NewerOlder