43 lines
1.2 KiB
Markdown
43 lines
1.2 KiB
Markdown
# bb64
|
|
|
|
# Installation
|
|
|
|
If you don't already have getpkg installed:
|
|
```
|
|
curl https://getbin.xyz/getpkg-install | bash
|
|
```
|
|
|
|
Then install bb64 via getpkg for the current user:
|
|
```
|
|
getpkg install bb64
|
|
```
|
|
|
|
# Use
|
|
|
|
Bash Base64, written in C++.
|
|
|
|
Uses a custom Base64 character set for bash compatibility, not compatible with other utilities.
|
|
|
|
```
|
|
Usage:
|
|
bb64 BASE64COMMAND Decodes and runs the command
|
|
bb64 -[i|d] BASE64COMMAND Displays the decoded command
|
|
bb64 -e COMMAND Encodes the command and prints the result
|
|
bb64 -u Updates bb64 to the latest version (uses docker)
|
|
bb64 -v Prints the version number
|
|
bb64 version Prints the version number
|
|
```
|
|
|
|
# Implementation Notes
|
|
|
|
bb64 runs the command by replacing the current process, so it ensures that tty, environment
|
|
variables etc are all identical for the run command. It works with interactive commands, like
|
|
nano or ssh.
|
|
|
|
bb64 supports bash scripts, as the command is run as:
|
|
`bash -c 'COMMAND'`
|
|
Where COMMAND is passed to bash as a single argument.
|
|
|
|
If the command is run, the return value is the return value of the command.
|
|
If it isn't run, bb64 returns -1.
|