Skip to content

Commit 2d23935

Browse files
committed
SC2235
1 parent 5d0a1ce commit 2d23935

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CONTRIBUTING.md

+4
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,12 @@ It also sketches the typical integration process of patches.
6666

6767
- Don't use backticks anymore, use $(..) instead
6868

69+
- Don't use `grep -R` for recursive grep search. Instead use `find -type f -exec grep something {} \;` or use `grep -r`
70+
6971
- Use double square \[[]] brackets (conditional expressions) instead of single square [] brackets
7072

73+
- We require variable braces. Instead of using `$VARIABLE` please use `${VARIABLE}`
74+
7175
- Whenever possible try to avoid `tr` `sed` `awk` and use bash internal functions instead, see e.g. [bash shell parameter substitution](http://www.cyberciti.biz/tips/bash-shell-parameter-substitution-2.html). Using bash internals is faster as it does not fork, fopen and pipes the results back.
7276

7377
- At least ["weak quoting"](https://wiki.bash-hackers.org/syntax/quoting#weak_quoting) is required - unquoted variable processing is not permitted

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ sudo ./emba -l ~/log -f ~/firmware -p ./scan-profiles/default-scan-gpt.emba
7474

7575
```
7676
## Quick start in firmware diffing mode
77-
For further details on EMBA's AI analysis engine check the [wiki](https://github.com/e-m-b-a/emba/wiki/Firmware-diffing).
77+
For further details on EMBA's firmware diffing mechanism check the [wiki](https://github.com/e-m-b-a/emba/wiki/Firmware-diffing).
7878
```console
7979
sudo ./emba -l ~/log -f ~/1st-firmware -o ~/2nd-newer-firmware -t
8080

modules/S02_UEFI_FwHunt.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ S02_UEFI_FwHunt() {
2929
local MAX_MOD_THREADS=$((MAX_MOD_THREADS/2))
3030
local EXTRACTED_FILE=""
3131

32-
if [[ "${UEFI_VERIFIED}" -eq 1 ]] || ( [[ "${RTOS}" -eq 1 ]] && [[ "${UEFI_DETECTED}" -eq 1 ]] ); then
32+
if [[ "${UEFI_VERIFIED}" -eq 1 ]] || { [[ "${RTOS}" -eq 1 ]] && [[ "${UEFI_DETECTED}" -eq 1 ]]; }; then
3333
print_output "[*] Starting FwHunter UEFI firmware vulnerability detection"
3434
for EXTRACTED_FILE in "${FILE_ARR_LIMITED[@]}"; do
3535
if [[ ${THREADED} -eq 1 ]]; then

0 commit comments

Comments
 (0)