|
|
|
@ -6,6 +6,41 @@ GOFLAGS=-ldflags "-X main.Version=${VERSION} -X main.Revision=${REVISION}" |
|
|
|
autoinstall: |
|
|
|
autoinstall: |
|
|
|
./install_helper.sh
|
|
|
|
./install_helper.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sanitize: |
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# I'm going to create a sanitized version of your resh history.
|
|
|
|
|
|
|
|
# Everything is done locally - your history won't leave this machine.
|
|
|
|
|
|
|
|
# The way this works is that any sensitive information in your history is going to be replaced with its SHA1 hash.
|
|
|
|
|
|
|
|
# There is also going to be a second version with hashes trimed to 12 characters for readability
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# > full hashes: ~/resh_history_sanitized.json
|
|
|
|
|
|
|
|
# > 12 char hashes: ~/resh_history_sanitized_trim12.json
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# Encountered any issues? Got questions? -> Hit me up at https://github.com/curusarn/resh/issues
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# Running history sanitization ...
|
|
|
|
|
|
|
|
resh-sanitize-history -trim-hashes 0 --output ~/resh_history_sanitized.json
|
|
|
|
|
|
|
|
resh-sanitize-history -trim-hashes 12 --output ~/resh_history_sanitized_trim12.json
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# SUCCESS - ALL DONE!
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# PLEASE HAVE A LOOK AT THE RESULT USING THESE COMMANDS:
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# > pretty print JSON:
|
|
|
|
|
|
|
|
@echo 'cat ~/resh_history_sanitized_trim12.json | jq'
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# > only show executed commands, don't show metadata:
|
|
|
|
|
|
|
|
@echo "cat ~/resh_history_sanitized_trim12.json | jq '.[\"cmdLine\"]'"
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build: submodules resh-collect resh-daemon resh-sanitize-history |
|
|
|
build: submodules resh-collect resh-daemon resh-sanitize-history |
|
|
|
|
|
|
|
|
|
|
|
@ -41,24 +76,31 @@ install: build submodules/bash-preexec/bash-preexec.sh shellrc.sh config.toml uu |
|
|
|
# Final touch
|
|
|
|
# Final touch
|
|
|
|
touch ~/.resh_history.json
|
|
|
|
touch ~/.resh_history.json
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
##########################################################
|
|
|
|
##########################################################
|
|
|
|
# #
|
|
|
|
# #
|
|
|
|
# SUCCESS - thank you for trying out this project! #
|
|
|
|
# SUCCESS - thank you for trying out this project! #
|
|
|
|
# #
|
|
|
|
# #
|
|
|
|
##########################################################
|
|
|
|
##########################################################
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# WHAT'S NEXT
|
|
|
|
# WHAT'S NEXT
|
|
|
|
# Please RESTART ALL OPEN TERMINAL WINDOWS (or reload your rc files)
|
|
|
|
# Please RESTART ALL OPEN TERMINAL WINDOWS (or reload your rc files)
|
|
|
|
# Your resh history is located in `~/.resh_history.json`
|
|
|
|
# Your resh history is located in `~/.resh_history.json`
|
|
|
|
# You can look at it using e.g. `tail -f ~/.resh_history.json | jq`
|
|
|
|
# You can look at it using e.g. `tail -f ~/.resh_history.json | jq`
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# ISSUES
|
|
|
|
# ISSUES
|
|
|
|
# If anything looks broken create an issue: https://github.com/curusarn/resh/issues
|
|
|
|
# If anything looks broken create an issue: https://github.com/curusarn/resh/issues
|
|
|
|
# You can uninstall this at any time by running `rm -rf ~/.resh/`
|
|
|
|
# You can uninstall this at any time by running `rm -rf ~/.resh/`
|
|
|
|
# You won't lose any collected history by removing `~/.resh` directory
|
|
|
|
# You won't lose any collected history by removing `~/.resh` directory
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Please give me some contact info using this form: https://forms.gle/227SoyJ5c2iteKt98
|
|
|
|
# Please give me some contact info using this form: https://forms.gle/227SoyJ5c2iteKt98
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
uninstall: |
|
|
|
uninstall: |
|
|
|
# Uninstalling ...
|
|
|
|
# Uninstalling ...
|
|
|
|
@ -70,7 +112,7 @@ resh-daemon: daemon/resh-daemon.go common/resh-common.go version |
|
|
|
resh-collect: collect/resh-collect.go common/resh-common.go version |
|
|
|
resh-collect: collect/resh-collect.go common/resh-common.go version |
|
|
|
go build ${GOFLAGS} -o $@ $<
|
|
|
|
go build ${GOFLAGS} -o $@ $<
|
|
|
|
|
|
|
|
|
|
|
|
resh-sanitize-history: collect/resh-sanitize-history.go common/resh-common.go version |
|
|
|
resh-sanitize-history: sanitize-history/resh-sanitize-history.go common/resh-common.go version |
|
|
|
go build ${GOFLAGS} -o $@ $<
|
|
|
|
go build ${GOFLAGS} -o $@ $<
|
|
|
|
|
|
|
|
|
|
|
|
$(HOME)/.resh $(HOME)/.resh/bin $(HOME)/.config: |
|
|
|
$(HOME)/.resh $(HOME)/.resh/bin $(HOME)/.config: |
|
|
|
|