mirror of https://github.com/CIRCL/Circlean
Fix #6 - Rename autorun from source key.
parent
d506ebb688
commit
1b5d4050b1
|
@ -1,10 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
#set -x
|
set -x
|
||||||
|
|
||||||
if [ $# -eq 2 ]; then
|
if [ $# -eq 2 ]; then
|
||||||
mount -o noexec,nosuid,nodev,ro "${1}" "${2}"
|
mount -o noexec,nosuid,nodev "${1}" "${2}"
|
||||||
|
# renaming autorun.inf on the source key. As it it case insensitive, we have to do the following...
|
||||||
|
ls "${2}" | grep -i autorun.inf | xargs -I {} mv "${2}"/{} "${2}"/DANGEROUS_{}_DANGEROUS || true
|
||||||
|
mount -o remount,ro "${2}" || true
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo 'Invalid number of arguments.'
|
echo 'Invalid number of arguments.'
|
||||||
|
|
Loading…
Reference in New Issue