March 2019
Beginner
490 pages
12h 40m
English
If we capture the FTP session in Wireshark on port 21 of the public network interface, we can see how the communication happens in plaintext. In the following example, we can see that after successfully establishing a connection with a client, the server sends the 230 Welcome to mirror.as35701.net banner message. Following this, the client will anonymously send a request for login.
In this example, we are using the ftplib module to build a script to determine whether a server offers anonymous logins.
You can find the following code in the checkFTPanonymousLogin.py file:
import ftplibdef ftpListDirectory(ftp): try: dirList = ftp.nlst() print(dirList) except: dirList = [] print('[-] Could not list directory ...Read now
Unlock full access