I have a project in mind where I need to automatically login to a website using the cookie session id.
I know I can generate a cookie through the session ID in php or python for example, but I don't know if I can login directly in the webbrowser without having something else storing the cookie first .
Is it feasible to login in browser directly without any other steps like using curl in PHP and if so how can it be accomplished ?
Thanks
A copy of the cookie containing the session ID has to be placed in the browser's cookie jar.
You might be able to do it with a browser on the same system as the program by directly editing the data store that the browser stores cookies in. If the browser is already running it might not update its in-memory records of the cookies though.
It's possible that the server is implementing anti-session hijacking techniques such as associating the session id with a particular IP address or uses other fingerprinting techniques such as examining the User-Agent. If so, you'd need to ensure these match too.