mirror of
https://github.com/EnergyMech/energymech.git
synced 2025-12-29 16:14:43 +00:00
rand command, beginning netcfg, consolidated some .c files
This commit is contained in:
22
src/net.c
22
src/net.c
@@ -1225,17 +1225,21 @@ void botnet_parse(BotNet *bn, char *rest)
|
||||
#ifdef TELNET
|
||||
if (bn->status == BN_UNKNOWN)
|
||||
{
|
||||
if (!stringcmp(rest,telnetprompt))
|
||||
if (!stringcmp(rest,telnetprompt)) // another bot sent me its telnetprompt
|
||||
return;
|
||||
if (*rest != 'B')
|
||||
#ifdef NETCFG
|
||||
if (strncmp(rest,"netcfg ",7) == 0)
|
||||
{
|
||||
if (check_telnet(bn->sock,rest))
|
||||
{
|
||||
bn->sock = -1;
|
||||
bn->status = BN_DEAD;
|
||||
deadlinks = TRUE;
|
||||
return;
|
||||
}
|
||||
goto not_a_botnet_connection;
|
||||
}
|
||||
#endif /* NETCFG */
|
||||
if (check_telnet(bn->sock,rest))
|
||||
{
|
||||
not_a_botnet_connection:
|
||||
bn->sock = -1;
|
||||
bn->status = BN_DEAD;
|
||||
deadlinks = TRUE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif /* TELNET */
|
||||
|
||||
Reference in New Issue
Block a user