To test the script I recommend you the virtual machine "metasploitable 2" available here. The script will display a reverse shell if the exploit works.
# Linux
$ python3 exploit.py 192.168.1.35 21
$ python3 exploit.py 192.168.1.35
# Windows
$ py exploit.py 192.168.1.35 21
$ py exploit.py 192.168.1.35
Result :
- socket
- platform
- sys
- os