I wrote one of these posts before, but because Ecvps went bankrupt, so I lost two months of data, that article was lost, but I also updated the script method, there will be content generation key chain and no content automatically randomly generated key chain two, the control method is a and B two. A is a random
#!/bin/bash
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 $} '
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];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 are 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
###########################################################################################################