Closed luto closed 6 years ago
Hi, thanks for raising (and hello to a fellow Austrian, though I'm also British!). I think it's already designed not to match 'last login' (hence the [^t] before the login). I think it's matching the 'failed login:' item. I've made and released a change to not match the 'failed login' part which should do the trick.
Out of interest, what is your use case? Maybe I can help in other ways.
release 1.0.34
Out of interest, what is your use case? Maybe I can help in other ways.
Infrastructure testing :) We setup up servers/containers with different services and then add quite detailed tests, that they actually work.
Hi, thanks for raising (and hello to a fellow Austrian, though I'm also British!).
hey there! if you every stop by or live in Vienna, drop me an email :)
hence the [^t] before the login
hah, my 2am-brain auto-corrected that to [^\t]
for hours m)
The fix works like a charm, thank you! :)
Sicherlich! No problem - so how did you come across shutit and what are you using it for?
When a SSH server outputs something like this for each login ...
... the following quite simple code ...
... crashes shutit because the regex
r'[^t] login:'
matchesLast login: Sat Nov
, which causes that line to be interpreted as a password prompt. It then proceeds to send the server a password (None
in my case). This causes it to crash:A quick google search gave me lots of SSH servers asking
login as:
for a username, but notlogin:
. Can you tell me how the actual line that should match the regex looks, so I can make it a little more strict?