savannah-hackers-public
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-hackers-public] [task #14392] cookies are not the same while g


From: Marc
Subject: [Savannah-hackers-public] [task #14392] cookies are not the same while generated in a script
Date: Tue, 28 Feb 2017 11:21:10 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/55.0.2883.87 Chrome/55.0.2883.87 Safari/537.36

URL:
  <http://savannah.gnu.org/task/?14392>

                 Summary: cookies are not the same while generated in a script
                 Project: Savannah Administration
            Submitted by: papa_mb
            Submitted on: Tue 28 Feb 2017 04:21:09 PM UTC
         Should Start On: Tue 28 Feb 2017 12:00:00 AM UTC
   Should be Finished on: Tue 28 Feb 2017 12:00:00 AM UTC
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                  Effort: 0.00

    _______________________________________________________

Details:

Hello,
I want to use a script to log in some sites, but when i try to save cookies in
a script, there's not the same content in that cookie that when i generate it
directly in the terminal.

As you can see below :

:~$ wget --cookies=on --keep-session-cookies --no-check-certificate
--save-cookies /tmp/cookie-epgv.txt --post-data
'Login=%my_login%&Password=%my_password%&RedirectURI='
--user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
Gecko) Ubuntu Chromium/55.0.2883.87 Chrome/55.0.2883.87 Safari/537.36" -O
/dev/null https://colloque4.inra.fr/epgv/user/login
--2017-02-28 16:59:33--  https://colloque4.inra.fr/epgv/user/login
Résolution de colloque4.inra.fr (colloque4.inra.fr)… 138.102.113.226
Connexion à colloque4.inra.fr (colloque4.inra.fr)|138.102.113.226|:443…
connecté.
Avertissement : impossible de vérifier l'attribut colloque4.inra.fr du
certificat, émis par «CN=TERENA SSL CA
2,O=TERENA,L=Amsterdam,ST=Noord-Holland,C=NL» :
  Impossible de vérifier localement l'autorité de l'émetteur.
requête HTTP transmise, en attente de la réponse… 302 Found
Emplacement : https://colloque4.inra.fr/epgv/ [suivant]
--2017-02-28 16:59:33--  https://colloque4.inra.fr/epgv/
Réutilisation de la connexion existante à colloque4.inra.fr:443.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/dev/null»

/dev/null                                        [ <=>                        
                                                                 ]  12,08K 
--.-KB/s    in 0,006s  

2017-02-28 16:59:33 (2,05 MB/s) - «/dev/null» enregistré [12366]

address@hidden:~$ cat /tmp/cookie-epgv.txt 
# HTTP cookie file.
# Generated by Wget on 2017-02-28 16:59:33.
# Edit at your own risk.

colloque4.inra.fr       FALSE   /       FALSE   0       is_logged_in    true
colloque4.inra.fr       FALSE   /       FALSE   0       eZSESSID        
8000341b71232095d1f4c04948509eec


And when i launch the same command in my script :


address@hidden:~$ ./01-PRODUCTION/scripts/wget-multi
colloque4-test.txt 
=======================================================
DEBUT DE LA NOUVELLE ARCHIVE

Répertoire de la future archive :
/home/me/03-ARCHIVES/sitesStatiquesINRA/epgv
URL en cours de traitement : colloque4.inra.fr/epgv


Le fichier de cookies n'existe pas
Setting --cookies (cookies) to on
Setting --keep-session-cookies (keepsessioncookies) to 1
Setting --check-certificate (checkcertificate) to 0
Setting --save-cookies (savecookies) to /tmp/cookie-epgv.txt
Setting --post-data (postdata) to
'Login=%my_login%&Password=%my_password%&RedirectURI='
Setting --output-document (outputdocument) to /dev/null
Setting --user-agent (useragent) to Mozilla/5.0 (X11; Linux x86_64)
AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/55.0.2883.87
Chrome/55.0.2883.87 Safari/537.36
Setting --method (method) to POST
Setting --body-data (bodydata) to
'Login=%my_login%&Password=%my_password%&RedirectURI='
DEBUG output created by Wget 1.17.1 on linux-gnu.

Reading HSTS entries from /home/me/.wget-hsts
URI encoding = «UTF-8»
--2017-02-28 17:07:39--  https://colloque4.inra.fr/epgv/user/login
Host «colloque4.inra.fr» has not issued a general basic challenge.
Résolution de colloque4.inra.fr (colloque4.inra.fr)… 138.102.113.226
Caching colloque4.inra.fr => 138.102.113.226
Connexion à colloque4.inra.fr (colloque4.inra.fr)|138.102.113.226|:443…
connecté.
Created socket 4.
Releasing 0x000055c5090484f0 (new refcount 1).
Initiating SSL handshake.
Handshake successful; connected socket 4 to SSL handle 0x000055c5090494a0
certificate:
  subject: CN=colloque4.inra.fr,OU=Domain Control Validated
  issuer:  CN=TERENA SSL CA 2,O=TERENA,L=Amsterdam,ST=Noord-Holland,C=NL
Avertissement : impossible de vérifier l'attribut colloque4.inra.fr du
certificat, émis par «CN=TERENA SSL CA
2,O=TERENA,L=Amsterdam,ST=Noord-Holland,C=NL» :
  Impossible de vérifier localement l'autorité de l'émetteur.

---request begin---
POST /epgv/user/login HTTP/1.1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
Gecko) Ubuntu Chromium/55.0.2883.87 Chrome/55.0.2883.87 Safari/537.36
Accept: */*
Accept-Encoding: identity
Host: colloque4.inra.fr
Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 46

---request end---
[BODY data: 'Login=%my_login%&Password=%my_password%&RedirectURI=']
requête HTTP transmise, en attente de la réponse… 
---response begin---
HTTP/1.1 200 OK
Date: Tue, 28 Feb 2017 16:07:39 GMT
Server: Apache
X-Powered-By: eZ Publish
Set-Cookie: eZSESSID=43c8c36ddba307b194783b2dd097f923; path=/
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Last-Modified: Tue, 28 Feb 2017 16:07:39 GMT
Served-by: colloque4.inra.fr
Content-language: fr-FR
Keep-Alive: timeout=25, max=1000
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8

---response end---
200 OK

Stored cookie colloque4.inra.fr -1 (ANY) / <session> <insecure> [expiry none]
eZSESSID 43c8c36ddba307b194783b2dd097f923
Registered socket 4 for persistent reuse.
URI content encoding = «utf-8»
Taille : non indiqué [text/html]
Enregistre : «/dev/null»

/dev/null                                        [ <=>                        
                                                                 ]  11,20K 
--.-KB/s    in 0,005s  

2017-02-28 17:07:39 (2,33 MB/s) - «/dev/null» enregistré [11471]

Saving cookies to /tmp/cookie-epgv.txt.
Done saving cookies.
Saving HSTS entries to /home/me/.wget-hsts
# HTTP cookie file.
# Generated by Wget on 2017-02-28 17:07:39.
# Edit at your own risk.

colloque4.inra.fr       FALSE   /       FALSE   0       eZSESSID        
43c8c36ddba307b194783b2dd097f923

Thank's by advance
Bests




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/task/?14392>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]