Coder Social home page Coder Social logo

rar27 / shellclear Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rusty-ferris-club/shellclear

0.0 0.0 0.0 1.91 MB

Secure shell history commands by finding sensitive data

License: Apache License 2.0

Shell 2.17% Rust 95.21% PowerShell 2.13% Dockerfile 0.50%

shellclear's Introduction

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

macOS
curl -sS https://raw.githubusercontent.com/rusty-ferris-club/shellclear/main/install/install.sh | bash

Or via brew

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

You need to make sure that apt install xz-utils is install. There is an open issue #52 to remove this dependencies.

curl -sS https://raw.githubusercontent.com/rusty-ferris-club/shellclear/main/install/install.sh | bash
Windows
iwr https://raw.githubusercontent.com/rusty-ferris-club/shellclear/main/install/install.ps1 -useb | iex

Or download the binary file from releases page.

Setup your shell

Bash Add the following to the end of ~/.bashrc:
eval $(shellclear --init-shell)
Zsh Add the following to the end of ~/.zshrc:
eval $(shellclear --init-shell)
PowerShell Add the following to the end of your PowerShell configuration (find it by running $PROFILE):
Invoke-Expression (&shellclear --init-shell)
Fish Add the following to the end of ~/.config/fish/config.fish:
shellclear --init-shell | source

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

๐Ÿ‘€ 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

๐Ÿงน Mask findings:

shellclear clear

๐Ÿ’ฅ Remove findings:

shellclear clear --remove

๐Ÿงณ 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

Examples

All the examples here

Thanks

To all Contributors - you make this happen, thanks!

Copyright

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

shellclear's People

Contributors

arnovsky avatar boaz-quotient avatar cba-mt avatar jondot avatar kaplanelad avatar kianmeng avatar megamansec avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.