Geal / PilotSSH-scripts

A collection of scripts usable with the PilotSSH iOS app
http://pilotssh.com
MIT License
52 stars 14 forks source link

bad base-64 #23

Closed KalleDK closed 11 years ago

KalleDK commented 11 years ago

I "hope" this is a bug..

I have the following script

[km@nas01 ~/.pilotssh/uname]$ ./uname { "version": 1, "title": "Uname", "type":"text", "text":"UNAME" }

On the mobilephone i get this respond decoding error: bad base-64

(My guess is something UTF / ANSI get mixed up)

Though if I do it as a status, then everything works as intended.

Geal commented 11 years ago

The 'text' attribute expects base64 encoded data. I chose that way to solve a lot of encoding problem. See https://github.com/Geal/PilotSSH-scripts/blob/master/logs/logs_show.sh for an example of how to display the results.

KalleDK commented 11 years ago

Oh thanks you

I would suggest change

https://github.com/Geal/PilotSSH-scripts/blob/master/API.md#text

So it would explain that it expects base64

Geal commented 11 years ago

It's done. Thanks for the suggestion!