vendredi 2 janvier 2015

uptimization of my searching script


Hello i am trying to find a key of my one of my encrypted file in this regard this script check the hash patterns which start with 53cr3t and end with d51ab. This script work to find out the key but the problem is this script is quite slow. any idea to enhance the searching method in this specific problem. if i solve this problem in C language would it be more efficient or not?


Find the key



key=$(i=0; \
while ! echo -n "53cr3t-$i" | "$sha1sum" | grep -q "^d51ab"; do \
i=$((i+1)); \
done; \
echo -n "53cr3t-$i" | "$sha1sum" | cut -d' ' -f1)


Aucun commentaire:

Enregistrer un commentaire