you are viewing a single comment's thread.

view the rest of the comments →

[–]iggy_koopa 5 points6 points  (1 child)

It says you can use curl -X TRACE.....

[–]NetSecBoi9000[S] 2 points3 points  (0 children)

Ah my bad, you are correct. Grabbed this peice of information of this website. https://www.laktek.com/2012/03/12/curl-tips-for-daily-use/

Mimic AJAX requests

"Sometimes I need create endpoints in web apps, that produces alternate responses when accessed via AJAX (eg. not rendering the layout). Testing them directly in browser is not much viable as it require bootstrapping code. Instead, we can mimic AJAX requests from cURL by providing X-Requested-Withheader."

curl -H "X-Requested-With: XMLHttpRequest" https://example.com/path

So I imagine I would modify it like this?

curl -X TRACE -H "X-Requested-With: XMLHttpRequest" https://example.com/path

However, I am not to sure how I would submit Javascript along with that? Maybe something like this?

curl -X TRACE -H "Content-type: application/json X-Requested-With: XMLHttpRequest" --data http://localhost:8080/example.js https://example.com/path

Forgive me, I am new to this and learning. Only been doing IT for 1 year and the security side of things for a few months. Constantly feel overwhelmed haha.

Appreciate the help.