Bash script and sessioncookies

Discussion in 'Firefox' started by steelneck, Feb 23, 2005.

  1. steelneck

    steelneck Guest

    I have a bash script that needs to be able to read a
    session cookie (those that doesent get written to the
    cookie.txt file). The Mozilla cookie-manager can read it,
    but how can i get the seession ID read with my shell script?

    I need to save a session ID to be used by cURL, and when cURL
    has done it's task (upload a busload of files), return to the
    browser and continue the session.
     
    steelneck, Feb 23, 2005
    #1
    1. Advertisements

  2. steelneck

    steelneck Guest

    Just as an update.
    Now i *know* that this works :)
    I used the mozilla cookie-manager to read (with my eyes) the
    session ID that doesent get written to file, and manually made
    a cookie file to be used with cURL, the rest worked like a charm.

    This is a bit frustrating, i know the info is there, in my computer,
    i can even see it, but cant get to it in my own command shell...
    (reminds me of another OS...) So, how does one get the session ID
    out of Mozilla, how does the session-manager get it?
     
    steelneck, Feb 24, 2005
    #2
    1. Advertisements

  3. steelneck

    steelneck Guest

    Yet another update.

    I found another (bad) solution:

    ngrep -W byline port 80 | grep PHPSESSID

    This does it quite nice, but makes su to root neccesary,
    but i do not want to do this as root. This would have
    been a very nice solution if it could be done as user.

    Any body know a better soultion to temporarily "borrow"
    a seesion ID from Mozilla to another aplication?
     
    steelneck, Feb 25, 2005
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.