mirror of
https://github.com/nortakales/flipper-zero-tonies.git
synced 2025-12-06 06:45:05 +01:00
Detect carriage returns in validation, removed existing ones
This commit is contained in:
parent
e4463409a9
commit
5243651f06
11 changed files with 328 additions and 322 deletions
|
|
@ -5,6 +5,7 @@ shopt -s globstar
|
||||||
REQUIRED_PATTERNS=(
|
REQUIRED_PATTERNS=(
|
||||||
"Filetype: Flipper NFC device"
|
"Filetype: Flipper NFC device"
|
||||||
"Version: 4"
|
"Version: 4"
|
||||||
|
"Device type: SLIX"
|
||||||
"UID:( [A-F0-9]{2}){8}"
|
"UID:( [A-F0-9]{2}){8}"
|
||||||
"DSFID: 00"
|
"DSFID: 00"
|
||||||
"AFI: 00"
|
"AFI: 00"
|
||||||
|
|
@ -32,11 +33,16 @@ for filename in **/*.nfc; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# The likelihood of two blocks of 00 in data content is almsot impossible,
|
# The likelihood of two blocks of 00 in data content is almost impossible,
|
||||||
# so use that as a check for when the full data is not read
|
# so use that as a check for when the full data is not read
|
||||||
if [ ! -z "$(grep -P "Data Content:( [A-F0-9]{2})* 00 00( [A-F0-9]{2})*" "$filename")" ]; then
|
if [ ! -z "$(grep -P "Data Content:( [A-F0-9]{2})* 00 00( [A-F0-9]{2})*" "$filename")" ]; then
|
||||||
echo $filename
|
echo $filename
|
||||||
echo " Full data not read"
|
echo " Full data not read"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$(grep -P "\r" "$filename")" ]; then
|
||||||
|
echo $filename
|
||||||
|
echo " Has carriage return characters"
|
||||||
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue