파이썬 모듈 썸네일형 리스트형 Pxssh로 SSH 패스워드 공격 pxssh로 ssh에 접속하기Pxssh는 pexpect 라이브러리에 있는 특화된 스트립트이다.SSH 세션과 직접 연동할 수 있는 기능이 있으며 login(), logout(), prompt() 같이 이미 딕셔너리에 정의된 메소드도 있다. import pxssh def send_command(s, cmd): s.sendline(cmd) s.prompt() print s.before def connect(host, user, password): try: s = pxssh.pxssh() s.login(host, user, password) return s except: print '[-] Error Connecting' exit(0) s = connect('127.0.0.1', 'root', 'toor') s.. 더보기 이전 1 다음