Skip to content

Commit 8a2c39a

Browse files
author
j-marz
committedJan 2, 2018
fixed hang on ip, url and email searches
syscall trace on grep commands revealed hangs when searching extracted images that contain /dev/console. Added exlusion directly to the grep commands, but a exclusions list should probably be created in the data dir to keep the script clean
1 parent 90f2208 commit 8a2c39a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎firmwalker.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -159,17 +159,17 @@ done
159159
msg ""
160160
msg "***Search for ip addresses***"
161161
msg "##################################### ip addresses"
162-
grep -sRIEho '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' $FIRMDIR | sort | uniq | tee -a $FILE
162+
grep -sRIEho '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' --exclude='console' $FIRMDIR | sort | uniq | tee -a $FILE
163163

164164
msg ""
165165
msg "***Search for urls***"
166166
msg "##################################### urls"
167-
grep -sRIEoh '(http|https)://[^/"]+' $FIRMDIR | sort | uniq | tee -a $FILE
167+
grep -sRIEoh '(http|https)://[^/"]+' --exclude='console' $FIRMDIR | sort | uniq | tee -a $FILE
168168

169169
msg ""
170170
msg "***Search for emails***"
171171
msg "##################################### emails"
172-
grep -sRIEoh '([[:alnum:]_.-]+@[[:alnum:]_.-]+?\.[[:alpha:].]{2,6})' "$@" $FIRMDIR | sort | uniq | tee -a $FILE
172+
grep -sRIEoh '([[:alnum:]_.-]+@[[:alnum:]_.-]+?\.[[:alpha:].]{2,6})' "$@" --exclude='console' $FIRMDIR | sort | uniq | tee -a $FILE
173173

174174
#Perform static code analysis
175175
#eslint -c eslintrc.json $FIRMDIR | tee -a $FILE

0 commit comments

Comments
 (0)
Please sign in to comment.