Last active
August 29, 2015 14:15
-
-
Save makiftasova/63681e44e424c842331b to your computer and use it in GitHub Desktop.
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
#!/usr/bin/bash | |
# Author: Mehmet Akif TAŞOVA <[email protected]> | |
# A simple shell script to unlock mobile broadband devices | |
# on linux systems. | |
# depends on mmcli utility. | |
if [ $# -eq 1 ] ; then | |
echo "device #$1 sims are:" | |
mmcli -m $1 | grep SIM | |
elif [ $# -eq 2 ] ; then | |
echo "please enter PIN to unlock device" | |
echo "usage: $0 $1 $2 [PIN_CODE]" | |
elif [ $# -ne 3 ] ; then | |
echo "usage: $0 [MODEM_CODE] [SIM_CODE] [PIN_CODE]" | |
echo "current devices are:" | |
mmcli -L | |
exit | |
else | |
mmcli -m $1 -i $2 --pin=$3 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment