-
-
Save sumonst21/aa8c96ba27391a709985757cd8650a1d to your computer and use it in GitHub Desktop.
Find Trojan Source unicode characters (CVE-2021-42694 and CVE-2021-42574.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
# Usage instructions: sh find.sh php|tr '\n' '; ' | |
# Then copy and paste the output and execute it | |
ext=$1 | |
C="\u200E \u200F \u202A \u202B \u202C \u202D \u202E \u2066 \u2067 \u2068 \u2069 \u202C" | |
for a in $C; do echo find . -type f -name \"*.$ext\" -exec grep -H \$\'$a\' {} \\\; ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment