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

fwhunt check entire firmware first #881

Merged
merged 6 commits into from Nov 13, 2023
Merged

Conversation

HoxhaEndri
Copy link
Member

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    fwhunt first is run on the unextracted firmware, if it does not find anything, it continues checking each file in a for loop

  • What is the current behavior? (You can also link to an open issue here)

  • What is the new behavior (if this is a feature change)? If possible add a screenshot.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

  • Other information:

fi
done
fwhunter "${FIRMWARE_PATH_BAK}"
if [[ $(grep -c "FwHunt rule" "${LOG_PATH_MODULE}""/fwhunt_scan_"*) -eq 0 ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this grep gives you output like the following:

file1:0
file2:1
file3:7

You probably need to add them before checking them

grep -c ... | cut -d: -f2 | awk '{ SUM += $1} END { print SUM }' || true) -eq 0 ]] ...

modules/S02_UEFI_FwHunt.sh Outdated Show resolved Hide resolved
@HoxhaEndri HoxhaEndri merged commit 7fd8661 into e-m-b-a:master Nov 13, 2023
13 checks passed
fwhunter "${EXTRACTED_FILE}"
fi
done
fwhunter "${FIRMWARE_PATH_BAK}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one last suggestion: Could you please add a comment why we are doing this. Otherwise I think we can't remember about this trick in a year or so ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants