Skip to content

CyberFlameGO/shellclear

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build







🚩 Show sensitive command summary when open a new terminal
👀 Clear sensitive commands from shell history
🙈 Stash your history command before presentations OR screen sharing


Shellclear

The idea behind shellclear is to provide a simple and fast way to secure you shell commands history

Installation

brew tap rusty-ferris-club/tap && brew install shellclear

Or download the binary file from releases page.

Terminal Summary

Add in shell profile (~/.zshrc / .bash_profile / .bashrc)

eval $(shellclear --init-shell)

motd

Using

$ shellclear --help

Secure shell commands

USAGE:
    shellclear [OPTIONS] [SUBCOMMAND]

OPTIONS:
        --config-dir <CFG_DIR_PATH>    Set configuration directory path
    -h, --help                         Print help information
        --init-shell                   Show sensitive findings summary for MOTD
        --log <LEVEL>                  Set logging level [default: INFO] [possible values: OFF,
                                       TRACE, DEBUG, INFO, WARN, ERROR]
        --no-banner                    Don't show the banner
    -V, --version                      Print version information


SUBCOMMANDS:
    config     Create custom configuration
    find       Find sensitive commands
    help       Print this message or the help of the given subcommand(s)
    restore    Restore backup history file
    stash      Stash history file

Supported Shells

  • bash
  • zshrc
  • fish

👀 Find Sensitive Commands

Sensitive data can be stored in your history file when export a token of something or running a script with token.

$ shellclear find --format table

find

🧹 Clear findings :

$ shellclear clear

🧳 Backup shell history before clear

$ shellclear clear --backup

🙈 Stash/Pop/Restore

You can stash your history shell by running the command:

$ shellclear stash

Now your history shell is clear, to bring back your history run the command:

$ shellclear stash pop

You can also restore your history backup file by running the command:

$ shellclear stash restore

✏️ External Configuration

Create custom configuration by running the command

$ shellclear config

Config command will create:

  1. Custom pattern template for adding a custom risky patterns
  2. Ignore file to allows you ignore specific pattern

Validate Config Files

Validate syntax file

$ shellclear config validate

Delete Config Folder

Validate syntax file

$ shellclear config delete

Ignores Pattern

Manage pattern ignores

$ shellclear config ignores

Thanks

To all Contributors - you make this happen, thanks!

Copyright

Copyright (c) 2022 @kaplanelad. See LICENSE for further details.

About

Secure shell history commands

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages

  • Rust 100.0%