12-20-2013 12:08 PM
12-20-2013 01:50 PM
12-22-2013 12:16 PM
#!/usr/bin/env python
import pexpect #
child = pexpect.spawn ('ssh 192.168.1.10')
child.expect ('Please login:')
child.sendline ('myuserid)
child.expect ('password :')
child.sendline ('mypassword')
child.expect ('rkscli:') # the normal AP prompt
child.sendline ('get syslog log')
print child.before #this object refers to the output of the last child call
child.interact() #puts me on the AP CLI
01-08-2014 08:02 PM
09-04-2014 08:55 AM