• Stars
    star
    841
  • Rank 54,194 (Top 2 %)
  • Language
    Go
  • License
    GNU General Publi...
  • Created about 3 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Save or export your private and public Slack messages, threads, files, and users locally without admin privileges.

Slack Dumper

  • Join the discussion in Telegram or Slack.
  • go ref
  • Buy me a cup of tea:
    • TON: EQAA5gzAI499UQgvLJUXWuDZRFNkVZzizq2kpKOMqa1RDCtS
    • USDT (TRC20): TN2cTi5A51SNUfwMKnJKYpKUVoeN3y6zcn
    • BTC: 1K6eceS3h7SaTrJTGfmvTa9vY4jyfiTMFc
    • Or use Github Sponsors button on the top of the page.
  • Read the overview on Medium.com (outdated)
  • Mattermost migration steps

screenshot

Description

Purpose: dump Slack messages, users, files and emojis using browser token and cookie.

Typical use scenarios:

  • archive your private conversations from Slack when the administrator does not allow you to install applications OR you don't want to use potentially privacy-violating third-party tools,
  • archive channels from Slack when you're on a free "no archive" subscription, so you don't lose valuable knowledge in those channels,
  • create a Slack Export archive without admin access, or
  • save your favourite emojis.

There a three modes of operation (more on this in User Guide) :

  1. List users/channels
  2. Dumping messages and threads
  3. Creating a Slack Export in Mattermost or Standard modes.
  4. Emoji download mode.

Slackdump accepts two types of input (see Dumping Conversations section):

  1. the URL/link of the channel or thread, OR
  2. the ID of the channel.

Quick Start

  1. Download the latest release for your operating system from the releases page. (If you're using macOS, download Darwin executable).
  2. Unpack the archive to any directory.
  3. Run the ./slackdump or slackdump.exe executable (see note below).
  4. You know the drill: use arrow keys to select the menu item, and Enter (or Return) to confirm.

By default, Slackdump uses the EZ-Login 3000 automatic login, and interactive mode.

Note

On Windows and macOS you may be presented with "Unknown developer" window, this is fine. Reason for this is that the executable hasn't been signed by the developer certificate.

To work around this:

  • on Windows: click "more information", and press "Run Anyway" button.
  • on macOS: open the folder in Finder, hold Option and double click the executable, choose Run.

Slackord2: Migrating to Discord

If you're migrating to Discord, the recommended way is to use Slackord2 - a great tool with a nice GUI, that is compatible with the export files generated by Slackdump.

User Guide

For more advanced features and instructions, please see the User Guide.

Previewing Results

Once the data is dumped, you can use one of the following tools to preview the results:

  • SlackLogViewer - a fast and powerful Slack Export viewer written in C++.
  • Slackdump2Html - a great Python application that converts Slack Dump to a static browsable HTML, works on Dump mode files.
  • slack export viewer - Slack Export Viewer is a well known viewer for slack export files.

Using as a library

Download:

go get github.com/rusq/slackdump/v2

Example

package main

import (
  "context"
  "log"

  "github.com/rusq/slackdump/v2"
  "github.com/rusq/slackdump/v2/auth"
)

func main() {
  provider, err := auth.NewValueAuth("xoxc-...", "xoxd-...")
  if err != nil {
      log.Print(err)
      return
  }
  sd, err := slackdump.New(context.Background(), provider)
  if err != nil {
      log.Print(err)
      return
  }
  _ = sd
}

See go ref

Using Custom Logger

Slackdump uses a simple rusq/dlog as a default logger (it is a wrapper around the standard logger that adds Debug* functions).

If you want to use the same default logger that Slackdump uses in your application, it is available as logger.Default.

No doubts that everyone has their own favourite logger that is better than other miserable loggers. Please read below for instructions on plugging your favourite logger.

Logrus

Good news is logrus can be plugged in straight away, as it implements the logger.Interface out of the box.

lg := logrus.New()
sd, err := slackdump.New(context.Background(), provider, WithLogger(lg))
  if err != nil {
      log.Print(err)
      return
  }
}

