katana icon indicating copy to clipboard operation
katana copied to clipboard

Katana does not parse textarea element

Open hczdmr opened this issue 1 year ago • 4 comments

katana version:

v1.0.1

Current Behavior:

I have a test.html file as below:

<form action="/targets/simple-textarea-form.html">
  <textarea type="text" name="textarea-get-form" id="textarea-get-form">default_value</textarea>
  <input type="submit" value="send" name="simple-textarea-form-submit-button">
</form>

Katana finds http://xxx.com/targets/simple-textarea-form.html?simple-textarea-form-submit-button=send URL instead of http://xxx.com/targets/simple-textarea-form.html?textarea-get-form=default_value&simple-textarea-form-submit-button=send Because Katana can not parse textarea element.

Expected Behavior:

I would expect Katana to find this URL: http://xxx.com/targets/simple-textarea-form.html?textarea-get-form=default_value&simple-textarea-form-submit-button=send

Steps To Reproduce:

  1. Run katana with this command: ./katana -u http://xxx.com/test.html -iqp -aff -sc -jc -kf all -hl -v -d 5
  2. Katana finds this URL: http://xxx.com/targets/simple-textarea-form.html?simple-textarea-form-submit-button=send
  3. I would expect Katana to find this URL: http://xxx.com/targets/simple-textarea-form.html?textarea-get-form=default_value&simple-textarea-form-submit-button=send

Anything else:

hczdmr avatar May 24 '23 20:05 hczdmr

Looks like we're only looking for input type fields and not textareas:

https://github.com/projectdiscovery/katana/blob/846693f096ee4bcb6e46963d1690ac966907ec0f/pkg/engine/parser/parser.go#L542-L549

olearycrew avatar May 24 '23 20:05 olearycrew

Yeah, you can add textareas if you want :)

hczdmr avatar May 24 '23 20:05 hczdmr

@olearycrew Is it planned to be added as a feature? If you want we can develop this feature?

hczdmr avatar May 25 '23 07:05 hczdmr

@hczdmr I think we would welcome a contribution here (cc @ehsandeep)

olearycrew avatar May 25 '23 15:05 olearycrew

Fixed in https://github.com/projectdiscovery/katana/pull/921

Mzack9999 avatar Jul 23 '24 19:07 Mzack9999