-1

here is my code

#!/usr/bin/env python
import pexpect

obj=pexpect.spawn('ftp localhost')
print id.expect_exact('Name')

i am using kali linux and have also installed pexpect.i m also running an vsftpd ftp server.This is the error thats comes up when i run my program

Traceback (most recent call last):
  File "./last.py", line 2, in <module>
    import pexpect
  File "/root/pexpect.py", line 3, in <module>
    id=pexpect.spawn('ftp localhost')
AttributeError: 'module' object has no attribute 'spawn'
ywbaek
  • 2,971
  • 3
  • 9
  • 28

1 Answers1

0

You're also using filename pexpect.py in /root folder.

vasste
  • 11