Created
January 11, 2018 07:36
-
-
Save tsondt/8ce8a9b4cfd355960c34f0272525bd6f to your computer and use it in GitHub Desktop.
This file contains 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
from lxml import etree | |
ifile = open('capec_v2.6.xml', 'r') | |
for ev, el in etree.iterparse(ifile,events=('start',), tag='{http://capec.mitre.org/capec-2}Category'): | |
for i in el.iter(): | |
if 'Name' in i.attrib: | |
if i.get('Status') == 'Draft': | |
if 'WASC' not in i.get('Name'): | |
print 'CAPEC-' + i.get('ID') + '-' + i.get('Name') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment