def test_SSH_password(): cred = credentials.SshPassword(username="******", password="******") assert cred.__dict__ == {'auth_method': 'password', 'elevate_privileges_with': 'Nothing', 'username': '******', 'password': '******'} assert cred.category == "Host" assert cred.name == "SSH"
def test_SSH_Cisco_escalation(): cred = credentials.SshPassword(username="******", password="******") \ .cisco_enable("pass2") assert cred.__dict__ == {'auth_method': 'password', 'elevate_privileges_with': "Cisco 'enable'", 'escalation_password': '******', 'password': '******', 'username': '******'} assert cred.category == "Host" assert cred.name == "SSH"
def test_SSH_sudo_escalation(): cred = credentials.SshPassword(username="******", password="******") \ .sudo(username="******", password="******") assert cred.__dict__ == {'auth_method': 'password', 'elevate_privileges_with': 'sudo', 'escalation_password': '******', 'escalation_account': 'nessus', 'password': '******', 'username': '******'} assert cred.category == "Host" assert cred.name == "SSH"