I am now using GuzzleHttp to make HTTP requests, first I make a POST request to login.asp, which returns a response with Set-Cookie with a value that I need for future requests
When I inspect my obtained answer I get the following
As noted, I get all the keys except the Set-Cookie, what can be happening? How can I get this value? I'm using "guzzlehttp/guzzle": "^6.3",
or can I get it using another tool?
$jar = new CookieJar;
$client = new Client([
'base_uri' =>'miurl/',
'timeout' => 10.0,
'cookies' => $jar
]);
$response = $client->request('POST', 'login.asp', [
'form_params' => [
'pws' => '',//data password
'user' => '',//data user
]
]);
//Request require coookies
$response = $client->request('POST', 'goform/Wls', [
'form_params' => [
/*Form´Params*/
],
//if I manually add a correct userid the post application works fine
'headers' => [
//Require cookie param userid
'Cookie' => 'LANG_COOKIE=lang_span; userid=1524324306',
]
]);
Alternatively, I used this configuration without being able to obtain the cookie yet
checking a bit the answer using postman, is that after doing the correct login is still on the same page but with javascript redirect, can this influence?
<script language='JavaScript'>window.location='/admin/cable-Systeminfo.asp';</script>
</html>
The requests I make directly for a router hitron technologies cgnv22 to manage the mac filtering, I would like to provide more information but it is sensitive information