Good Morning;
Consider the following NASL code fragment:
*
*
*
open_sock_tcp(smtp_port); # port 25
if( !soc )
display("Dead socket!\n");
# Reference 1
data = recv(socket: soc, length: 2048, timeout:20);
display(data);
# Reference 2
send(socket:soc, data: string("HELO Mydomain.com"+'\n'));
data = recv(socket: soc, length: 2048, timeout:20);
display(data);
*
*
*
Now, it works fine against a Sendmail server; however, when I run it
against an ESMTP server (Win 2K is the test server), the code acheives
"Reference 1" and displays the login banner. When I get to "Reference 2",
the socket is as dead as a post.
I can telnet to the server and issue the "HELO" just fine. I can also
configure a client such as Evolution and it works perfectly. When I
inspect the server log, I see that the NASL script's connection was
established followed by an immediate "QUIT" that I didn't send. The
"recv" following "Reference 2" times out and no data are displayed.
I don't know where to begin looking for a solution. My guess is that the
Win 2K ESMTP server may be detecting the client and closing if it's
unrecognized. (???)
Steven W. Smith
Del Mar College,
Corpus Christi, TX
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers
Consider the following NASL code fragment:
*
*
*
open_sock_tcp(smtp_port); # port 25
if( !soc )
display("Dead socket!\n");
# Reference 1
data = recv(socket: soc, length: 2048, timeout:20);
display(data);
# Reference 2
send(socket:soc, data: string("HELO Mydomain.com"+'\n'));
data = recv(socket: soc, length: 2048, timeout:20);
display(data);
*
*
*
Now, it works fine against a Sendmail server; however, when I run it
against an ESMTP server (Win 2K is the test server), the code acheives
"Reference 1" and displays the login banner. When I get to "Reference 2",
the socket is as dead as a post.
I can telnet to the server and issue the "HELO" just fine. I can also
configure a client such as Evolution and it works perfectly. When I
inspect the server log, I see that the NASL script's connection was
established followed by an immediate "QUIT" that I didn't send. The
"recv" following "Reference 2" times out and no data are displayed.
I don't know where to begin looking for a solution. My guess is that the
Win 2K ESMTP server may be detecting the client and closing if it's
unrecognized. (???)
Steven W. Smith
Del Mar College,
Corpus Christi, TX
_______________________________________________
Plugins-writers mailing list
Plugins-writers@list.nessus.org
http://mail.nessus.org/mailman/listinfo/plugins-writers