Linux下生成链条式密码钥匙的脚本

2016年04月16日

原创内容,转载请注明出处: https://www.myzhenai.com.cn/post/2172.html https://www.myzhenai.com/thread-17854-1-1.html
之前写过一个这样的博文,但因为Ecvps倒闭跑路了,所以我丢失了两个月的数据,那篇文章也就丢失了,但是我也更新了这个脚本的方法,将有内容生成密钥链条和无内容自动随机生成密钥链条两种,控制方法是A和B两种.A是随机

# !/bin/bash
###############################################################################################################################################################################################
#
# This is to get the character channeling encryption scripting tool
# Autor: RucLinux
# Web: https://www.myzhenai.com.cn/ https://www.myzhenai.com/ https://www.haikou-china.com/ https://jiayu.mybabya.com/ https://www.0898-shop.com/
#
###############################################################################################################################################################################################
random() {
  index=0
  str=""
  t=`grep '((?=[\x21-\x7e]+)[^A-Za-z0-9])'`
  for i in {a..z}; do arr[index]=$i; index=`expr ${index} + 1`; done
  for i in {A..Z}; do arr[index]=$i; index=`expr ${index} + 1`; done
  for i in {$t}; do arr[index]=$i; index=`expr ${index} + 1`; done
  for i in {0..9}; do arr[index]=$i; index=`expr ${index} + 1`; done
  for i in {1..42}; do str="$str${arr[$RANDOM%$index]}"; done
  #echo $str
s=`echo $str |cut -c1-42`
echo ${s:0:6}-${s:12:6}-${s:18:6}-${s:24:6}-${s:30:6}-${s:36:6}
}
########################################################################################################### 
create() (
ip=`ifconfig | awk -F'[ ]+|:' '/inet addr/{if($4!~/^192.168|^172.16|^10|^127|^0/) print $4}'`
read name
a=`echo $name |wc -L`
if [ $a -lt 6 ];then
site=$name.$ip
else
site=$name
fi
md=`echo $site |base64 -i`
b=`echo $md |wc -L`
if [ $b -lt 36 ];then
stin=`echo $md | md5sum |base64 -i`
else
stin=$md
fi
s=`echo $stin |cut -c1-42`
echo ${s:0:6}-${s:12:6}-${s:18:6}-${s:24:6}-${s:30:6}-${s:36:6}
)
###########################################################################################################
echo "# This is to get the character channeling encryption scripting tool"
echo "# Autor: RucLinux"
echo -e "# \033[31m Please select a channel A=random | B=create \033[0m"
read ab
if [ "$ab" == "A" ]; then
echo `random`
fi
if [ "$ab" == "B" ]; then
echo -e  "\033[31m Please enter Need to encrypt a string: \033[0m"
echo `create`
fi
###########################################################################################################

 

Linux下生成链条式密码钥匙的脚本

Linux下生成链条式密码钥匙的脚本


Linux下生成链条式密码钥匙的脚本

Linux下生成链条式密码钥匙的脚本


sicnature ---------------------------------------------------------------------
Your current IP address is: 44.200.145.114
Your IP address location: 美国弗吉尼亚阿什本
Your IP address country and region: 美国 美国
Your current browser is:
Your current system is:
Original content, please indicate the source:
同福客栈论坛 | 蟒蛇科普海南乡情论坛 | JiaYu Blog
sicnature ---------------------------------------------------------------------
Welcome to reprint. Please indicate the source https://www.myzhenai.com.cn/post/2172.html

1 评论

回复 巴中热线 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注