2021-06-04 09:56:51
However, before all that can happen, we need to use the
expect part of the script, where we are looking for something that is basically coming to us and typing the string
assword. That's funny, but there's a reason we do that. If it is a capital "P" or a lowercase "p," it really doesn't matter depending on what server it is. It's always going to ask us for a password. So unless it's in all caps, which is a little bit less probable, then we're likely to get most of the different ways of asking us for a password.
So what the script is doing is expecting a request, or a text string, to say "password" or "Password." If it gets that, then it goes ahead and sends the result, which, in our case, is the password the user typed way back at our Bash script. The
interact line puts the whole script into play.
@hackersworldunite
144 views06:56