cve-search / cpe-guesser

Tool to guess CPE name based on common software name
https://cve-search.github.io/cpe-guesser/
BSD 2-Clause "Simplified" License
81 stars 14 forks source link

CPE guessing logic & database access as a class. #2

Closed oh2fih closed 3 years ago

oh2fih commented 3 years ago

What a nice project you have started, very useful!

I noticed both lookup.py and server.py were sharing code that could be moved to a class both interfaces can use. Also, providing this as a class could help others utilize the tool as a part of their own projects, e.g., by importing both cpe-guesser & CveXplore to participate in a single workflow.

Additionally, I'd suggest using HTTP error code 400 when there's a problem with the request format. HTTP 500 gives an impression something is wrong with the backend.

adulau commented 3 years ago

That's awesome. You are fast. I was prototyping and you did the clean-up faster than me ;-) Thank you.