# Preparing Identifier

## Sample Example

* Let's suppose Your login page looks like this

![](https://1100881526-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M__LRjxgPnpb0czuBBB%2F-MlQmWMwjVCT_w2m_UiY%2F-MlQmjUOSgvzaM6Ilhdk%2FLogin%20Page.png?alt=media\&token=0717d44e-d593-4075-a028-163bfb278f2a)

* Collect unique id of input fields on login page like this

![](https://1100881526-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M__LRjxgPnpb0czuBBB%2F-MlQmWMwjVCT_w2m_UiY%2F-MlQn4NP0m20HnaUOV9Q%2Femail_field.png?alt=media\&token=1bae5846-d407-4477-9a81-a0f1849c4e45)

![](https://1100881526-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M__LRjxgPnpb0czuBBB%2F-MlQmWMwjVCT_w2m_UiY%2F-MlQnD87H9idFi3nQaTq%2Fpassword_field.png?alt=media\&token=336b909c-ac68-4f7f-a4bc-8b7996b80b7e)

![](https://1100881526-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M__LRjxgPnpb0czuBBB%2F-MlQmWMwjVCT_w2m_UiY%2F-MlQnUhvbbzuzudgjgA6%2Fsubmit_button.png?alt=media\&token=1fe80560-3614-47d8-bb81-f4e29809771f)

* Now using these unique ids for input field and submit button, prepare a JSON like this.

```
{"username": {"identification": "type=\"text\"", "value": "john@acme.inc"}, "password": {"identification": "type=\"password\"", "value": "123456"}, "submit": {"identification": "type=\"submit\"", "value": "Login"}}
```

* Now our final k2hackbot command will be

```
k2hackbot scan-web-application --applicationUrl "http://[ip]:[port]/app/login" -isauthreq true --applicationIdentifier "{\"pid\":23,\"containerid\":\"de63415703d8\"}" --applicationLoginIdentifier "{\"username\": {\"identification\": \"type=\\\"text\\\"\", \"value\": \"john@acme.inc\"}, \"password\": {\"identification\": \"type=\\\"password\\\"\", \"value\": \"123456\"}, \"submit\": {\"identification\": \"type=\\\"submit\\\"\", \"value\": \"Login\"}}"
```
