0

Here's a link to my gist code that I have coded and there is a screenshot of terminal which shows what kind of error it is.

I have double checked the format of JSON file but continuously getting the same error.

Please help. Sincerely,

1

1 Answer 1

0

Update your vuln_ip.json to this:

{
  "mappings": {
    "vulnerabilities": {
      "properties": {
        "address": {
          "type": "ip"
        },
        "cpes": {
          "type": "text"
        },
        "port": {
          "type": "nested",
          "properties": {
            "portid": {
              "type": "integer"
            },
            "protocol": {
              "type": "text"
            },
            "service": {
              "type": "nested",
              "properties": {
                "extrainfo": {
                  "type": "text"
                },
                "name": {
                  "type": "text"
                },
                "ostype": {
                  "type": "text"
                },
                "product": {
                  "type": "text"
                },
                "version": {
                  "type": "text"
                }
              }
            },
            "state": {
              "type": "text"
            }
          }
        },
        "score": {
          "type": "text"
        }
      }
    }
  }
}

Modify your curl command to this curl -XPUT 'localhost:9200/vulnerable/' -d @vuln_ip.json.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.