Skip to content

Instantly share code, notes, and snippets.

@doegox
Last active August 1, 2019 09:19
Show Gist options
  • Save doegox/c35925b14c7b8dc4baf42d61d9c71f1b to your computer and use it in GitHub Desktop.
Save doegox/c35925b14c7b8dc4baf42d61d9c71f1b to your computer and use it in GitHub Desktop.
Testing script for Proxmark3 RDV4 external flash
#!/bin/bash
for ((i=0; i<100; i++)); do
echo -e "\n\nIteration $i"
rm -f test_flash_in.bin test_flash_out.bin
dd if=/dev/urandom of=test_flash_in.bin bs=65536 count=3
./proxmark3.sh -c "
mem wipe p 0;
mem wipe p 1;
mem wipe p 2;
mem load f test_flash_in o 0;
mem dump f test_flash_out o 0 l 196608"
rm test_flash_out.eml
HASH1=$(cat test_flash_in.bin|sha1sum)
HASH2=$(cat test_flash_out.bin|sha1sum)
if [ "$HASH1" != "$HASH2" ]; then
echo FAIL
exit 1
fi
rm -f test_flash_in.bin test_flash_out.bin
done
echo SUCCESS
@doegox
Copy link
Author

doegox commented Jul 14, 2019

removed msleep as now BUSY_TIMEOUT was increased

@iceman1001
Copy link

you can remove that sleep command you added ;)
Look at those semi colons... mm mm mm

@doegox
Copy link
Author

doegox commented Jul 15, 2019

you can remove that sleep command you added ;)

already done tonight, sir...

@luminouw
Copy link

luminouw commented Aug 1, 2019

mem save no longer works, replaced it with mem dump : )

@doegox
Copy link
Author

doegox commented Aug 1, 2019

my bad, fixed, thanks @luminouw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment