|
2 | 2 |
|
3 | 3 | # HackShell - Post-Login shell configuration for hackers
|
4 | 4 | #
|
5 |
| -# Configure the current shell to not create any files on the |
6 |
| -# file system and set up some useful commands. Optionally download |
7 |
| -# useful static binaries. |
| 5 | +# Configures the current BASH shell to disable history files and swap files |
| 6 | +# for bash, wget, less, vim, mysql, curl, ... |
8 | 7 | #
|
9 |
| -# Usage (memory only): |
| 8 | +# Also adds many useful commands, aliases and bash functions. |
| 9 | +# |
| 10 | +# Does not write anything to the file-system and remains as silent as possible. |
| 11 | +# |
| 12 | +# Usage: |
10 | 13 | # source <(curl -SsfL https://thc.org/hs)
|
11 |
| -# Usage with downloading binaries: |
12 |
| -# BIN=1 source <(curl -SsfL https://thc.org/hs) |
13 | 14 | #
|
14 |
| -# Environment variables: |
15 |
| -# XHOME= Set custom XHOME directory instead of /dev/shm/.$'\t''~?$:?' |
| 15 | +# Environment variables (optional): |
| 16 | +# XHOME= Set custom XHOME directory [default: /dev/shm/.$'\t''~?$:?'] |
16 | 17 | #
|
17 | 18 | # https://github.com/hackerschoice/thc-tips-tricks-hacks-cheat-sheet/blob/master/tools/hackshell.sh
|
18 | 19 | # 2024 by theM0ntarCann0n & skpr
|
@@ -865,18 +866,14 @@ hs_init_shell
|
865 | 866 | xhelp
|
866 | 867 |
|
867 | 868 | ### Finishing
|
868 |
| -str="" |
869 |
| -[ -z "$BIN" ] && { |
870 |
| - echo -e ">>> Type ${CDC}xhome${CN} to set HOME=${CDY}${XHOME}${CN}" |
871 |
| - str="No data was written to the filesystem" |
872 |
| -} |
| 869 | +echo -e ">>> Type ${CDC}xhome${CN} to set HOME=${CDY}${XHOME}${CN}" |
873 | 870 | echo -e ">>> Tweaking environment variables to log less ${CN}[${CDG}DONE${CN}]"
|
874 | 871 | echo -e ">>> Creating aliases to make commands log less ${CN}[${CDG}DONE${CN}]"
|
875 |
| -echo -e ">>> ${CG}Setup complete. ${CF}${str}${CN}" |
| 872 | +echo -e ">>> ${CG}Setup complete. ${CF}No data was written to the filesystem${CN}" |
876 | 873 |
|
877 | 874 | ### Check for obvious loots
|
878 | 875 | lootlight
|
879 | 876 |
|
880 | 877 | # unset all functions that are no longer needed.
|
881 | 878 | unset -f hs_init hs_init_alias hs_init_dl hs_init_shell
|
882 |
| -unset BIN str SSH_CONNECTION SSH_CLIENT |
| 879 | +unset SSH_CONNECTION SSH_CLIENT |
0 commit comments