#exploitdb-API The goal is keep a SGDB (sqlite3 or your preferred) synchronized with exploit-db.com, through exploit-db official github repository, and to offer a search HTTP API by CVE, OSVDB, Title etc.
- Get information aobut CVE, OSVDB and other from exploit-db official website
- Script (service by crontab) to update from it from official repository of The Exploit Database, a project sponsored by Offensive Security.
- Script (Service by crontab) to sync exploits from repository to DB
- API to search on DB
- install Script
- HTTP Search API
- include a SQLite3 DB that you need to start (synchronized weekly)
- Logs and statistics
##All you need
###Intalation Clone this Repository
git clone https://github.com/asrocha/exploitdb-API.git
Run install.sh with exploit-db diretctory destination default ./exploits
./install.sh ./exploits
Run update-db.php to update the database:
php update-db.php
Take care if you do not downloaded de exploitdb.db it will take a lot of time around 50 hours
###Crontab you could customize your own update time in crontab, we recommend hourly
updating only exploits files hourly:
59 * * * * * update-exploit-db.sh
updating DB from files hourly:
59 * * * * * php update-db.php
if you prefer you can upate all together updating all hourly:
59 * * * * * update-all.sh
All you need to conf is setting the path on "__construct function" in exploitdb.class.php Make sure that $this->exploitdb_dir = "./exploits/platforms/" is correct if you wanna that the logs are preserved set $preserv_log = 1;
From PHP builtn Server With mod_rewrite
php -S localhost:8080 mod_rewrite-sub.php
Without mod_rewrite
php -S localhost:8080
####Searching by CVE
Using mod_rewrite:
http://localhost:8080/CVE/2016-3714
http://localhost:8080/byCVE/2016-3714
http://localhost:8080/cve/2016-3714
http://localhost:8080/bycve/2016-3714
Query String
http://localhost:8080/API.php?CVE=2016-3714
http://localhost:8080/API.php?cve=2016-3714
http://localhost:8080/API.php?byCVE=2016-3714
http://localhost:8080/API.php?bycve=2016-3714
####Searching by OSVDB
Using mod_rewrite:
http://localhost:8080/OSVDB/29421
http://localhost:8080/osbdb/29421
http://localhost:8080/byosvdb/29421
http://localhost:8080/byOSVDB/29421
Query String
http://localhost:8080/API.php?OSVDB=29421
http://localhost:8080/API.php?osvdb=29421
http://localhost:8080/API.php?byOSVDB29421
http://localhost:8080/API.php?byosbdb=29421
####Searching by Title or Exploit Using mod_rewrite:
http://localhost:8080/exploit/ms14
Query String
http://localhost:8080/API.php?exploit=ms14
If you wanna know how many exploits are on database
http://localhost:8080/statistcs
http://localhost:8080/API.php?statistcs
Have a lot of Fun !!!