mirror of
				https://github.com/Xahau/xahaud.git
				synced 2025-11-04 10:45:50 +00:00 
			
		
		
		
	remove false positives from sus pat finder (#506)
This commit is contained in:
		@@ -13,8 +13,8 @@ for file in $files_changed; do
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  # Check if the file exists (it might have been deleted)
 | 
					  # Check if the file exists (it might have been deleted)
 | 
				
			||||||
  if [ -f "$absolute_path" ]; then
 | 
					  if [ -f "$absolute_path" ]; then
 | 
				
			||||||
    # Search the file for the given patterns
 | 
					    # Search the file for the given patterns, but exclude lines containing 'public_key'
 | 
				
			||||||
    grep_output=$(grep -n -E '(([^rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz]|^)(s|p)[rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz]{25,60}([^(]|$)))|([^A-Fa-f0-9](02|03|ED)[A-Fa-f0-9]{64})' "$absolute_path")
 | 
					    grep_output=$(grep -n -E '(([^rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz]|^)(s|p)[rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz]{25,60}([^(]|$)))|([^A-Fa-f0-9](02|03|ED)[A-Fa-f0-9]{64})' "$absolute_path" | grep -v "public_key")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Check if grep found any matches
 | 
					    # Check if grep found any matches
 | 
				
			||||||
    if [ ! -z "$grep_output" ]; then
 | 
					    if [ ! -z "$grep_output" ]; then
 | 
				
			||||||
@@ -25,7 +25,3 @@ for file in $files_changed; do
 | 
				
			|||||||
    fi
 | 
					    fi
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 | 
					 | 
				
			||||||
# If the loop completes without finding any suspicious patterns
 | 
					 | 
				
			||||||
echo "Success: No suspicious patterns found in the diff."
 | 
					 | 
				
			||||||
exit 0
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user