auth

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractDCookie

func ExtractDCookie(dbPath, encryptionKey string) (string, error)

ExtractDCookie extracts and decrypts the 'd' cookie from Slack's cookie database

func FindCookieDBPath

func FindCookieDBPath() (string, error)

FindCookieDBPath returns the first existing cookie database path

func FindLevelDBPath

func FindLevelDBPath() (string, error)

FindLevelDBPath returns the first existing LevelDB path

func GetSlackEncryptionKey

func GetSlackEncryptionKey() (string, error)

GetSlackEncryptionKey retrieves the Slack Safe Storage key from macOS Keychain

Types

type Credentials

type Credentials struct {
	Workspaces []WorkspaceToken `json:"workspaces"`
	Cookie     string           `json:"cookie"` // The 'd' cookie, same for all workspaces
}

Credentials holds all extracted Slack credentials

func ExtractCredentials

func ExtractCredentials() (*Credentials, error)

ExtractCredentials extracts all Slack credentials from the local app

type WorkspaceToken

type WorkspaceToken struct {
	URL   string `json:"url"`
	Name  string `json:"name"`
	Token string `json:"token"`
	ID    string `json:"id"`
}

WorkspaceToken represents a Slack workspace and its token

func ExtractTokensFromLevelDB

func ExtractTokensFromLevelDB(dbPath string) ([]WorkspaceToken, error)

ExtractTokensFromLevelDB extracts workspace tokens from Slack's LevelDB

Jump to

Keyboard shortcuts

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