Skip to content

Instantly share code, notes, and snippets.

@pajswigger
Created April 19, 2018 10:35
Show Gist options
  • Save pajswigger/fa26de5de279f7883d0087dcb28f1ef0 to your computer and use it in GitHub Desktop.
Save pajswigger/fa26de5de279f7883d0087dcb28f1ef0 to your computer and use it in GitHub Desktop.
import sys
out = []
in_summary = False
with open(sys.argv[1]) as input:
for line in input:
if line.startswith('<table cellpadding="0" cellspacing="0" class="summary_table">'):
in_summary = True
if in_summary:
line = line.replace('rowspan="4"', 'rowspan="6"')
if line.startswith('</table'):
out.append('<tr><td>CVSS: </td><td><b>TBD</b></td></tr>\n')
out.append('<tr><td>CVE: </td><td><b>TBD</b></td></tr>\n')
out.append(line)
with open(sys.argv[1], 'w') as output:
for line in out:
output.write(line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment