USER-AGENT

MODIFICATION: USER-AGENT

Some applications block cURL by checking the User-Agent header. For example, the server may reject requests with: User-Agent: curl/7.x.x. Use the -A flag to modify the user agent string which can be helpful in bypassing user agent checks

#check if there is a user agent check that blocks cURL
root@oco:~$ curl -i http://MACHINE_IP/ua_check.php

root@oco:~$ curl {targetSite:port} -A 'Mozilla/5.0'
 * the -A flag is used to set and change the user-agent
 
 * If the first fails and the second succeeds, the UA check is working, and you've 
   bypassed it by spoofing.

Last updated