[root@oldboy work]# cat stochastic.sh
#!/bin/bash
##############################################################
# File Name: stochastic.sh
# Version: V1.0
# Author: HU JIN SHENG
# Organization: www.oldboyedu.com
# Created Time : 2017-11-02 00:33:57
# Description:
##############################################################
. /etc/init.d/functions
declare -a array
for i in $(seq 0 32767)
do
array[$i]=`echo $RANDOM|md5sum | cut -c 1-8`
done
keys=([0]=21029299 [1]=00205d1c [2]=a3da1677 [3]=1f6d12dd [4]=890684b)
action "mate" /bin/true
for key in ${keys[@]}
do
for i in `seq 0 32767`
do
if [[ "${array[i]}" = "$key" ]]; then
echo "破解成功" "密码:"$i------$key
action " " /bin/true
fi
done
done
原文链接:https://www.f2er.com/bash/389874.html