mirror of
https://github.com/nmap/nmap.git
synced 2025-12-27 01:49:03 +00:00
Bounce scan: detect no-password-needed logon
This commit is contained in:
@@ -221,6 +221,14 @@ int ftp_anon_connect(struct ftpinfo *ftp) {
|
||||
if (recvbuf[0] == '5')
|
||||
fatal("Your FTP bounce server doesn't like the username \"%s\"", ftp->user);
|
||||
|
||||
if (!strncmp(recvbuf, "230", 3)) {
|
||||
// 230 User logged in
|
||||
// No need to send PASS
|
||||
if (o.verbose)
|
||||
log_write(LOG_STDOUT, "Login credentials accepted by FTP server!\n");
|
||||
ftp->sd = sd;
|
||||
return sd;
|
||||
}
|
||||
Snprintf(command, 511, "PASS %s\r\n", ftp->pass);
|
||||
|
||||
send(sd, command, strlen(command), 0);
|
||||
|
||||
Reference in New Issue
Block a user