Skip to content

Commit

Permalink
Cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
merces committed Nov 27, 2024
1 parent 210a82a commit ab8712b
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/crypto/bh_strxor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ bh_strxor() {
echo -n "$(bh_dec2asc $xored)"
done
echo
}
}
2 changes: 1 addition & 1 deletion src/filesystem/bh_bkp.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bh_bkp() {
(( $# < 1 )) && return 1
cp -vi "$1"{,.$(date +%Y%m%d)}
}
}
2 changes: 1 addition & 1 deletion src/filesystem/bh_md5rename.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ bh_md5rename() {
md5_hash=$(bh_cmd_md5 "$i" | cut -d" " -f1)
[[ $md5_hash ]] && mv -v "$i" $(dirname "$i")/$md5_hash
done
}
}
3 changes: 1 addition & 2 deletions src/filesystem/bh_secretfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ bh_secretfile(){
local pw=$(tr -dc "a-zA-Z0-9_#@.-" < /dev/urandom | head -c 20)
local filename=$RANDOM.zip
zip -P "$pw" "$filename" "$1"
bh_sharefile "$filename"
echo "$pw"
echo "password: $pw"
rm -f "$filename"
}
3 changes: 2 additions & 1 deletion src/filesystem/bh_zipmal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ bh_zipmal() {
local name=${1%\.*}.zip
zip --encrypt -P infected "$name" $@
ls -lh "$name"
}
echo "password: infected"
}
4 changes: 2 additions & 2 deletions src/internal/bashacks.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
bashacks() {
echo -e "Type bh_ and press TAB."
}
echo -e "This is not how you use it. Type bh_ and press <tab> instead."
}
4 changes: 2 additions & 2 deletions src/misc/bh_epoch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ bh_epoch() {
(( $# == 0 )) && ( date +%s; return; )

if [[ $1 =~ ^[0-9]+$ ]]; then
[[ $BASHACKS_OS == Darwin ]] && date -ur $1 || date -d @$1
[[ $bashacks_os == Darwin ]] && date -ur $1 || date -d @$1
fi
}
}
2 changes: 1 addition & 1 deletion src/net/bh_bin2ip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ bh_bin2ip() {

IFS=. read a b c d <<< "$1"
echo $((2#$a)).$((2#$b)).$((2#$c)).$((2#$d))
}
}
2 changes: 1 addition & 1 deletion src/net/bh_hostcalc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ bh_hostcalc() {
(( $# < 1 )) && return 1

echo $((2**(32-$1) - 2))
}
}
2 changes: 1 addition & 1 deletion src/net/bh_ip2bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ bh_ip2bin() {
printf "%.8d." $(bh_dec2bin $i)
done | sed "s/.$//"
echo
}
}
2 changes: 1 addition & 1 deletion src/programming/bh_skel_yara.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ bh_skel_yara() {
condition:
all of them
}"
}
}
2 changes: 1 addition & 1 deletion src/reversing/bh_asmgrep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ bh_asmgrep() {
(( $# < 2 )) && return 1

bh_cmd_disasm "$2" | grep --color -EC4 "$1"
}
}

0 comments on commit ab8712b

Please sign in to comment.