Glog and others

If you need to use some other logger, such as glog, it is a matter of wrapping the calls to satisfy the logger.Interface (defined in the logger package), and then setting the Logger variable in slackdump.Options (see options.go), or using WithLogger option.

FAQ

Q:Do I need to create a Slack application?
A:No, you don't. Just run the application and EZ-Login 3000 will take care of the authentication or, alternatively, grab that token and cookie from the browser Slack session. See User Guide.
Q:I'm getting "invalid_auth" error
A:Go get the new Cookie from the browser and Token as well.
Q:Slackdump takes a very long time to cache users
A:Disable the user cache with -no-user-cache flag.
Q:How to read the export file?
A:For Slack Workspace Export, use SlackLogViewer which is extremely fast with an advanced search function, or slack export viewer which is a Python application and runs in a browser. For the generic dump files, see examples directory for some python and shell examples.
Q:My Slack Workspace is on the Free plan. Can I get data older than 90-days?
A:No, unfortunately you can't. Slack doesn't allow to export data older than 90 days for free workspaces, the API does not return any data before 90 days for workspaces on the Free plan.

Thank you

Big thanks to all contributors, who submitted a pull request, reported a bug, suggested a feature, helped to reproduce, or spent time chatting with me on the Telegram or Slack to help to understand the issue and tested the proposed solution.

Also, I'd like to thank all those who made a donation to support the project:

  • Vivek R.
  • Fabian I.
  • Ori P.
  • Shir B. L.
  • Emin G.
  • Robert Z.
  • Sudhanshu J.

Bulletin Board

Messages that were conveyed with the donations:

  • 25/01/2022: Stay away from TheSignChef.com, ya hear, they don't pay what they owe to their employees.

More Repositories

1

osx-callhistory-decryptor

macOS (incl big sur) call history decryptor/converter to CSV format.
Go
27
star
2

chromedl

Go library for scraping or downloading files bypassing Cloudflare protection and browser checks
Go
25
star
3

wipemychat

Deletes your messages for everyone in Public and Private Telegram chats (group chats).
Go
25
star
4

xls2sheets

Import or partially refresh your Google Sheets from Excel files
Go
14
star
5

browserpass

Browser passwords stealer
Go
14
star
6

tbcomctl

Telegram Bot Common Controls (using github.com/tucnak/telebot)
Go
13
star
7

gohaskell

Example of calling Haskell Function from Go program (using C interface)
Go
10
star
8

aklapi

Auckland Rubbish, Recycling and Foodscraps API
HTML
9
star
9

disable-hdd-apm

Automatically exported from code.google.com/p/disable-hdd-apm
Assembly
7
star
10

ncscr

Norton Commander Starry Night Screensaver remake
Go
3
star
11

gonss3

Subset of Mozilla NSS enough to decrypt firefox passwords
Go
2
star
12

mtpwrap

MTProto library wrapper
Go
2
star
13

dlog

Standard Logger Debug Extension for Go Language.
Go
2
star
14

siebnsfix

Command line utility to fix Siebel siebns.dat file
Go
2
star
15

jpegrip

JPEG the Ripper: extract JPEG files from unstructured data stream
C
2
star
16

siebns

Go package to modify Oracle Siebel CRM Gateway Naming file
Go
1
star
17

osenv

Extended version of os.Getenv with defaults
Go
1
star
18

telegraph

Crippled Package for Interacting with Telegra.ph written in Go.
Go
1
star
19

sheets2inv

Generate PDF invoices from google sheets
Go
1
star
20

getgot

Monitor and automatically kill reemerging processes
Go
1
star
21

dagproc

DAG async processor
Go
1
star
22

slackinvite

Slack Invite Automation using user token/cookie
Go
1
star
23

json2yaml

Go
1
star