offensive-security / exploitdb

The legacy Exploit Database repository - New repo located at https://gitlab.com/exploit-database/exploitdb
https://gitlab.com/exploit-database/exploitdb
GNU General Public License v2.0
7.74k stars 1.88k forks source link

Publish APIs to search #219

Closed btilongnguyen closed 2 years ago

btilongnguyen commented 2 years ago

Hi. I am wondering if there is a plan to provide some REST APIs endpoints so we can search without using the Web UI. Thank you.

btilongnguyen commented 2 years ago

It seems the API I need is already exposed: https://www.exploit-db.com/search?cve={cveCode}. It is the same as the URL shown in the browser when we search. However, we have to add this additional field to the request header in order to retrieve the response in JSON: x-requested-with: XMLHttpRequest. Otherwise, the API returns HTML.