Example #1
0
    def usersList(self):
        nessusConverter = NessusConverter(self.nessusClient.usersList())
        nessusConverter.userToStructure()

        print "[*] User List"
        tableUsers = PrettyTable(["Name", "Admin", "Idx", "Last-Login"])
        tableUsers.padding_width = 1
        for nessusUser in nessusConverter.nessusStructure.nessusUsers:
            tableUsers.add_row([nessusUser.name,nessusUser.admin,nessusUser.idx,nessusUser.lastLogin])
        print tableUsers
Example #2
0
    def userDelete(self, userName):
        nessusConverter = NessusConverter(self.nessusClient.usersDelete(userName))
        nessusConverter.userToStructure()

        print "[*] User Removed"
        tableUsers = PrettyTable(["Name", "Admin", "Idx", "Last-Login"])
        tableUsers.padding_width = 1
        tableUsers.add_row([nessusConverter.nessusStructure.nessusUser.name,
                            nessusConverter.nessusStructure.nessusUser.admin,
                            nessusConverter.nessusStructure.nessusUser.idx,
                            nessusConverter.nessusStructure.nessusUser.lastLogin])
        print tableUsers
Example #3
0
    def userChpasswd(self, userName, password):
        nessusConverter = NessusConverter(self.nessusClient.usersChpasswd(userName,password))
        nessusConverter.userToStructure()

        print "[*] User Password Changed"
        tableUsers = PrettyTable(["Name", "Admin", "Idx", "Last-Login"])
        tableUsers.padding_width = 1
        tableUsers.add_row([nessusConverter.nessusStructure.nessusUser.name,
                            nessusConverter.nessusStructure.nessusUser.admin,
                            nessusConverter.nessusStructure.nessusUser.idx,
                            nessusConverter.nessusStructure.nessusUser.lastLogin])
        print tableUsers
Example #4
0
    def usersList(self):
        nessusConverter = NessusConverter(self.nessusClient.usersList())
        nessusConverter.userToStructure()

        print "[*] User List"
        tableUsers = PrettyTable(["Name", "Admin", "Idx", "Last-Login"])
        tableUsers.padding_width = 1
        for nessusUser in nessusConverter.nessusStructure.nessusUsers:
            tableUsers.add_row([
                nessusUser.name, nessusUser.admin, nessusUser.idx,
                nessusUser.lastLogin
            ])
        print tableUsers
Example #5
0
    def userEdit(self, userName, password, admin=1):
        administrator = False
        if admin == 1:
            administrator = True
        nessusConverter = NessusConverter(self.nessusClient.usersEdit(userName,password,administrator))
        nessusConverter.userToStructure()

        print "[*] User Edited"
        tableUsers = PrettyTable(["Name", "Admin", "Idx", "Last-Login"])
        tableUsers.padding_width = 1
        tableUsers.add_row([nessusConverter.nessusStructure.nessusUser.name,
                            nessusConverter.nessusStructure.nessusUser.admin,
                            nessusConverter.nessusStructure.nessusUser.idx,
                            nessusConverter.nessusStructure.nessusUser.lastLogin])
        print tableUsers
Example #6
0
    def userChpasswd(self, userName, password):
        nessusConverter = NessusConverter(
            self.nessusClient.usersChpasswd(userName, password))
        nessusConverter.userToStructure()

        print "[*] User Password Changed"
        tableUsers = PrettyTable(["Name", "Admin", "Idx", "Last-Login"])
        tableUsers.padding_width = 1
        tableUsers.add_row([
            nessusConverter.nessusStructure.nessusUser.name,
            nessusConverter.nessusStructure.nessusUser.admin,
            nessusConverter.nessusStructure.nessusUser.idx,
            nessusConverter.nessusStructure.nessusUser.lastLogin
        ])
        print tableUsers
Example #7
0
    def userDelete(self, userName):
        nessusConverter = NessusConverter(
            self.nessusClient.usersDelete(userName))
        nessusConverter.userToStructure()

        print "[*] User Removed"
        tableUsers = PrettyTable(["Name", "Admin", "Idx", "Last-Login"])
        tableUsers.padding_width = 1
        tableUsers.add_row([
            nessusConverter.nessusStructure.nessusUser.name,
            nessusConverter.nessusStructure.nessusUser.admin,
            nessusConverter.nessusStructure.nessusUser.idx,
            nessusConverter.nessusStructure.nessusUser.lastLogin
        ])
        print tableUsers
Example #8
0
    def userEdit(self, userName, password, admin=1):
        administrator = False
        if admin == 1:
            administrator = True
        nessusConverter = NessusConverter(
            self.nessusClient.usersEdit(userName, password, administrator))
        nessusConverter.userToStructure()

        print "[*] User Edited"
        tableUsers = PrettyTable(["Name", "Admin", "Idx", "Last-Login"])
        tableUsers.padding_width = 1
        tableUsers.add_row([
            nessusConverter.nessusStructure.nessusUser.name,
            nessusConverter.nessusStructure.nessusUser.admin,
            nessusConverter.nessusStructure.nessusUser.idx,
            nessusConverter.nessusStructure.nessusUser.lastLogin
        ])
        print tableUsers