Our REST API documentation can be found here:
https://api.wpsec.com/api/documentation
Example request to fetch the authorization token:
curl --location --request POST 'https://api.wpsec.com/oauth/token' \ --form 'client_id="32"' \ --form 'client_secret="89GdxCFczn0KNXXHcTzZimeJT7xQocrY9CYIicTY"' \ --form 'grant_type="client_credentials"'
Then use the access_token returned from the above command in the next request, like this:
curl --location --request GET 'https://api.wpsec.com/v1/report/6b757767612ad3d34671df1a2b24a36a' \ --header 'Authorization: Bearer jki32jjZDdddZ'
Fetch list with reports:
curl --location --request GET 'https://api.wpsec.com/v1/reports' \ --header 'Authorization: Bearer jki32jjZDdddZ'
Example report in JSON:
{"start_time":1647459945,"start_memory":45170688,"target_url":"https:\/\/biljetterna.se\/","target_ip":"5.9.12.237","effective_url":"https:\/\/biljetterna.se\/","interesting_findings":[{"url":"https:\/\/biljetterna.se\/","to_s":"Headers","type":"headers","found_by":"Headers (Passive Detection)","confidence":100,"confirmed_by":{},"references":{},"interesting_entries":["server: nginx\/1.14.0 (Ubuntu)","x-powered-by: PHP\/7.4.28"]},{"url":"https:\/\/biljetterna.se\/xmlrpc.php","to_s":"XML-RPC seems to be enabled: https:\/\/biljetterna.se\/xmlrpc.php","type":"xmlrpc","found_by":"Headers (Passive Detection)","confidence":30,"confirmed_by":{},"references":{"url":["http:\/\/codex.wordpress.org\/XML-RPC_Pingback_API"],"metasploit":["auxiliary\/scanner\/http\/wordpress_ghost_scanner","auxiliary\/dos\/http\/wordpress_xmlrpc_dos","auxiliary\/scanner\/http\/wordpress_xmlrpc_login","auxiliary\/scanner\/http\/wordpress_pingback_access"]},"interesting_entries":[]}],"version":{"number":"5.9.2","release_date":"2022-03-11","status":"latest","found_by":"Rss Generator (Passive Detection)","confidence":100,"interesting_entries":["https:\/\/biljetterna.se\/home\/feed\/, https:\/\/wordpress.org\/?v=5.9.2<\/generator>","https:\/\/biljetterna.se\/feed\/, https:\/\/wordpress.org\/?v=5.9.2<\/generator>"],"confirmed_by":{},"vulnerabilities":[]},"main_theme":null,"plugins":{"w3-total-cache":{"slug":"w3-total-cache","location":"https:\/\/biljetterna.se\/wp-content\/plugins\/w3-total-cache\/","latest_version":"2.2.1","last_updated":"2022-01-24T20:56:00.000Z","outdated":false,"readme_url":null,"directory_listing":null,"error_log_url":null,"found_by":"Comment Debug Info (Passive Detection)","confidence":30,"interesting_entries":[],"confirmed_by":{},"vulnerabilities":[],"version":{"number":"2.2.1","confidence":100,"found_by":"Readme - Stable Tag (Aggressive Detection)","interesting_entries":["https:\/\/biljetterna.se\/wp-content\/plugins\/w3-total-cache\/readme.txt"],"confirmed_by":{"Readme - ChangeLog Section (Aggressive Detection)":{"confidence":50,"interesting_entries":["https:\/\/biljetterna.se\/wp-content\/plugins\/w3-total-cache\/readme.txt"]}}}},"wordpresscom-stats-smiley-remover":{"slug":"wordpresscom-stats-smiley-remover","location":"https:\/\/biljetterna.se\/wp-content\/plugins\/wordpresscom-stats-smiley-remover\/","latest_version":"15.01","last_updated":"2016-01-15T18:46:00.000Z","outdated":true,"readme_url":null,"directory_listing":null,"error_log_url":null,"found_by":"Urls In Homepage (Passive Detection)","confidence":100,"interesting_entries":[],"confirmed_by":{"Urls In 404 Page (Passive Detection)":{"confidence":80,"interesting_entries":[]}},"vulnerabilities":[],"version":{"number":"14.12.01","confidence":80,"found_by":"Readme - Stable Tag (Aggressive Detection)","interesting_entries":["https:\/\/biljetterna.se\/wp-content\/plugins\/wordpresscom-stats-smiley-remover\/readme.txt"],"confirmed_by":{}}}},"config_backups":{},"stop_time":1647459948,"elapsed":3,"requests_done":16,"cached_requests":3,"data_sent":3510,"data_sent_humanised":"3.428 KB","data_received":214429,"data_received_humanised":"209.403 KB","used_memory":278908928,"used_memory_humanised":"265.988 MB"}
Comments
0 comments
Please sign in to leave a comment.