Python , bash or any other language for scripting

Should I learn python , bash or any other language for scripting ?

knowing both is very useful

The advantage of bash is that it is slightly more likely to be available on Linux/Unix machines but these days, Python is pretty much as universal.

I’d recommend Python because it lets you branch out a lot more. Specifically, you can write your own tools in it and use it for network programming etc. Additionally, it’s good if you ever want to go into a different direction especially for web development or machine learning.
Personally, I find bash scripting quite painful and Python much nicer.

Even if you just pick one of them for writing code, you should be able to read both. Reading bash scripts is probably more valuable (and harder) than reading Python code from a exploiting boxes point of view.