WangYihang / Platypus

:hammer: A modern multiple reverse shell sessions manager written in go
http://platypus-reverse-shell.vercel.app
GNU Lesser General Public License v3.0
1.52k stars 226 forks source link

Allow changing Platypus local shell encoding to match client side (or the opposite) #143

Open pkreuzt opened 2 years ago

pkreuzt commented 2 years ago

This is specially a thing with Windows clients, which have a different text encoding depending on language of OS. Most of the time you cannot see correct names of folders or files with characters belonging to a different encoding than your local shell.

There should be some way to change local terminal encoding dinamically (without restarting whole server) so those characters could be printed and then copied (provided you don't necessarily know how to type every character on your localized keyboard).

On Windows it is possible to see and change client side encoding with 'chcp' command. I have two solutions for this: either changing client side encoding to 65001 (UTF-8 compatible, doesn't work for every encoding as Windows is a bit . . . weird) or launching Platypus on Terminator terminal, which is capable of on-the-run encoding changes. Upon receiving reverse shells I execute chcp on client side to see its encoding and then I change Terminator local encoding to match it. Doing this for every shell is repetitive. Also, this could be automated somehow.