Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Sed tr awk substitution problem (Read 2542 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Sed tr awk substitution problem

Reply #30
Now i stumbled upon how to translate a string from row format like abcd into column format like:
a
b
c
d
Thought is much easier  ::)  :-[

Many tnx for the guys that may know and would wanna share how this can be done as easiest possible. Tried with tr but how to tr a char that does not even exist, between ab  ???


Re: Sed tr awk substitution problem

Reply #32
Ooho that's literally 24 karat pure golden solution. Thank  you very much @ncmprhnsbl. Absolutely brilliant idea 8)   :)

Re: Sed tr awk substitution problem

Reply #33
Made it. Tnx everybody on this thread for help. Now there's no need to download any stupid files but just run the script bellow. Added some 'artwork' at the end of the script ;D Called this version entangle.sh but of course this can be changed. Preferably execute script into an empty folder so it will not remove by mistake any of your personal files that may happen to have same names (string, t1...t63, fin, sf, sf1) cos those are removed after use for better confidentiality   :P

You can test string here on the GRC website

Code: [Select]
#!/bin/bash
echo " "
echo "      ➢  Zero Trust Pass Entangle "
echo "         ------------------------"
sleep 0.1s
echo "      ➢  Search Space Depth 94, pass chassis 24|18|18| 3| "
sleep 0.1s
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t2
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t3
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t4
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t5
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t6
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t7
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t8
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t9
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t10
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t11
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t12
sleep 0.3s
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t13
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t14
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t15
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t16
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t17
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t18
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t19
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t20
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t21
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t22
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t23
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t24
sleep 0.3s
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t25
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t26
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t27
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t28
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t29
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t30
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t31
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t32
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t33
sleep 0.3s
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t34
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t35
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t36
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t37
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t38
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t39
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t40
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t41
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t42
sleep 0.3s
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t43
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t44
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t45
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t46
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t47
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t48
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t49
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t50
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t51
sleep 0.3s
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t52
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t53
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t54
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t55
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t56
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t57
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t58
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t59
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t60
sleep 0.3s
tr -Cd '0123456789' < /dev/random | head -c1 > t61
tr -Cd '0123456789' < /dev/random | head -c1 > t62
tr -Cd '0123456789' < /dev/random | head -c1 > t63
cat t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 t31 t32 t33 t34 t35 t36 t37 t38 t39 t40 t41 t42 t43 t44 t45 t46 t47 t48 t49 t50 t51 t52 t53 t54 t55 t56 t57 t58 t59 t60 t61 t62 t63 > sf
cat sf | fold -w 1 > sf1
shuf sf1 > fin
shuf fin > sf1
shuf sf1 > fin
shuf fin > sf1
shuf sf1 > fin
shuf fin > sf1
shuf sf1 > fin
cat fin | tr -d '\n' | tr -d '  ' > string
echo "---------------------------------------------------------------"
cat string
echo "
---------------------------------------------------------------"
rm string fin sf sf1 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 t31 t32 t33 t34 t35 t36 t37 t38 t39 t40 t41 t42 t43 t44 t45 t46 t47 t48 t49 t50 t51 t52 t53 t54 t55 t56 t57 t58 t59 t60 t61 t62 t63
echo "      ➢  String generated successfully"
echo "         -----------------------------"
echo "      ➢  Temp files cleared"
echo "         ------------------"
echo "      ➢  Done"
echo "                                                         
                           ⚀ ⚁ ⚂ [Artix community, 2022] ⚃ ⚄ ⚅"
echo " "
exec bash

Re: Sed tr awk substitution problem

Reply #34
Using that many temporary files, especially when their names are hardcoded, makes your script hard to maintain and very prone to signal related footguns (for instance, typing Ctrl+C in the middle of your script will prevent the rm from being executed and leaves it up to the user to clean the temp files).

Instead of dumping each command's output to a temporary file and cat'ing them togeter, you can use command groupings { }, which do the same thing without leaving a trace in the disk. You can also pipe shuf into shuf to avoid juggling the two final files.

Code: [Select]
#!/bin/bash
echo " "
echo "      ➢  Zero Trust Pass Entangle "
echo "         ------------------------"
sleep 0.1s
echo "      ➢  Search Space Depth 94, pass chassis 24|18|18| 3| "
sleep 0.1s
{
  tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c9
  sleep 0.3s
  tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c9
  sleep 0.3s
  tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c12
  sleep 0.3s
  tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c12
  sleep 0.3s
  tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c12
  sleep 0.3s
  tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c12
  sleep 0.3s
  tr -Cd '0123456789' < /dev/random | head -c3
} | fold -w 1 | shuf | shuf | shuf | shuf | shuf | shuf | shuf | tr -d '\n' | tr -d '  '

echo "      ➢  String generated successfully"
echo "         -----------------------------"
echo "      ➢  No temp files were harmed in the process"
echo "         ------------------"
echo "      ➢  Done"
echo "                                                        
                           ⚀ ⚁ ⚂ [Artix community, 2022] ⚃ ⚄ ⚅"
echo " "

Removing the redundant shufs and sleeps can make the core of the script even smaller.

Re: Sed tr awk substitution problem

Reply #35
That's true. I felt the need to put some small time breaks to disrupt a bit predictability of the script and avoid making the script spit out from memory. Ideally would be even better if those commands would be shufed before execution but think i need to create 2 scripts, one shufing those commands and the other executing them in that new order.

Also I added one useful feature where every char has it's own small statistic which shows how many times repeated itself and what did not show up at all and which one only appeared once. But i  stumbled on

Code: [Select]
 echo "!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"
that again needs escaping. This is needed instead of making another noobish test file containing  !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ and cat-ing it before the other stats shows underneath.

Think i can even output a rank of generated pass knowing what repeated what not, doubled, tripled and so on. So each generated string will receive a ratting 1-10 where 1 is worse and 10 is best.



The code for that is this one

Code: [Select]
#!/bin/bash
echo " "
echo "      ➢  Zero Trust Pass, Entangle "
echo "         -------------------------"
sleep 0.1s
echo "      ➢  Search Space Depth 94, pass chassis 24|18|18| 3| "
sleep 0.1s
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t2
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t3
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t4
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t5
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t6
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t7
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t8
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t9
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t10
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t11
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t12
sleep 0.3s
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t13
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t14
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t15
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t16
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t17
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t18
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t19
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t20
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t21
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t22
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t23
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t24
sleep 0.3s
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t25
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t26
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t27
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t28
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t29
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t30
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t31
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t32
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t33
sleep 0.3s
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t34
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t35
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t36
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t37
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t38
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t39
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t40
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t41
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t42
sleep 0.3s
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t43
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t44
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t45
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t46
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t47
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t48
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t49
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t50
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t51
sleep 0.3s
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t52
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t53
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t54
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t55
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t56
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t57
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t58
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t59
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t60
sleep 0.3s
tr -Cd '0123456789' < /dev/random | head -c1 > t61
tr -Cd '0123456789' < /dev/random | head -c1 > t62
tr -Cd '0123456789' < /dev/random | head -c1 > t63
cat t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 t31 t32 t33 t34 t35 t36 t37 t38 t39 t40 t41 t42 t43 t44 t45 t46 t47 t48 t49 t50 t51 t52 t53 t54 t55 t56 t57 t58 t59 t60 t61 t62 t63 > sf
cat sf | fold -w 1 > sf1
shuf sf1 > fin
shuf fin > sf1
shuf sf1 > fin
shuf fin > sf1
shuf sf1 > fin
shuf fin > sf1
shuf sf1 > fin
awk -F '!' '{s+=(NF-1)} END {print s}' fin > count1
awk -F '"' '{s+=(NF-1)} END {print s}' fin > count2
awk -F '#' '{s+=(NF-1)} END {print s}' fin > count3
awk -F '$' '{s+=(NF-1)} END {print s}' fin > count4
awk -F '%' '{s+=(NF-1)} END {print s}' fin > count5
awk -F '&' '{s+=(NF-1)} END {print s}' fin > count6
awk -F ''\''' '{s+=(NF-1)} END {print s}' fin > count7
awk -F '(' '{s+=(NF-1)} END {print s}' fin > count8
awk -F ')' '{s+=(NF-1)} END {print s}' fin > count9
awk -F '*' '{s+=(NF-1)} END {print s}' fin > count10
awk -F '+' '{s+=(NF-1)} END {print s}' fin > count11
awk -F ',' '{s+=(NF-1)} END {print s}' fin > count12
awk -F '-' '{s+=(NF-1)} END {print s}' fin > count13
awk -F '.' '{s+=(NF-1)} END {print s}' fin > count14
awk -F '/' '{s+=(NF-1)} END {print s}' fin > count15
awk -F ':' '{s+=(NF-1)} END {print s}' fin > count16
awk -F ';' '{s+=(NF-1)} END {print s}' fin > count17
awk -F '<' '{s+=(NF-1)} END {print s}' fin > count18
awk -F '=' '{s+=(NF-1)} END {print s}' fin > count19
awk -F '>' '{s+=(NF-1)} END {print s}' fin > count20
awk -F '?' '{s+=(NF-1)} END {print s}' fin > count21
awk -F '@' '{s+=(NF-1)} END {print s}' fin > count22
awk -F '[' '{s+=(NF-1)} END {print s}' fin > count23
awk -F '\' '{s+=(NF-1)} END {print s}' fin > count24
awk -F ']' '{s+=(NF-1)} END {print s}' fin > count25
awk -F '^' '{s+=(NF-1)} END {print s}' fin > count26
awk -F '_' '{s+=(NF-1)} END {print s}' fin > count27
awk -F '`' '{s+=(NF-1)} END {print s}' fin > count28
awk -F '{' '{s+=(NF-1)} END {print s}' fin > count29
awk -F '|' '{s+=(NF-1)} END {print s}' fin > count30
awk -F '}' '{s+=(NF-1)} END {print s}' fin > count31
awk -F '~' '{s+=(NF-1)} END {print s}' fin > count32
awk -F 'a' '{s+=(NF-1)} END {print s}' fin > count33
awk -F 'b' '{s+=(NF-1)} END {print s}' fin > count34
awk -F 'c' '{s+=(NF-1)} END {print s}' fin > count35
awk -F 'd' '{s+=(NF-1)} END {print s}' fin > count36
awk -F 'e' '{s+=(NF-1)} END {print s}' fin > count37
awk -F 'f' '{s+=(NF-1)} END {print s}' fin > count38
awk -F 'g' '{s+=(NF-1)} END {print s}' fin > count39
awk -F 'h' '{s+=(NF-1)} END {print s}' fin > count40
awk -F 'i' '{s+=(NF-1)} END {print s}' fin > count41
awk -F 'j' '{s+=(NF-1)} END {print s}' fin > count42
awk -F 'k' '{s+=(NF-1)} END {print s}' fin > count43
awk -F 'l' '{s+=(NF-1)} END {print s}' fin > count44
awk -F 'm' '{s+=(NF-1)} END {print s}' fin > count45
awk -F 'n' '{s+=(NF-1)} END {print s}' fin > count46
awk -F 'o' '{s+=(NF-1)} END {print s}' fin > count47
awk -F 'p' '{s+=(NF-1)} END {print s}' fin > count48
awk -F 'q' '{s+=(NF-1)} END {print s}' fin > count49
awk -F 'r' '{s+=(NF-1)} END {print s}' fin > count50
awk -F 's' '{s+=(NF-1)} END {print s}' fin > count51
awk -F 't' '{s+=(NF-1)} END {print s}' fin > count52
awk -F 'u' '{s+=(NF-1)} END {print s}' fin > count53
awk -F 'v' '{s+=(NF-1)} END {print s}' fin > count54
awk -F 'w' '{s+=(NF-1)} END {print s}' fin > count55
awk -F 'x' '{s+=(NF-1)} END {print s}' fin > count56
awk -F 'y' '{s+=(NF-1)} END {print s}' fin > count57
awk -F 'z' '{s+=(NF-1)} END {print s}' fin > count58
awk -F 'A' '{s+=(NF-1)} END {print s}' fin > count59
awk -F 'B' '{s+=(NF-1)} END {print s}' fin > count60
awk -F 'C' '{s+=(NF-1)} END {print s}' fin > count61
awk -F 'D' '{s+=(NF-1)} END {print s}' fin > count62
awk -F 'E' '{s+=(NF-1)} END {print s}' fin > count63
awk -F 'F' '{s+=(NF-1)} END {print s}' fin > count64
awk -F 'G' '{s+=(NF-1)} END {print s}' fin > count65
awk -F 'H' '{s+=(NF-1)} END {print s}' fin > count66
awk -F 'I' '{s+=(NF-1)} END {print s}' fin > count67
awk -F 'J' '{s+=(NF-1)} END {print s}' fin > count68
awk -F 'K' '{s+=(NF-1)} END {print s}' fin > count69
awk -F 'L' '{s+=(NF-1)} END {print s}' fin > count70
awk -F 'M' '{s+=(NF-1)} END {print s}' fin > count71
awk -F 'N' '{s+=(NF-1)} END {print s}' fin > count72
awk -F 'O' '{s+=(NF-1)} END {print s}' fin > count73
awk -F 'P' '{s+=(NF-1)} END {print s}' fin > count74
awk -F 'Q' '{s+=(NF-1)} END {print s}' fin > count75
awk -F 'R' '{s+=(NF-1)} END {print s}' fin > count76
awk -F 'S' '{s+=(NF-1)} END {print s}' fin > count77
awk -F 'T' '{s+=(NF-1)} END {print s}' fin > count78
awk -F 'U' '{s+=(NF-1)} END {print s}' fin > count79
awk -F 'V' '{s+=(NF-1)} END {print s}' fin > count80
awk -F 'W' '{s+=(NF-1)} END {print s}' fin > count81
awk -F 'X' '{s+=(NF-1)} END {print s}' fin > count82
awk -F 'Y' '{s+=(NF-1)} END {print s}' fin > count83
awk -F 'Z' '{s+=(NF-1)} END {print s}' fin > count84
awk -F '0' '{s+=(NF-1)} END {print s}' fin > count85
awk -F '1' '{s+=(NF-1)} END {print s}' fin > count86
awk -F '2' '{s+=(NF-1)} END {print s}' fin > count87
awk -F '3' '{s+=(NF-1)} END {print s}' fin > count88
awk -F '4' '{s+=(NF-1)} END {print s}' fin > count89
awk -F '5' '{s+=(NF-1)} END {print s}' fin > count90
awk -F '6' '{s+=(NF-1)} END {print s}' fin > count91
awk -F '7' '{s+=(NF-1)} END {print s}' fin > count92
awk -F '8' '{s+=(NF-1)} END {print s}' fin > count93
awk -F '9' '{s+=(NF-1)} END {print s}' fin > count94
cat count1 count2 count3 count4 count5 count6 count7 count8 count9 count10 count11 count12 count13 count14 count15 count16 count17 count18 count19 count20 count21 count22 count23 count24 count25 count26 count27 count28 count29 count30 count31 count32 count33 count34 count35 count36 count37 count38 count39 count40 count41 count42 count43 count44 count45 count46 count47 count48 count49 count50 count51 count52 count53 count54 count55 count56 count57 count58 count59 count60 count61 count62 count63 count64 count65 count66 count67 count68 count69 count70 count71 count72 count73 count74 count75 count76 count77 count78 count79 count80 count81 count82 count83 count84 count85 count86 count87 count88 count89 count90 count91 count92 count93 count94 > all
#paste spc all | column -s $'\t' -t > tc4
cat fin | tr -d '\n' | tr -d '  ' > string
echo "---------------------------------------------------------------"
cat string
echo "
---------------------------------------------------------------"
rm string sf sf1 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 t31 t32 t33 t34 t35 t36 t37 t38 t39 t40 t41 t42 t43 t44 t45 t46 t47 t48 t49 t50 t51 t52 t53 t54 t55 t56 t57 t58 t59 t60 t61 t62 t63
echo "      ➢  String generated successfully"
echo "         -----------------------------"
echo "      ➢  Temp files cleared"
echo "         ------------------"
echo "      ➢  Char repetition number"
echo "         ----------------------"
echo "     "
cat all | tr -d '\n' > tc4
cat ord
echo "   "
cat tc4
rm fin tc4 all count1 count2 count3 count4 count5 count6 count7 count8 count9 count10 count11 count12 count13 count14 count15 count16 count17 count18 count19 count20 count21 count22 count23 count24 count25 count26 count27 count28 count29 count30 count31 count32 count33 count34 count35 count36 count37 count38 count39 count40 count41 count42 count43 count44 count45 count46 count47 count48 count49 count50 count51 count52 count53 count54 count55 count56 count57 count58 count59 count60 count61 count62 count63 count64 count65 count66 count67 count68 count69 count70 count71 count72 count73 count74 count75 count76 count77 count78 count79 count80 count81 count82 count83 count84 count85 count86 count87 count88 count89 count90 count91 count92 count93 count94
echo " 
"
echo "      ➢  Done"
echo "                                                         

                                                           ⚀ ⚁ ⚂ [Artix community, 2022] ⚃ ⚄ ⚅"
echo " "
exec bash

Also there's a need for another text file called ord (from order) that solved my momentarily echo-ing that ugly string. Is not that big deal though having 1 text file

Code: [Select]
!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789

Re: Sed tr awk substitution problem

Reply #36
As a criteria i would use to determine which pass is better, i'll give this example. Where our chars repeated as follow




2000012102211010111001200002001210000101010120001210202111021112011100113010000100010100010001

If we count how many Zeros we have it gives 46 and 94-46=48 Meaning only 48 unique elements are included in this string this gives less arrangements with repetition  94^48. If we would have as example 59 unique elements our pass would be superior in terms of numbers 94^59 and entropy. Also the more 2/3/4 times we see char repeating this gives less and less unique elements.

Assuming one of the worse situation where all our chars repeat 3 times it means 63/3=21 only 21 unique elements meaning 94^21 which gives lower number than if our pass would be natively crafted without any repetition 94^21 < A(94,63)

This also means if a hacker somehow uses only 21 elements it will break more easily without bothering to take into consideration the other 42 elements (21+42=63)

So our passwords have to have less 'Zeros' which automatically means better entropy+huge haystack, win-win situation ;D

Re: Sed tr awk substitution problem

Reply #37
Made some more calculation. So we can have considering the previously way of showing char stats between 31 Zeros and 93Z (worst case when essentially we have a 63 long string made out of only 1 element 94-1=93 Z ). While 31Z is good 32Z is better cos it implies some where a char repeated therefor we entered in the realm of the bigger numbers.

At the 54 Z we hit again a limit cos beyond 54 Zeros aka 55 our pass becomes even worse than a 31 Z.

So to summarize the better way is having between 32-54 Z's  (note we can't have a 30Z cos that would imply a 64 char long pass and we're talking about a 63)

Edit (17:10) : corrected couple of calculations 62^63 instead of 94^62

To conclude a 32Z would be best case scenario (62^63) while going up @ 54Z Entropy get weaker and numbers go lower (40^63)
also percentages are just orientative but the numbers 62^63 are accurate.

32Z --------> 100%  Best case 62^63
33Z--------->   96%    61^63
34Z--------->   94%    60^63
35Z--------->   91%    59^63
.
.
.
76Z---------> 42%  ~ same as a 63 non repeating chars
.
.
93Z--------->34%  Worst case pass made out of same element repeated 63 times only 94 possibilities

I'll try modify the script to output string quality in percents  8)


Re: Sed tr awk substitution problem

Reply #38
Sorted out and came up with the following chart

|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65| Z's
|45|  1|   2|   3|  4|   5|   6|   7|   8|  9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34| Rank

where Z's means the amount of Zeroes of a generated string
and Rank the quality of the string where 1 is best and 93 worst

Edit: (17:21) note 31 Z's and 76 Z's have aprox same Rank 45

The reason i went only to the 34 Rank is because is highly unlikely you'll get beyond one of the worse 34 Rank (with 65 Z's)

I added to the script the feature of counting Zeroes (Z's) but what would be nice if anyone of you guys with better skills can give HELP
by take that number i.e 40 Z's and output its corresponding Rank in this case Rank 9.

Output i.e: 40 Z's Rank 9 out of 93 (9/93)

Bellow the script with the counting Z's. Don't forget the ord text file @ the end of reply no 35. Many thanks to those who might give their much valuable solution. Special thanks to @capezotte & @nous  & @ncmprhnsbl i'll de clutter the code with your suggested solutions @ reply #34 and hopefully will have something debloated and efficient as can get.  8)

Code: [Select]
#!/bin/bash
echo " "
echo "      ➢  Zero Trust Pass, Entangle "
echo "         -------------------------"
sleep 0.1s
echo "      ➢  Search Space Depth 94, pass chassis 24|18|18| 3| "
sleep 0.1s
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t2
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t3
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t4
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t5
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t6
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t7
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t8
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t9
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t10
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t11
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t12
sleep 0.3s
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t13
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t14
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t15
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t16
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t17
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t18
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t19
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t20
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t21
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t22
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t23
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1 > t24
sleep 0.3s
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t25
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t26
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t27
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t28
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t29
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t30
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t31
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t32
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t33
sleep 0.3s
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t34
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t35
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t36
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t37
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t38
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t39
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t40
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t41
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1 > t42
sleep 0.3s
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t43
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t44
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t45
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t46
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t47
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t48
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t49
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t50
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t51
sleep 0.3s
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t52
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t53
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t54
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t55
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t56
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t57
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t58
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t59
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1 > t60
sleep 0.3s
tr -Cd '0123456789' < /dev/random | head -c1 > t61
tr -Cd '0123456789' < /dev/random | head -c1 > t62
tr -Cd '0123456789' < /dev/random | head -c1 > t63
cat t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 t31 t32 t33 t34 t35 t36 t37 t38 t39 t40 t41 t42 t43 t44 t45 t46 t47 t48 t49 t50 t51 t52 t53 t54 t55 t56 t57 t58 t59 t60 t61 t62 t63 > sf
cat sf | fold -w 1 > sf1
shuf sf1 > fin
shuf fin > sf1
shuf sf1 > fin
shuf fin > sf1
shuf sf1 > fin
shuf fin > sf1
shuf sf1 > fin
awk -F '!' '{s+=(NF-1)} END {print s}' fin > count1
awk -F '"' '{s+=(NF-1)} END {print s}' fin > count2
awk -F '#' '{s+=(NF-1)} END {print s}' fin > count3
awk -F '$' '{s+=(NF-1)} END {print s}' fin > count4
awk -F '%' '{s+=(NF-1)} END {print s}' fin > count5
awk -F '&' '{s+=(NF-1)} END {print s}' fin > count6
awk -F ''\''' '{s+=(NF-1)} END {print s}' fin > count7
awk -F '(' '{s+=(NF-1)} END {print s}' fin > count8
awk -F ')' '{s+=(NF-1)} END {print s}' fin > count9
awk -F '*' '{s+=(NF-1)} END {print s}' fin > count10
awk -F '+' '{s+=(NF-1)} END {print s}' fin > count11
awk -F ',' '{s+=(NF-1)} END {print s}' fin > count12
awk -F '-' '{s+=(NF-1)} END {print s}' fin > count13
awk -F '.' '{s+=(NF-1)} END {print s}' fin > count14
awk -F '/' '{s+=(NF-1)} END {print s}' fin > count15
awk -F ':' '{s+=(NF-1)} END {print s}' fin > count16
awk -F ';' '{s+=(NF-1)} END {print s}' fin > count17
awk -F '<' '{s+=(NF-1)} END {print s}' fin > count18
awk -F '=' '{s+=(NF-1)} END {print s}' fin > count19
awk -F '>' '{s+=(NF-1)} END {print s}' fin > count20
awk -F '?' '{s+=(NF-1)} END {print s}' fin > count21
awk -F '@' '{s+=(NF-1)} END {print s}' fin > count22
awk -F '[' '{s+=(NF-1)} END {print s}' fin > count23
awk -F '\' '{s+=(NF-1)} END {print s}' fin > count24
awk -F ']' '{s+=(NF-1)} END {print s}' fin > count25
awk -F '^' '{s+=(NF-1)} END {print s}' fin > count26
awk -F '_' '{s+=(NF-1)} END {print s}' fin > count27
awk -F '`' '{s+=(NF-1)} END {print s}' fin > count28
awk -F '{' '{s+=(NF-1)} END {print s}' fin > count29
awk -F '|' '{s+=(NF-1)} END {print s}' fin > count30
awk -F '}' '{s+=(NF-1)} END {print s}' fin > count31
awk -F '~' '{s+=(NF-1)} END {print s}' fin > count32
awk -F 'a' '{s+=(NF-1)} END {print s}' fin > count33
awk -F 'b' '{s+=(NF-1)} END {print s}' fin > count34
awk -F 'c' '{s+=(NF-1)} END {print s}' fin > count35
awk -F 'd' '{s+=(NF-1)} END {print s}' fin > count36
awk -F 'e' '{s+=(NF-1)} END {print s}' fin > count37
awk -F 'f' '{s+=(NF-1)} END {print s}' fin > count38
awk -F 'g' '{s+=(NF-1)} END {print s}' fin > count39
awk -F 'h' '{s+=(NF-1)} END {print s}' fin > count40
awk -F 'i' '{s+=(NF-1)} END {print s}' fin > count41
awk -F 'j' '{s+=(NF-1)} END {print s}' fin > count42
awk -F 'k' '{s+=(NF-1)} END {print s}' fin > count43
awk -F 'l' '{s+=(NF-1)} END {print s}' fin > count44
awk -F 'm' '{s+=(NF-1)} END {print s}' fin > count45
awk -F 'n' '{s+=(NF-1)} END {print s}' fin > count46
awk -F 'o' '{s+=(NF-1)} END {print s}' fin > count47
awk -F 'p' '{s+=(NF-1)} END {print s}' fin > count48
awk -F 'q' '{s+=(NF-1)} END {print s}' fin > count49
awk -F 'r' '{s+=(NF-1)} END {print s}' fin > count50
awk -F 's' '{s+=(NF-1)} END {print s}' fin > count51
awk -F 't' '{s+=(NF-1)} END {print s}' fin > count52
awk -F 'u' '{s+=(NF-1)} END {print s}' fin > count53
awk -F 'v' '{s+=(NF-1)} END {print s}' fin > count54
awk -F 'w' '{s+=(NF-1)} END {print s}' fin > count55
awk -F 'x' '{s+=(NF-1)} END {print s}' fin > count56
awk -F 'y' '{s+=(NF-1)} END {print s}' fin > count57
awk -F 'z' '{s+=(NF-1)} END {print s}' fin > count58
awk -F 'A' '{s+=(NF-1)} END {print s}' fin > count59
awk -F 'B' '{s+=(NF-1)} END {print s}' fin > count60
awk -F 'C' '{s+=(NF-1)} END {print s}' fin > count61
awk -F 'D' '{s+=(NF-1)} END {print s}' fin > count62
awk -F 'E' '{s+=(NF-1)} END {print s}' fin > count63
awk -F 'F' '{s+=(NF-1)} END {print s}' fin > count64
awk -F 'G' '{s+=(NF-1)} END {print s}' fin > count65
awk -F 'H' '{s+=(NF-1)} END {print s}' fin > count66
awk -F 'I' '{s+=(NF-1)} END {print s}' fin > count67
awk -F 'J' '{s+=(NF-1)} END {print s}' fin > count68
awk -F 'K' '{s+=(NF-1)} END {print s}' fin > count69
awk -F 'L' '{s+=(NF-1)} END {print s}' fin > count70
awk -F 'M' '{s+=(NF-1)} END {print s}' fin > count71
awk -F 'N' '{s+=(NF-1)} END {print s}' fin > count72
awk -F 'O' '{s+=(NF-1)} END {print s}' fin > count73
awk -F 'P' '{s+=(NF-1)} END {print s}' fin > count74
awk -F 'Q' '{s+=(NF-1)} END {print s}' fin > count75
awk -F 'R' '{s+=(NF-1)} END {print s}' fin > count76
awk -F 'S' '{s+=(NF-1)} END {print s}' fin > count77
awk -F 'T' '{s+=(NF-1)} END {print s}' fin > count78
awk -F 'U' '{s+=(NF-1)} END {print s}' fin > count79
awk -F 'V' '{s+=(NF-1)} END {print s}' fin > count80
awk -F 'W' '{s+=(NF-1)} END {print s}' fin > count81
awk -F 'X' '{s+=(NF-1)} END {print s}' fin > count82
awk -F 'Y' '{s+=(NF-1)} END {print s}' fin > count83
awk -F 'Z' '{s+=(NF-1)} END {print s}' fin > count84
awk -F '0' '{s+=(NF-1)} END {print s}' fin > count85
awk -F '1' '{s+=(NF-1)} END {print s}' fin > count86
awk -F '2' '{s+=(NF-1)} END {print s}' fin > count87
awk -F '3' '{s+=(NF-1)} END {print s}' fin > count88
awk -F '4' '{s+=(NF-1)} END {print s}' fin > count89
awk -F '5' '{s+=(NF-1)} END {print s}' fin > count90
awk -F '6' '{s+=(NF-1)} END {print s}' fin > count91
awk -F '7' '{s+=(NF-1)} END {print s}' fin > count92
awk -F '8' '{s+=(NF-1)} END {print s}' fin > count93
awk -F '9' '{s+=(NF-1)} END {print s}' fin > count94
cat count1 count2 count3 count4 count5 count6 count7 count8 count9 count10 count11 count12 count13 count14 count15 count16 count17 count18 count19 count20 count21 count22 count23 count24 count25 count26 count27 count28 count29 count30 count31 count32 count33 count34 count35 count36 count37 count38 count39 count40 count41 count42 count43 count44 count45 count46 count47 count48 count49 count50 count51 count52 count53 count54 count55 count56 count57 count58 count59 count60 count61 count62 count63 count64 count65 count66 count67 count68 count69 count70 count71 count72 count73 count74 count75 count76 count77 count78 count79 count80 count81 count82 count83 count84 count85 count86 count87 count88 count89 count90 count91 count92 count93 count94 > allc
cat fin | tr -d '\n' | tr -d '  ' > string
echo "---------------------------------------------------------------"
cat string
echo "
---------------------------------------------------------------"
rm string sf sf1 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 t31 t32 t33 t34 t35 t36 t37 t38 t39 t40 t41 t42 t43 t44 t45 t46 t47 t48 t49 t50 t51 t52 t53 t54 t55 t56 t57 t58 t59 t60 t61 t62 t63
echo "      ➢  String generated successfully"
echo "         -----------------------------"
echo "      ➢  Temp files cleared"
echo "         ------------------"
echo "      ➢  Char stats"
echo "         ----------"
echo "     "
cat allc | tr -d '\n' > tc4
cat ord
echo "   "
cat tc4
echo "
  "
awk -F '0' '{s+=(NF-1)} END {print s}' tc4 > fin_ct
echo "Z's amount"
cat fin_ct
rm fin_ct fin tc4 allc count1 count2 count3 count4 count5 count6 count7 count8 count9 count10 count11 count12 count13 count14 count15 count16 count17 count18 count19 count20 count21 count22 count23 count24 count25 count26 count27 count28 count29 count30 count31 count32 count33 count34 count35 count36 count37 count38 count39 count40 count41 count42 count43 count44 count45 count46 count47 count48 count49 count50 count51 count52 count53 count54 count55 count56 count57 count58 count59 count60 count61 count62 count63 count64 count65 count66 count67 count68 count69 count70 count71 count72 count73 count74 count75 count76 count77 count78 count79 count80 count81 count82 count83 count84 count85 count86 count87 count88 count89 count90 count91 count92 count93 count94
echo " 
"
echo "      ➢  Done"
echo "                                                         

                                                           ⚀ ⚁ ⚂ [Artix community, 2022] ⚃ ⚄ ⚅"
echo " "
exec bash




Re: Sed tr awk substitution problem

Reply #39
Done it! I brushed the script as much as i could following @capezotte brilliant idea. However i still needed to create 2 temp files  :-[ . Also made output look a bit more slick  :P
At this stage there's still a need to have 2 predefined text files cos those were a nightmare to echo them specially that containing symbols

Bellow script latest uncluttered brushed version. And here those 2 predefined files + script (zip)

sha256sum
daf53d2045b16cefc149334b9ba50d47ed7b4bcbaf9e24a482d1991f6e89a4c9

Code: [Select]
#!/bin/bash
echo " "
echo "      ➢  Zero Trust Pass, Entangle "
echo "        "
sleep 0.1s
echo "      ➢  Search Space Depth 94, pass chassis 24|18|18| 3| "
echo "---------------------------------------------------------------"
{
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
sleep 0.3s
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
tr -Cd '!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' < /dev/random | head -c1
sleep 0.3s
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
sleep 0.3s
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
tr -Cd 'abcdefghijklmnopqrstuvwxyz' < /dev/random | head -c1
sleep 0.3s
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
sleep 0.3s
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
tr -Cd 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < /dev/random | head -c1
sleep 0.3s
tr -Cd '0123456789' < /dev/random | head -c1
tr -Cd '0123456789' < /dev/random | head -c1
tr -Cd '0123456789' < /dev/random | head -c1
} | fold -w 1 | shuf | shuf | shuf | shuf | shuf | shuf | shuf | tr -d '\n' | tr -d '  ' > fin
cat fin
echo "
---------------------------------------------------------------"
echo "  "
echo "      ➢  String gen. success"
echo "           "
echo "            ﹍﹍﹍﹍﹍﹍﹍    "
echo "           |  Char stats  |"
echo "------------              --------------------------------------------------------------------"
cat ord
{
awk -F '!' '{s+=(NF-1)} END {print s}' fin
awk -F '"' '{s+=(NF-1)} END {print s}' fin
awk -F '#' '{s+=(NF-1)} END {print s}' fin
awk -F '$' '{s+=(NF-1)} END {print s}' fin
awk -F '%' '{s+=(NF-1)} END {print s}' fin
awk -F '&' '{s+=(NF-1)} END {print s}' fin
awk -F ''\''' '{s+=(NF-1)} END {print s}' fin
awk -F '(' '{s+=(NF-1)} END {print s}' fin
awk -F ')' '{s+=(NF-1)} END {print s}' fin
awk -F '*' '{s+=(NF-1)} END {print s}' fin
awk -F '+' '{s+=(NF-1)} END {print s}' fin
awk -F ',' '{s+=(NF-1)} END {print s}' fin
awk -F '-' '{s+=(NF-1)} END {print s}' fin
awk -F '.' '{s+=(NF-1)} END {print s}' fin
awk -F '/' '{s+=(NF-1)} END {print s}' fin
awk -F ':' '{s+=(NF-1)} END {print s}' fin
awk -F ';' '{s+=(NF-1)} END {print s}' fin
awk -F '<' '{s+=(NF-1)} END {print s}' fin
awk -F '=' '{s+=(NF-1)} END {print s}' fin
awk -F '>' '{s+=(NF-1)} END {print s}' fin
awk -F '?' '{s+=(NF-1)} END {print s}' fin
awk -F '@' '{s+=(NF-1)} END {print s}' fin
awk -F '[' '{s+=(NF-1)} END {print s}' fin
awk -F '\' '{s+=(NF-1)} END {print s}' fin
awk -F ']' '{s+=(NF-1)} END {print s}' fin
awk -F '^' '{s+=(NF-1)} END {print s}' fin
awk -F '_' '{s+=(NF-1)} END {print s}' fin
awk -F '`' '{s+=(NF-1)} END {print s}' fin
awk -F '{' '{s+=(NF-1)} END {print s}' fin
awk -F '|' '{s+=(NF-1)} END {print s}' fin
awk -F '}' '{s+=(NF-1)} END {print s}' fin
awk -F '~' '{s+=(NF-1)} END {print s}' fin
awk -F 'a' '{s+=(NF-1)} END {print s}' fin
awk -F 'b' '{s+=(NF-1)} END {print s}' fin
awk -F 'c' '{s+=(NF-1)} END {print s}' fin
awk -F 'd' '{s+=(NF-1)} END {print s}' fin
awk -F 'e' '{s+=(NF-1)} END {print s}' fin
awk -F 'f' '{s+=(NF-1)} END {print s}' fin
awk -F 'g' '{s+=(NF-1)} END {print s}' fin
awk -F 'h' '{s+=(NF-1)} END {print s}' fin
awk -F 'i' '{s+=(NF-1)} END {print s}' fin
awk -F 'j' '{s+=(NF-1)} END {print s}' fin
awk -F 'k' '{s+=(NF-1)} END {print s}' fin
awk -F 'l' '{s+=(NF-1)} END {print s}' fin
awk -F 'm' '{s+=(NF-1)} END {print s}' fin
awk -F 'n' '{s+=(NF-1)} END {print s}' fin
awk -F 'o' '{s+=(NF-1)} END {print s}' fin
awk -F 'p' '{s+=(NF-1)} END {print s}' fin
awk -F 'q' '{s+=(NF-1)} END {print s}' fin
awk -F 'r' '{s+=(NF-1)} END {print s}' fin
awk -F 's' '{s+=(NF-1)} END {print s}' fin
awk -F 't' '{s+=(NF-1)} END {print s}' fin
awk -F 'u' '{s+=(NF-1)} END {print s}' fin
awk -F 'v' '{s+=(NF-1)} END {print s}' fin
awk -F 'w' '{s+=(NF-1)} END {print s}' fin
awk -F 'x' '{s+=(NF-1)} END {print s}' fin
awk -F 'y' '{s+=(NF-1)} END {print s}' fin
awk -F 'z' '{s+=(NF-1)} END {print s}' fin
awk -F 'A' '{s+=(NF-1)} END {print s}' fin
awk -F 'B' '{s+=(NF-1)} END {print s}' fin
awk -F 'C' '{s+=(NF-1)} END {print s}' fin
awk -F 'D' '{s+=(NF-1)} END {print s}' fin
awk -F 'E' '{s+=(NF-1)} END {print s}' fin
awk -F 'F' '{s+=(NF-1)} END {print s}' fin
awk -F 'G' '{s+=(NF-1)} END {print s}' fin
awk -F 'H' '{s+=(NF-1)} END {print s}' fin
awk -F 'I' '{s+=(NF-1)} END {print s}' fin
awk -F 'J' '{s+=(NF-1)} END {print s}' fin
awk -F 'K' '{s+=(NF-1)} END {print s}' fin
awk -F 'L' '{s+=(NF-1)} END {print s}' fin
awk -F 'M' '{s+=(NF-1)} END {print s}' fin
awk -F 'N' '{s+=(NF-1)} END {print s}' fin
awk -F 'O' '{s+=(NF-1)} END {print s}' fin
awk -F 'P' '{s+=(NF-1)} END {print s}' fin
awk -F 'Q' '{s+=(NF-1)} END {print s}' fin
awk -F 'R' '{s+=(NF-1)} END {print s}' fin
awk -F 'S' '{s+=(NF-1)} END {print s}' fin
awk -F 'T' '{s+=(NF-1)} END {print s}' fin
awk -F 'U' '{s+=(NF-1)} END {print s}' fin
awk -F 'V' '{s+=(NF-1)} END {print s}' fin
awk -F 'W' '{s+=(NF-1)} END {print s}' fin
awk -F 'X' '{s+=(NF-1)} END {print s}' fin
awk -F 'Y' '{s+=(NF-1)} END {print s}' fin
awk -F 'Z' '{s+=(NF-1)} END {print s}' fin
awk -F '0' '{s+=(NF-1)} END {print s}' fin
awk -F '1' '{s+=(NF-1)} END {print s}' fin
awk -F '2' '{s+=(NF-1)} END {print s}' fin
awk -F '3' '{s+=(NF-1)} END {print s}' fin
awk -F '4' '{s+=(NF-1)} END {print s}' fin
awk -F '5' '{s+=(NF-1)} END {print s}' fin
awk -F '6' '{s+=(NF-1)} END {print s}' fin
awk -F '7' '{s+=(NF-1)} END {print s}' fin
awk -F '8' '{s+=(NF-1)} END {print s}' fin
awk -F '9' '{s+=(NF-1)} END {print s}' fin
}  | fold -w 1 | tr -d '\n' | tr -d '  ' > allc
cat allc
echo "    "
echo "----------------------------------------------------------------------------------------------
"
echo " Z's amount"
awk -F '0' '{s+=(NF-1)} END {print s}' allc
echo "   "
cat ord2
rm fin allc
echo " 
"
echo "      ➢  Temp files cleared"
echo "      "
echo "      ➢  Done"
echo "                                                         
                                                                      [Artix community, ⚁ 0⚁ ⚁ ]"
echo " "
exec bash

Re: Sed tr awk substitution problem

Reply #40
Sorry guys for being such a pain in the *** I'm trying now to make my script to get executed from start if Z's amount is greater than 41.

Trying to solve this with the help of if else command.

Need to make it sleep for 20 seconds and start it again tried with this but i'm stuck with the if else syntax. Tnx if else still tnx  :(

I have something like this "sh: line 186: [: “”: integer expression expected" Mostly i doubt about the if else sintax bellow. Script is re-executed as should but it throws that exception thing

Code: [Select]
awk -F '8' '{s+=(NF-1)} END {print s}' fin
awk -F '9' '{s+=(NF-1)} END {print s}' fin
}  | fold -w 1 | tr -d '\n' | tr -d '  ' > allc
cat allc
echo "    "
echo "----------------------------------------------------------------------------------------------
"
echo " Z's amount"
awk -F '0' '{s+=(NF-1)} END {print s}' allc > allct
echo "Z's amount bigger than 41?"
cat allct
if [ “$allct” -le 41 ] ; then
tail --lines=+199 Entangle.sh | sh
else
sleep 7s
tail --lines=+8 Entangle.sh | sh
fi
echo "   "

Re: Sed tr awk substitution problem

Reply #41
The math behind the idea that any more than ONE repetition of a char into a pass is simply bad idea. Math demonstration bellow with 3 examples compared.



But still if we do for all 63 being unique chars will have A(63,63)=1,98×10⁸⁷  meaning those 63 chars already chosen can be arranged in this amount.

The reason someone may think is better to have many repetitions is the total amount being bigger 94^63 compared to A(94,63) but from those 94^63 you really don't wanna know how many of i.e: 1  1 1 1 2 2 2 3 3 3....are out there.

So a pass with repetition has a bigger haystack 94^63 but in itself like taking the above examples has less. For me i don't care i'm taking from a huge beach one grain of sand that looks almost like any other grain of sand instead of taking from a smaller beach a grain of sand that looks very different than any other and nobody will know how the hell would look like. That being said i still think is better to have 0 repetitions but exceptionally for the sake of going into  the  94^63 larger beach at most 1 repetition anything more is prone to guessing. The more repetition the more vulnerable to guessing.

Re: Sed tr awk substitution problem

Reply #42
You can avoid the fin temporary file by capturing it to a variable and echoing it back to each awk.

$() accepts any kind of shell code, no matter how complex it is:

Code: [Select]
FIN=$({
  tr ...
  sleep ...
  tr ...
} | fold | ... | tr)

printf %s "$FIN" | awk ...
printf %s "$FIN" | awk ...

Since you insist calling tr | head once for each character instead of getting them in bulk from /dev/random, at least wrap that logic in a function, preferably using a while loop to reduce the frankly insane amount of copy-pasting happening here. In fact, making the password generator a function will also make it easier to restart it if it doesn't match your strength criteria, without the goto-ish tail | sh.

Since the whole point of the awk-a-mania at the end of the script is knowing how many unique characters are there in the password, you can just call use fold -w1 and sort -u it's output to get a list of unique characters (one per line). Count the lines and you'll know if the password is weak according to that criterion.

Reminder that reading from /dev/random will automatically sleep if entropy is too low, so the herd of sleep commands is kind of pointless.

Re: Sed tr awk substitution problem

Reply #43
Tnx @capezotte i'll look into it to see how i can apply it  :) . Till now with the latest script put it to run in a loop and at the most i got a
rank 10 this in my opinion is the randomness limit. Made one script that simply creates only rank #1 by creating at first a 63 non repeating string shuf into a 62, shuf again that 63 and extract only 1 and put them back together that gives exactly only 1 repetition in each and every string produced. It works in a loop with 7 seconds pause in between just need to hit ctr c to quit.

All files + script here

sha256sum
e9a4d0a034f1246dbc2681347e97fd08d5884e45cf1ae7fa9f6d86d7a4768726

 

Re: Sed tr awk substitution problem

Reply #44
Since you insist calling tr | head once for each character instead of getting them in bulk from /dev/random

Nope getting them in bulk will degrade the overall quality of the string. There's a big difference between i.e: forcing 63 numbers extracted at once out of 94 vs 63 extracted one by one out of 94 successively the last method being better avoiding those 1234567 kinda strings. Sleep commands  make processor take short pauses that might bring some more entropy and mix things a bit better slowing it down overall 1 or 2 seconds at max.

Managed till now to generate a so called rank 8 pass. But still the golden standard  is rank #1, #2 or #3 cos here we talk about what's best. When let script run for couple of hours those short sleep time make processor cool down if run into a loop.

About random entropy sleeping when low entropy, i'm not that impressed by it cos i saw two strings starting with the UK (uk )and sometimes chars repeats even 5 or 6 times which literally tells that random entropy is not that brilliant. Each character has 1/94 chances to be chosen each time so when a char appeared 5 times it means it had 1/(94^5)  vs other 1/94  that did not show up at all.