Simplify getting and using cookies from the browser to use in Python.

Overview

CookieCache

Simplify getting and using cookies from the browser to use in Python.

NOTE: All the logic to interface with the browsers is done by the Browser Cookie 3 library.

This code wraps that BrowserCookie3 in a CLI and library that caches the selected cookies as JSON to disk, so they can be transferred to other machines, or be used again without having to interactivly re-enter MacOS user credentials.

Install

pip install cookiecache

Usage

The idea is you run cookiecache once (either as a cli tool or as a library), and then cache the cookies to JSON on disk. Then the next time you run the same thing, cookiecache will look in the JSON file first, and only get fresh cookies from the browser if they have expired.

CLI

Examples:

# Get github session cookies and save to disk
cookiecache --domain "github.com" --cookie "_gh_sess" --filename "cookies.json"

# Get all github cookies in Netscape/Mozilla format to use with curl, et.c:
cookiecache --domain "github.com" --filename "cookies.txt" --curl

# All options:
cookiecache --help

Library

To use cookiecache as a library call load() with arguments similar to the cli:

import cookiecache

# Get github session cookies and save to disk
# After the first run this will load the cookies
# from disk first, and only get them from the brower
# if they have expired
cookies = cookiecache.load(
    domain="github.com",
    cookie="_gh_sess",
    filename="cookies.json",
)

# Load all cookies from JSON file from another machine, ie.
# Don't attempt to refresh or get cookies from this machine
cookies = cookiecache.load(
    filename="cookies.json",
    check_expiry=False
)

# Get cookies only from Chrome, and don't read or save to disk
cookies = cookiecache.load(
    domain="github.com",
    browser="chrome",
)

# Convert cookies from cookiecache to a flat key-value
# pair to use with Requests
cookies = cookiecache.load(domain="github.com")
cookies_flat = cookiecache.flatten_cookies(cookies)
reqeusts.get("http://github.com", cookies=cookies_flat)
This is a simple tool to create ZIP payloads using a provided wordlist for the symlink attack (present in some file upload vulnerabilities)

