Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P60 - lost functions #705

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions modules/P60_deep_extractor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,34 @@ deeper_extractor_helper() {
[[ "$THREADED" -eq 1 ]] && wait_for_pid "${WAIT_PIDS_P20[@]}"
}

linux_basic_identification_helper() {
local FIRMWARE_PATH_CHECK="${1:-}"
if ! [[ -d "$FIRMWARE_PATH_CHECK" ]]; then
LINUX_PATH_COUNTER=0
return
fi
LINUX_PATH_COUNTER="$(find "$FIRMWARE_PATH_CHECK" "${EXCL_FIND[@]}" -xdev -type d -iname bin -o -type f -iname busybox -o -type f -name shadow -o -type f -name passwd -o -type d -iname sbin -o -type d -iname etc 2> /dev/null | wc -l)"
backup_var "LINUX_PATH_COUNTER" "$LINUX_PATH_COUNTER"
}

wait_for_extractor() {
export OUTPUT_DIR="$FIRMWARE_PATH_CP"
local SEARCHER=""
SEARCHER=$(basename "$FIRMWARE_PATH")

# this is not solid and we probably have to adjust it in the future
# but for now it works
SEARCHER="$(safe_echo "$SEARCHER" | tr "(" "." | tr ")" ".")"

for PID in "${WAIT_PIDS[@]}"; do
local running=1
while [[ $running -eq 1 ]]; do
print_dot
if ! pgrep -v grep | grep -q "$PID"; then
running=0
fi
disk_space_protection "$SEARCHER"
sleep 1
done
done
}