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

L10, S05 fixes #903

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions modules/L10_system_emulation/network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@

BUSYBOX=/firmadyne/busybox
ACTION=$("${BUSYBOX}" cat /firmadyne/network_type)
IP_LOOP="127.0.0.1"

"${BUSYBOX}" echo "[*] Network configuration - ACTION: ${ACTION}"

if ("${FIRMAE_NET}"); then
"${BUSYBOX}" echo "[*] Starting network configuration"
"${BUSYBOX}" sleep 10

"${BUSYBOX}" echo "[*] Starting network configuration lo - ${IP_LOOP}"
"${BUSYBOX}" ifconfig lo "${IP_LOOP}"
"${BUSYBOX}" route add "${IP_LOOP}"

if [ "${ACTION}" = "default" ]; then
IP_DEFAULT=$("${BUSYBOX}" cat /firmadyne/ip_default)
"${BUSYBOX}" echo "[*] starting network configuration br0 - ${IP_DEFAULT}"
Expand Down
15 changes: 3 additions & 12 deletions modules/S05_firmware_details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,7 @@ S05_firmware_details()
local DETECTED_DIR

# we use the file FILE_ARR from helpers module
if [[ ${RTOS} -eq 0 ]]; then
# Linux:
DETECTED_DIR=$(find "${FIRMWARE_PATH}" "${EXCL_FIND[@]}" -xdev -type d 2>/dev/null | wc -l)
else
# RTOS:
DETECTED_DIR=$(find "${OUTPUT_DIR}" -xdev -type d 2>/dev/null | wc -l)
fi
DETECTED_DIR=$(find "${LOG_DIR}/firmware" -xdev -type d 2>/dev/null | wc -l)

print_output "[*] ${ORANGE}${#FILE_ARR[@]}${NC} files and ${ORANGE}${DETECTED_DIR}${NC} directories detected."

Expand All @@ -48,11 +42,8 @@ S05_firmware_details()
filesystem_tree() {
sub_module_title "Filesystem information"
write_anchor "file_dirs"
if [[ ${RTOS} -eq 0 ]]; then
local LPATH="${FIRMWARE_PATH}"
else
local LPATH="${OUTPUT_DIR}"
fi
local LPATH="${LOG_DIR}/firmware"

# excluded paths will be also printed
if command -v tree > /dev/null 2>&1 ; then
if [[ ${FORMAT_LOG} -eq 1 ]] ; then
Expand Down