When i want to dump my privkey i have to put in my password but why is it visible and not hidden by asterisk?
In what software? Bitcoin Core?
If you are talking about Bitcoin Core, the password is hidden once it is entered. It is not shown in the history. If you are talking about why it shows when you are typing the walletpassphrase command, that is because the console does not know what is your password and what isn't as it does not interpret whatever is written in that box. It only interprets once the command is entered.