I am trying to reach dell support website to be able to check server's warranty from the terminal.
I have found this link for curl, but it returns me access denied error.
curl https://www.dell.com/support/home/uk/en/ukdhs1/product-support/servicetag/$(dmidecode -s system-serial-number)/warranty?ref=captchasuccess
Output:
<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
You don't have permission to access "http://www.dell.com/support/home/en/en/ukdhs1/product-support/servicetag/XXXXXX/warranty?" on this server.<P>
Reference #18.3fd86b68.1653307511.316d4d5
</BODY>
</HTML>
I have tried many similar links and different machines, the output seems to be always same.
Does anybody have an idea how to be able to access Dell support page via curl
,wget
, or similar command?
I am able to check warranty manually via browser.
I can go to https://www.dell.com/support/home/en-us and put serial number in "identify my product" tab. after clicking "view details", I can see the warranty expiration.
EDIT:
Curl is now working:
curl --header 'user-agent: Chrome/1337' https://www.dell.com/support/home/sk-sk/product-support/servicetag/<serial-number-here>/overview
or
curl --header 'user-agent: Chrome/1337' https://www.dell.com/support/home/uk/en/ukdhs1/product-support/servicetag/$(dmidecode -s system-serial-number)/warranty
The another problem is that output of this curl is:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Challenge Validation</title>
<link rel="stylesheet" type="text/css" href="/_sec/cp_challenge/sec-3-6.css">
<script type="text/javascript">function cp_clge_done(){location.reload(true);}</script>
<script src="/_sec/cp_challenge/sec-cpt-int-3-6.js" async defer></script>
<script type="text/javascript">sessionStorage.setItem('data-duration', 30);</script>
</head>
<body>
<div class="sec-container">
<div id="sec-text-container"><iframe id="sec-text-if" class="custmsg" src="/_sec/cca/esupp/index.htm"></iframe></div>
<div id="sec-if-container">
<iframe id="sec-cpt-if" class="crypto" data-key="" data-duration=30 src="/_sec/cp_challenge/ak-challenge-3-6.htm"></iframe>
</div>
</div>
</body>
</html>
I have tried to check it via web browser
and to pass that challenge validation
I had to wait up to 30 seconds, and then I was redirected to the desired page.
Is it possible to somehow setup curl
or wget
to actively display the webpage content for like 40 seconds ? Or do I have to to rather use elinks
to achieve this goal ? And does elinks
have an option to customize header
with user-agent
parameter?
EDIT2:
I have tried to install elinks
and created ~/elinks/elinks.conf
with this content:
set protocol.http.user_agent = "Chrome/1337"
But it again I get output access denied
, most likely because the user agent header
is not the last header