Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noam-alum/one-time-secret-for-cli
One Time Secret for command line use.
https://github.com/noam-alum/one-time-secret-for-cli
Last synced: 8 days ago
JSON representation
One Time Secret for command line use.
- Host: GitHub
- URL: https://github.com/noam-alum/one-time-secret-for-cli
- Owner: Noam-Alum
- Created: 2023-09-10T08:38:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-14T17:42:49.000Z (9 months ago)
- Last Synced: 2024-02-14T18:49:15.434Z (9 months ago)
- Language: Shell
- Size: 31.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# One Time Secret for CLI
## Installation
To install One Time Secret for CLI on your system as an alias, follow these steps:
1. Download the script:
```bash
wget -q https://alum.sh/codes/OTS
```2. Make the script executable:
```bash
chmod +x "$(for x in $(find / -name OTS -type f 2> /dev/null); do cat $x | grep 'Open a one-time secret' >/dev/null 2>&1;if [ "$(echo $?)" == "0" ]; then echo "$x" ;fi; done)" &> /dev/null
```3. Add an alias to your `~/.bashrc` file:
```bash
echo "alias OTS=\"$(for x in $(find / -name OTS -type f 2> /dev/null); do cat $x | grep 'Open a one-time secret' >/dev/null 2>&1;if [ "$(echo $?)" == "0" ]; then echo "$x" ;fi; done)\"" >> ~/.bashrc
```4. Refresh your shell to apply the changes:
```bash
source ~/.bashrc
```
## Quick Installation
```bash
wget -q https://alum.sh/OTS;chmod +x "$(for x in $(find / -name OTS -type f 2> /dev/null); do cat $x | grep 'Open a one time secret' >/dev/null 2>&1;if [ "$(echo $?)" == "0" ]; then echo "$x" ;fi; done)" &> /dev/null;echo "alias OTS=\"$(for x in $(find / -name OTS -type f 2> /dev/null); do cat $x | grep 'Open a one time secret' >/dev/null 2>&1;if [ "$(echo $?)" == "0" ]; then echo "$x" ;fi; done)\"" >> ~/.bashrc;source ~/.bashrc;clear;echo "Installed OTS successfully"
```
## Usage
Usage: OTS [OPTION]... [VALUE]...
Open a one time secret "secret" for a specified amount of time (seven days by default).-h displays this help.
-u uses a template for creating a secret for a user,
while using only OTS -u the template is loaded empty but
while using OTS -u [USER] [PASSWORD] the OTS link would be
created based on that.