Giter Site home page Giter Site logo

rookie's Introduction

rookie

PyPi Downloads PyPi Version NPM Version Crates License

Load cookies from any browser on any platform

Features ๐Ÿš€

  • Available for Rust, Python, and JavaScript
  • Ensures type safety (e.g., TypeScript, Python with type hints)
  • Super Fast, Built with Rust
  • Bypass Chrome restriction like file locking
  • Read session cookies from Chrome based browsers! (requires admin rights on Windows)
  • Wide browsers support
  • Cross-platform support for Windows, Linux, and macOS

Usage โš™๏ธ

Rust

cargo add rookie

Create main.rs with the following

use rookie::brave;

fn main() {
    let domains = vec!["google.com"];
    let cookies = brave(Some(domains)).unwrap();
    for cookie in cookies {
        println!("{:?}", cookie);
    }
}

Python

pip install rookiepy

And the usage it similar to Rust

import rookiepy
cookies = rookiepy.firefox(["google.com"])
for cookie in cookies:
    print(cookie['domain'], cookie['value'])

JavaScript

npm install @rookie-rs/api
import { brave } from "@rookie-rs/api";
const cookies = brave();
for (const cookie of cookies) {
  console.log(cookie);
}

Examples ๐Ÿ“‹

Rust examples/rust

Python examples/python

JavaScript examples/javascript

Docs ๐Ÿ“˜

Rust

Python

JavaScript

CLI ๐Ÿ’ป

You can use rookie as a CLI tool which will decrypt the cookies and print it as JSON
See cli folder

Contribute ๐Ÿค

So far the following platforms are supported:

  • Brave: Linux, macOS, Windows
  • Cachy: Linux
  • Chrome: Linux, macOS, Windows
  • Chromium: Linux, macOS, Windows
  • Edge: Linux, macOS, Windows
  • Firefox: Linux, macOS, Windows
  • Internet Explorer: Windows
  • LibreWolf: Linux, macOS, Windows
  • Opera: Linux, macOS, Windows
  • Opera GX: macOS, Windows
  • Safari: macOS
  • Vivaldi: Linux, macOS, Windows

You are welcome to contribute support for other browsers, or other platforms.

Support new browsers ๐ŸŒ

If you have a browser with which the library isn't working with, it may not have been added to the list of supported browsers configs. You can create a pull request (PR) or an issue with the path to the cookies file on your computer, and I will add it.

look at src/windows/config.rs to see what configurations is needed.

Testing Dates (DD/MM/YY) ๐Ÿ“…

Browser Linux macOS Windows
Brave 01/10/23 25/11/23 01/10/23
Cachy 04/06/24 N/A N/A
Chromium 01/10/23 25/11/23 01/10/23
Chrome 01/10/23 25/11/23 16/03/24
Edge 01/10/23 - 01/10/23
Firefox 01/10/23 25/11/23 16/03/24
IE N/A N/A 01/10/23
LibreWolf 01/10/23 25/11/23 01/10/23
Opera 01/10/23 - 01/10/23
Opera GX N/A - 01/10/23
Safari N/A 02/10/23 N/A
Vivaldi 01/10/23 25/11/23 01/10/23

Credits ๐Ÿ™Œ

github.com/borisbabic/browser_cookie3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.