Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

My work's VPN requires me to first login to a website, get a specific cookie and then pass that to the vpn software (This Juniper VPN if anyone is wondering and I'm using Linux).

I don't want to have to go searching through Firefox's preferences to find by hand find the cookie I need. I thought I'd use perl to read cookies.txt, but of course there doesn't seem to be a cookies.txt any more.

I then played around with sqlite3 (getting DBD::SQLite working was also a pain). It seems the cookie isn't actually saved to the file but is only in some active memory or something. I can find it in Firefox in the list of all cookies. There are also some cookies specific to our domain that are in both the file and while the browser is open. So something does get saved just not the specific cookie I need.

Any idea how I might go about retrieving this cookie? I'm willing to switch browsers if that might help. There's also something on github that tries to screen scrape the vpn website and capture the cookie from there, but it doesn't at all work with the site I have to log into. If I'm going about this (the vpn login) totally wrong let me know ideas on that too.

Thanks in advance.


In reply to Reading a cookie from an active browser session by xorl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-03-29 06:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found