Python Forum
Extract Httponly, Secure, domain and path from a cookie
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extract Httponly, Secure, domain and path from a cookie
#1
I am trying to extract the Httponly, Secure, domain and path from the given cookie in python. How do I do that in python ???

Code:
target_url = "https://www.google.com/" response2 = requests.get(target_url).headers['Set-Cookie'] print(response2)
Result:
Output:
1P_JAR=2020-01-26-16; expires=Tue, 25-Feb-2020 16:51:26 GMT; path=/; domain=.google.com; Secure, NID=196=EXN1Mahz2_DymAp2otc-1JaTFvOHMPZHUWg9qPAA87OO4fx21wvl6D1aqY75vAjo1-4OcdAFJo1bqvpAR-IJ4m9c01KjXxF2UoH4A6Nacu3jwiY-DtUgwnNKtMfIS6wbCPhTexYlb43z6ostuA1K_S0eKjIlDqmkqRmMXUHwu3o; expires=Mon, 27-Jul-2020 16:51:26 GMT; path=/; domain=.google.com; HttpOnly
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Best way to secure API key when sharing quarinteen 2 1,819 Jan-19-2024, 04:46 PM
Last Post: deanhystad
  How secure is the use of "secret" import? ejwjohn 12 5,234 Nov-09-2023, 08:31 AM
Last Post: ejwjohn
  Peaks in time domain frohr 0 1,449 Jul-06-2023, 02:57 AM
Last Post: frohr
  extract last word from path. mg24 4 4,347 Nov-01-2022, 10:55 AM
Last Post: carecavoador
  Requests Session Overwriting and cookie jar muzikman 0 2,352 Dec-13-2021, 02:22 PM
Last Post: muzikman
  WebDriverException: Message: 'PATH TO CHROME DRIVER' executable needs to be in PATH Led_Zeppelin 1 4,059 Sep-09-2021, 01:25 PM
Last Post: Yoriz
  python 3 dns lookup private domain didact 1 5,632 Sep-19-2020, 06:01 PM
Last Post: bowlofred
  Cookie and Session JohnnyCoffee 6 5,229 Apr-14-2020, 02:04 PM
Last Post: JohnnyCoffee
  Secure App Data Storage for Kivy Android App JonPC 1 3,835 Nov-08-2019, 03:42 PM
Last Post: luke
  Save Cookie header value in var DavidFernandez 0 2,489 Aug-24-2018, 07:30 PM
Last Post: DavidFernandez

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020
This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.