0

I am using a tool called waybackurls which is returning a list of URLs.

waybackurls api.target.com | grep "url"

Output

https://api.target.com/ws/api/upg/customer-bff/v2/rest/url?=value

Now I am trying to validate the return URL through curl. Because it returns lot of false-positive results. I am able get the http status code only

waybackurls api.target.com | grep "url" | xargs -n 1 curl -s -o /dev/null -w "%{http_code}"

Output

200

what I want output is using curl

200  > https://api.target.com/ws/api/upg/customer-bff/v2/rest/url?=value
404  > https://api.target.com/ws/api/redirect_to?=value

Is it possible to get this formate with curl request?

thanks

1 Answer 1

1

Just check curl manual. You already put http_code, the same for url:

waybackurls api.target.com | grep "url" | xargs -n 1 curl -s -o /dev/null -w "%{http_code} > %{url_effective}\n"
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.