DragonFly users List (threaded) for 2005-03
Re: Note to LEAF users on ssh logins
Can anybody tell me what those lines do, or correct me?
If we find one of those strings in the line that 'buf' gives us, and the
address of the where this string is beginning is successfully stored
if ((str = strstr(buf, "Failed password for root from")) != NULL ||
(str = strstr(buf, "Failed password for admin from")) != NULL
we check if the value to which *str points, is not NULL and not between
0-9 if so...
while (*str && (*str < '0' || *str > '9'))
we add 1 to str and...
call lockout() with some address which is now higher (where does it
point to now ?)
if not we leave the while-loop.
what does str really contain? I'm afraid i understand it completely wrong.
str should point to the beginning of the string we were looking for
with strstr(), thus using str, cannot let me do something which located
before the occurrence of "Failed...."?