Flow Control - Introduction to Bash Scripting

Could someone help!!!
When running the decrypt function it gives the following report:

#######################
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
bad decrypt
40C782E43A7F0000:error:1C800064:Provider routines:ossl_cipher_unpadblock:bad decrypt:…/providers/implementations/ciphers/ciphercommon_block.c:124:
########################

Thanks in advance

Because i’m not a great at bash yet, because its super convenient and most importantly because i found that several scripts have typo or are not properly written in some modules…

I use chatGPT to fix any issues i come across with scripting, it has saved me a bunch… but make sure you are learning while using as well. That way you can fix issues without its help once you get better at it.

Thanks for the TIP!

Yes chatGPT is taking over. Luckily managed to solve the problem without it! Turns out and I don´t know why: ${#var} and “echo $var | wc -c” returns different results, I thought both would return the length of the variable!

Thanks again!

1 Like

yes it is! Its a good tool especially for learning. I’m taking the CBBH coure and theres been several time where i didn’t understand something and / or it wasn’t well explained…such a “complex” payload. So i’ll take what i need more explanation about and ask chatgpt to break it down for me… So many uses of this tool. I know alot of people will be lazy and have it do all the work but for someone truly wanting to learn, its like having your own instructor / mentor if you know how to ask it correctly.

1 Like

Good evening! I`m having a tough time with this section!

var=“9M”
hash=“VTJGc2RHVmtYMTl2ZnYyNTdUeERVRnBtQWVGNmFWWVUySG1wTXNmRi9rQT0K”
salt=“”

for i in {1…28}; do
var=$(echo $var | base64)
if [ $i -eq 28 ]; then
salt=${#var}
fi
done

echo “salt: $salt”

I used Chat GPT as well and been reading many posts but I still don`t get the right answer…