Specific Errors Scenarios

  • Invalid Port Exception Error (17000)
$ curl --request GET \
  --url 'https://api.deepinfo.org/v1/lookup/portscan?target=www.deepinfo.com&ports=-22'
HTTP/1.1 400 BAD REQUEST
...
{
    "code": 17000,
    "reason": "Port is not valid."
}
  • Port limit condition (17001)
    Case 1:
$ curl --request GET \
  --url 'https://api.deepinfo.org/v1/lookup/portscan?target=www.deepinfo.com&ports=22,80,443'
HTTP/1.1 400 Bad Request
...
{
   "code":17001,
   "reason":"Port limit is exceed. Limit is 2."
}

Case 2:

$ curl --request GET \
  --url 'https://api.deepinfo.org/v1/lookup/portscan?target=www.deepinfo.com&ports=1-100'
HTTP/1.1 400 Bad Request
...
{
   "code":17001,
   "reason":"Port range limit is 2."
}

Case 3:

$ curl --request GET \
  --url 'https://api.deepinfo.org/v1/lookup/portscan?target=www.deepinfo.com&ports=100-1'
HTTP/1.1 400 Bad Request
...
{
   "code":17001,
   "reason":"Port range is backwards 100-."
}
  • Invalid Input Error (12000)
$ curl --request GET \
  --url 'https://api.deepinfo.org/v1/lookup/portscan?target=-1.0.0.0&ports=22,80,443'
HTTP/1.1 400 BAD REQUEST
...
{
  "code": 400,
  "reason": "target is neither valid FQDN nor IP."
}

Did this page help you?