Note to LEAF users on ssh logins
Hummel Tom
tom at bluespice.org
Thu Mar 17 14:48:46 PST 2005
Can anybody tell me what those lines do, or correct me?
if ((str = strstr(buf, "Failed password for root from")) != NULL ||
(str = strstr(buf, "Failed password for admin from")) != NULL
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
in 'str'...
) {
while (*str && (*str < '0' || *str > '9'))
we check if the value to which *str points, is not NULL and not between
0-9 if so...
++str;
we add 1 to str and...
lockout(str);
call lockout() with some address which is now higher (where does it
point to now ?)
continue;
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...."?
tom
More information about the Users
mailing list