zip-symlink-payload-creator This is a simple tool to create ZIP payloads using a provided wordlist for the symlink attack (present in some file upload

stark0de 6 Aug 18, 2022
Security System using OpenCV

Security-System Security System using OpenCV Files in this Repository: email_send.py - This file contains python code to send an email when something

Mehul Patwari 1 Oct 28, 2021
Web Headers Security Scanner

Web Headers Security Scanner

Emre Koybasi 3 Dec 16, 2022
Website OSINT untuk mencari informasi dari email dan nomor telepon. Dibuat dengan React dan Flask.

Inspektur Cari informasi mengenai email dan nomor telepon dengan mudah. Inspektur adalah aplikasi OSINT yang berguna untuk mencari informasi berdasark

Bagas Wastu 36 Dec 04, 2022
Simple yara rule manager

Yara Manager A simple program to manage your yara ruleset in a (sqlite) database. Todos Search rules and descriptions Cluster rules in rulesets Enforc

Nils Kuhnert 65 Nov 17, 2022
A repository to detect the ARP spoofing in any devices and prevent Man in the Middle(MITM) attack using Python3

arp_spoof_detector A repository to detect the ARP spoofing in any devices and prevent Man in the Middle(MITM) attack using Python3 Usage: git clone ht

Surya Das N 1 Oct 30, 2021
POC for detecting the Log4Shell (Log4J RCE) vulnerability.

log4shell-poc-py POC for detecting the Log4Shell (Log4J RCE) vulnerability. Run on a system with python3 python3 log4shell-poc.py pathToTargetFile

BCC Risk Advisory 2 Dec 22, 2021
2022-bridge - Example code belonging to the Bridge pattern video

Let's Take The Bridge Pattern To The Next Level This video covers how the bridge

11 Jun 14, 2022
Password-Manager GUI

PASSWORD-MANAGER This repo contains all the project files. Project Description A Tkinter GUI that allows you to store website info like website name,

David .K. Danso 1 Dec 08, 2021
Mass Check Vulnerable Log4j CVE-2021-44228

Log4j-CVE-2021-44228 Mass Check Vulnerable Log4j CVE-2021-44228 Introduction Actually I just checked via Vulnerable Application from https://github.co

Justakazh 6 Dec 28, 2022
Simple script for looping a Denial Of Service (DoS) attack over one single mac address in range

Bluetooth Simple Denial Of Service (DoS) Legal Note This project is made only for educational purposes and for helping in Proofs of Concept. The autho

1 Jan 09, 2022
๐ŸŽ๐Ÿ–ฅใ€Š่ต›้ฉฌๅจ˜ใ€‹๏ผˆใ‚ฆใƒžๅจ˜: Pretty Derby๏ผ‰่พ…ๅŠฉ่„šๆœฌ

auto-derby ่‡ชๅŠจๅŒ–ๅ…ป้ฉฌ ่‚ฒๆˆ็ป“ๆžœ Nurturing result ๅŠŸ่ƒฝ ๆ”ฏๆŒๅฎขๆˆท็ซฏ DMM ๏ผˆๅ‰ๅฐ๏ผ‰ ๅฎž้ชŒๆ€ง ๅฎ‰ๅ“ ADB ่ฟžๆŽฅ๏ผˆๅŽๅฐ๏ผ‰ๅผ€ๅ‘ๅŸบไบŽ 1080x1920 ๅˆ†่พจ็އ ๅ›ข้˜Ÿ่ต› (Team race) ๆœ‰่ƒœๅˆฉ็กฎๅฎšๅฅ–ๅŠฑๆ—ถๅƒๅธ•่ฒ ๆ—ฅๅธธ่ต› (Daily race) PvP ๆดปๅŠจ่ต› (Cha

NateScarlet 376 Jan 01, 2023
HatSploit native powerful payload generation and shellcode injection tool that provides support for common platforms and architectures.

HatVenom HatSploit native powerful payload generation and shellcode injection tool that provides support for common platforms and architectures. Featu

EntySec 100 Dec 23, 2022
Proof of concept of CVE-2022-21907 Double Free in http.sys driver, triggering a kernel crash on IIS servers

CVE-2022-21907 - Double Free in http.sys driver Summary An unauthenticated attacker can send an HTTP request with an "Accept-Encoding" HTTP request he

Podalirius 71 Dec 22, 2022
CVE 2020-14871 Solaris exploit

CVE 2020-14871 Solaris exploit This is a basic ROP based exploit for CVE 2020-14871. CVE 2020-14871 is a vulnerability in Sun Solaris systems. The act

Robin Massink 2 Oct 25, 2022
Seamless deployment and management of cybersecurity solutions ๐Ÿ—๏ธ

Description ๐Ÿ–ผ๏ธ Background ๐Ÿ‘ด๐Ÿผ Vision ๐Ÿ“œ Concepts ๐Ÿ’ฌ Solutions' Lifecycle. Operations โญ• Functionalities ๐Ÿš€ Supported Cybersecurity Solutions ๐Ÿ“ฆ Insta

MutableSecurity 36 Nov 10, 2022
Burp Suite extension for encoding/decoding EVM calldata

unblocker Burp Suite extension for encoding/decoding EVM calldata 0x00_prerequisites Burp Suite Java 8+ Python 2.7 0x01_installation clone this reposi

Halborn 16 Aug 30, 2022
๐™พ๐š™๐šŽ๐š— ๐š‚๐š˜๐šž๐š›๐šŒ๐šŽ ๐š‚๐šŒ๐š›๐š’๐š™๐š - ๐™ฝ๐š˜ ๐™ฒ๐š˜๐š™๐šข๐š›๐š’๐š๐š‘๐š - ๐šƒ๐šŽ๐šŠ๐š– ๐š†๐š˜๐š›๐š” - ๐š‚๐š’๐š–๐š™๐š•๐šŽ ๐™ฟ๐šข๐š๐š‘๐š˜๐š— ๐™ฟ๐š›๐š˜๐š“๐šŽ๐šŒ๐š - ๐™ฒ๐š›๐šŽ๐šŠ๐š๐šŽ๐š ๐™ฑ๐šข : ๐™ฐ๐š•๐š• ๐šƒ๐šŽ๐šŠ๐š– - ๐™ฒ๐š˜๐š™๐šข๐™ฟ๐šŠ๐šœ๐š ๐™ฒ๐šŠ๐š— ๐™ฝ๐š˜๐š ๐™ผ๐šŠ๐š”๐šŽ ๐šˆ๐š˜๐šž ๐š๐šŽ๐šŠ๐š• ๐™ฟ๐š›๐š˜๐š๐š›๐šŠ๐š–๐š–๐šŽ๐š›

๐™พ๐š™๐šŽ๐š— ๐š‚๐š˜๐šž๐š›๐šŒ๐šŽ ๐š‚๐šŒ๐š›๐š’๐š™๐š - ๐™ฝ๐š˜ ๐™ฒ๐š˜๐š™๐šข๐š›๐š’๐š๐š‘๐š - ๐šƒ๐šŽ๐šŠ๐š– ๐š†๐š˜๐š›๐š” - ๐š‚๐š’๐š–๐š™๐š•๐šŽ ๐™ฟ๐šข๐š๐š‘๐š˜๐š— ๐™ฟ๐š›๐š˜๐š“๐šŽ๐šŒ๐š - ๐™ฒ๐š›๐šŽ๐šŠ๐š๐šŽ๐š ๐™ฑ๐šข : ๐™ฐ๐š•๐š• ๐šƒ๐šŽ๐šŠ๐š– - ๐™ฒ๐š˜๐š™๐šข๐™ฟ๐šŠ๐šœ๐š ๐™ฒ๐šŠ๐š— ๐™ฝ๐š˜๐š ๐™ผ๐šŠ๐š”๐šŽ ๐šˆ๐š˜๐šž ๐š๐šŽ๐šŠ๐š• ๐™ฟ๐š›๐š˜๐š๐š›๐šŠ๐š–๐š–๐šŽ๐š›

CodeX-ID 2 Oct 27, 2022
Crypto Meta Extractor

Crypto Meta Extractor This repository contains the code which extracts some metadata of all the cryptocurrencies listed (9K) on CoinMarketCap. Coding

Samyak Jain 3 Jul 03, 2022
CVE-2021-43798Expๅคš็บฟ็จ‹ๆ‰น้‡้ชŒ่ฏ่„šๆœฌ

Grafana V8.*ไปปๆ„ๆ–‡ไปถ่ฏปๅ–Exp--ๅคš็บฟ็จ‹ๆ‰น้‡้ชŒ่ฏ่„šๆœฌ ๆผๆดžๆ่ฟฐ Grafanaๆ˜ฏไธ€ไธชๅผ€ๆบ็š„ๅบฆ้‡ๅˆ†ๆžไธŽๅฏ่ง†ๅŒ–ๅฅ—ไปถใ€‚็ปๅธธ่ขซ็”จไฝœๅŸบ็ก€่ฎพๆ–ฝ็š„ๆ—ถ้—ดๅบๅˆ—ๆ•ฐๆฎๅ’Œๅบ”็”จ็จ‹ๅบๅˆ†ๆž็š„ๅฏ่ง†ๅŒ–๏ผŒๅฎƒๅœจๅ…ถไป–้ข†ๅŸŸไนŸ่ขซๅนฟๆณ›็š„ไฝฟ็”จๅŒ…ๆ‹ฌๅทฅไธšไผ ๆ„Ÿๅ™จใ€ๅฎถๅบญ่‡ชๅŠจๅŒ–ใ€ๅคฉๆฐ”ๅ’Œ่ฟ‡็จ‹ๆŽงๅˆถ็ญ‰ใ€‚ๅ…ถ 8.*็‰ˆๆœฌไปปๆ„ๆ–‡ไปถ่ฏปๅ–ๆผๆดž๏ผŒ่ฏฅๆผๆดž็›ฎๅ‰ไธบ0d

2 Dec 16, 2021