nathanlopez / Stitch

Python Remote Administration Tool (RAT)
https://nathanlopez.github.io/Stitch/
Other
3.06k stars 657 forks source link

error in line 58 in b64encode #50

Open torturado opened 2 years ago

torturado commented 2 years ago

Traceback (most recent call last): File "C:\Users\myuser:D\Downloads\Stitch-master\Stitch-master\Application\main.py", line 5, in from stitch_cmd import File "C:\Users\myuser:D\Downloads\Stitch-master\Stitch-master\Application\stitch_cmd.py", line 5, in import stitch_winshell File "C:\Users\myuser:D\Downloads\Stitch-master\Stitch-master\Application\stitch_winshell.py", line 5, in import stitch_lib File "C:\Users\myuser:D\Downloads\Stitch-master\Stitch-master\Application\stitch_lib.py", line 5, in from stitch_help import File "C:\Users\myuser:D\Downloads\Stitch-master\Stitch-master\Application\stitch_help.py", line 5, in from stitch_utils import st_print File "C:\Users\myuser:D\Downloads\Stitch-master\Stitch-master\Application\stitch_utils.py", line 25, in from Stitch_Vars.globals import * File "C:\Users\myuser:D\Downloads\Stitch-master\Stitch-master\Application\Stitch_Vars\globals.py", line 77, in key = base64.b64encode(key) File "C:\Users\myuser:D\AppData\Local\Programs\Python\Python39\lib\base64.py", line 58, in b64encode encoded = binascii.b2a_base64(s, newline=False) TypeError: a bytes-like object is required, not 'str'

rajp013 commented 1 year ago

in the globals.py file in if part add .encode('utf-8')

like this:-

if not os.path.exists(st_aes): key = ''.join(random.SystemRandom().choice(string.ascii_lowercase + string.asciiuppercase + string.digits) for in range(32)).encode('utf-8') key = base64.b64encode(key)