Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5956

Curl on Windows 11 and curl on Ubuntu 22.04 server different results

$
0
0

I try make api calls to following endpoint https://apip.colruyt.be/gateway/emec.colruyt.protected.bffsvc/cg/fr/api/products?placeId=604&page=2&size=250&sort=popularity+asc&isAvailable=true. For it not to get blocked for botting I have to pass different headers. First one is a public key x-cg-apikey: a8ylmv13-b285-4788-9e14-0f79b7ed2411 and the second one is the User Agent. I'm using this one User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 OPR/107.0.0.0.

When I do the call in Postman or using curl command on my windows 11 powershell I get a result.

When I do this on my ubuntu server, I get a message saying I've been blocked

<div class="content-block"><span class="title">Sorry for interrupting your session.</span><p>While you were surfing, something made us think you might be a bot. <br>      There are several reasons that can explain this:</p><ul><li>You are using a plugin that blocks JavaScript in your browser.</li><li>You are using a VPN or privacy software that is often used by malicious people.</li><li>You are a superuser who moves at superhuman speed on this website.</li></ul><p id="identify-msg" style="display: none">To regain access, please make sure that cookies and JavaScript are enabled before reloading the page.</p><p id="captcha-msg" style="display: none">After completing the CAPTCHA procedure below, you will immediately regain access to the website.</p></div>

I understand that technically it shows me a Captcha, but why am I flagged as a bot on Ubuntu and not on Windows ?

The curl command I use:curl -H "Accept: application/json" -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 OPR/107.0.0.0" -H "X-Cg-Apikey: a8ylmv13-b285-4788-9e14-0f79b7ed2411" -X GET "https://apip.colruyt.be/gateway/emec.colruyt.protected.bffsvc/cg/fr/api/products?placeId=604&page=1&size=1&sort=popularity+asc&isAvailable=true"


Viewing all articles
Browse latest Browse all 5956

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>