反向破解
输出执行时间
代码1:
for i in {1..32767}
do
{
md=`echo $i |md5sum|cut -c1-8`
if [[ $md =~ ^0b364f36.*|^7f1e6feb.*|^c5b795e2.*|^5f8b9f68.*|^081691c.*|^76728eb.* ]]
then
echo $i的前8位md5值为`echo $i |md5sum|cut -c1-8`
fi
}&
done
代码2:
#!/bin/bash
startTime_s=`date +%s`
for i in `seq 32767`
#for i in `seq 10`
do
{
ch8=`echo $i|md5sum|cut -c 1-8`
ch7=`echo $i|md5sum|cut -c 1-7`
for j in 0b364f36 7f1e6feb c5b795e2 5f8b9f68 081691c 76728eb
do
case $j in
$ch8)
echo "i=$i, ch8=$ch8,j=$j"
;;
$ch7)
echo "i=$i, ch7=$ch7,j=$j"
;;
*)
continue
esac
done
}&
done
endTime_s=`date +%s`
sumTime=$[ $endTime_s - $startTime_s ]
echo "$startTime ---> $endTime" "Total:$sumTime seconds"
欢迎来撩 : 汇总all