How can I copy a cookie from one machine to another?

1

I am unable to login to certain websites (such as StackOverflow) because the login URL is getting blocked (not the whole website) via a firewall.

Is it possible to copy the cookie file from another computer that is already logged into StackOverflow to this firewalled computer to trick the website that it is already authenticated and logged in?

Can this be done? If so, how?

deostroll

Posted 2010-01-18T10:01:47.290

Reputation: 1 515

Questions about the way the StackOverflow sites are working should be on meta.stackoverflow.com . Voting to migrate it there. – Gnoupi – 2010-01-18T10:03:40.017

3Gnoupi, I see your point, but the process could apply to any site, hence valid for SU? Mind, I don't have an answer! – outsideblasts – 2010-01-18T10:19:21.400

@Gnoupi, although this question refers to stackoverflow, it is actually about moving cookies from computer-to-computer, which is completely independent of SOFU – Josh Hunt – 2010-01-18T10:57:58.190

I tend to agree with outsideblasts, though I would like Deostroll to make the question a little more readable... – Ivo Flipse – 2010-01-18T10:58:40.467

@joshhunt and @outsideblasts - Sorry, I thought that it was depending on the site, so that it wouldn't apply to other sites. My knowledge in this matter is very thin ;-) – Gnoupi – 2010-01-18T12:01:15.770

Answers

2

Firefox cookies are stored in the files cookies.sqlite and cookies.sqlite-journal in the folder

%APPDATA%\Mozilla\Firefox\Profiles\<profile>

where %APPDATA% is an environment variable that holds the path of the user's application data folder (which varies between Windows versions and languages), and <profile> is the name of the profile, which has a "random" component and ends with the profile name; if you don't have multiple Firefox profiles, there should be only one directory.

However, this means you cannot copy individual cookies, only the entire cookie database; and I am not 100% sure that simply copying the files will work.

Michael Borgwardt

Posted 2010-01-18T10:01:47.290

Reputation: 3 047

There are way to copy individual cookies, although it might not be so straightforward. – Ploni – 2018-07-12T15:20:39.613