diff --git a/scan.sh b/scan.sh index 622e368..94134ea 100644 --- a/scan.sh +++ b/scan.sh @@ -37,12 +37,18 @@ for string in "${search_strings[@]}"; do done < <(grep -Rlw "$path" -e "$string") done +echo "===================================================================================================" +echo "suspect file list:" + # Remove duplicates from the array grep_results readarray -t unique_grep_results < <(printf '%s\n' "${grep_results[@]}" | sort -u) # Display the unique results printf '%s\n' "${unique_grep_results[@]}" +echo "===================================================================================================" +echo "backdoor suspect list:" + # Check if unique_grep_results is not empty if [ ${#unique_grep_results[@]} -ne 0 ]; then # Loop through each file in unique_grep_results @@ -57,4 +63,9 @@ if [ ${#unique_grep_results[@]} -ne 0 ]; then echo "The file $file is not backdoor, please inform this script author for next investigation." fi done -fi \ No newline at end of file +fi + +echo "===================================================================================================" +echo "writeable file or folder list:" + +find $path -type d,f -perm /u=w,g=w,o=w \ No newline at end of file