aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorStanislav Boboň2021-05-04 16:48:34 +0200
committerStanislav Boboň2021-05-04 16:48:34 +0200
commit64ef146fa2f237fd5681ceaf5d0905ed780c20cd (patch)
treebec9632f33a657e7cc0faf9f058d665b7f6aacfc /examples
parentd4f16012c313f5de6467f7689f46d992602c86bb (diff)
downloadsec-certs-64ef146fa2f237fd5681ceaf5d0905ed780c20cd.tar.gz
sec-certs-64ef146fa2f237fd5681ceaf5d0905ed780c20cd.tar.zst
sec-certs-64ef146fa2f237fd5681ceaf5d0905ed780c20cd.zip
analyses
Diffstat (limited to 'examples')
-rw-r--r--examples/fips_oop_demo.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/examples/fips_oop_demo.py b/examples/fips_oop_demo.py
index c716346d..38b09455 100644
--- a/examples/fips_oop_demo.py
+++ b/examples/fips_oop_demo.py
@@ -34,25 +34,25 @@ def main(config_file, json_file, no_download_algs, redo_web_scan, redo_keyword_s
logging.info(f'Finished parsing. Have dataset with {len(dset)} certificates.')
# Dump dataset into JSON
- dset.to_json(dset.root_dir / 'fips_full_dataset.json')
+ # dset.to_json(dset.root_dir / 'fips_full_dataset.json')
logging.info(f'Dataset saved to {dset.root_dir}/fips_full_dataset.json')
logging.info("Converting pdfs")
- dset.convert_all_pdfs()
- dset.to_json(dset.root_dir / 'fips_full_dataset.json')
+ # dset.convert_all_pdfs()
+ # dset.to_json(dset.root_dir / 'fips_full_dataset.json')
logging.info("Extracting keywords now.")
- dset.extract_keywords(redo=redo_keyword_scan)
+ # dset.extract_keywords(redo=redo_keyword_scan)
logging.info(f'Finished extracting certificates for {len(dset.certs)} items.')
logging.info("Dumping dataset again...")
- dset.to_json(dset.root_dir / 'fips_full_dataset.json')
+ # dset.to_json(dset.root_dir / 'fips_full_dataset.json')
logging.info("Searching for tables in pdfs")
- not_decoded_files = dset.extract_certs_from_tables(higher_precision_results)
+ # not_decoded_files = dset.extract_certs_from_tables(higher_precision_results)
- logging.info(f"Done. Files not decoded: {not_decoded_files}")
+ # logging.info(f"Done. Files not decoded: {not_decoded_files}")
logging.info("Parsing algorithms")
if not no_download_algs:
aset = FIPSAlgorithmDataset({}, Path(dset.root_dir / 'web/algorithms'), 'algorithms', 'sample algs')
@@ -73,7 +73,8 @@ def main(config_file, json_file, no_download_algs, redo_web_scan, redo_keyword_s
# dset.find_certs_with_different_algorithm_vendors()
# dset.to_json(dset.root_dir / 'fips_mentioned.json')
- print(dset.references_vendors_or_not())
+
+ dset.plot_alg_analysis_graphs()
end = datetime.now()
logging.info(f'The computation took {(end - start)} seconds.')