Readme
This commit is contained in:
parent
bb355cf4ac
commit
ffb594880c
18
README.md
18
README.md
@ -1,27 +1,33 @@
|
|||||||
# bb64
|
# bb64
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
|
||||||
|
# Use
|
||||||
|
|
||||||
Bash Base64, written in C++.
|
Bash Base64, written in C++.
|
||||||
|
|
||||||
|
Uses a custom Base64 character set for bash compatibility, not compatible with other utilities.
|
||||||
|
|
||||||
|
```
|
||||||
Useage:
|
Useage:
|
||||||
bb64 BASE64COMMAND Decodes the base64 encoded command, and runs it
|
bb64 BASE64COMMAND Decodes the base64 encoded command, and runs it
|
||||||
bb64 -i BASE64COMMAND Decodes the base64 encoded command, and prints to the screen
|
bb64 -i BASE64COMMAND Decodes the base64 encoded command, and prints to the screen
|
||||||
If it contains a bb64 command within the decoded command, it
|
If it contains a bb64 command within the decoded command, it
|
||||||
also decodes that and prints it to the screen.
|
also decodes that and prints it to the screen.
|
||||||
bb64 -e COMMAND(S) encodes the commands in base64, equivalent to echo "COMMAND" | base64.
|
bb64 -e COMMAND(S) encodes the commands in base64.
|
||||||
|
```
|
||||||
|
|
||||||
|
# Implementation Notes
|
||||||
|
|
||||||
bb64 runs the command by replacing the current process, so it ensures that tty, environment
|
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
|
variables etc are all identical for the run command. It works with interactive commands, like
|
||||||
nano or ssh.
|
nano or ssh.
|
||||||
|
|
||||||
The command is run as:
|
The command is run as:
|
||||||
bash -c COMMAND
|
`bash -c COMMAND`
|
||||||
Where COMMAND is passed to bash as a single argument.
|
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 the command is run, the return value is the return value of the command.
|
||||||
If it isn't run, bb64 returns -1.
|
If it isn't run, bb64 returns -1.
|
||||||
|
|
||||||
./build.sh will build bb64 for x86_64 (amd64) and arm64 architectures.
|
`./build.sh` will build bb64 for x86_64 (amd64) and arm64 architectures.
|
||||||
|
|
||||||
Uses it's own implementation of base64 decoding.
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user