potatoqualitee / tentools

💙 tenable.sc / nessus / acas powershell module
BSD 3-Clause "New" or "Revised" License
39 stars 7 forks source link

Removed YAML code #15

Closed potatoqualitee closed 3 years ago

potatoqualitee commented 3 years ago
      - name: Install filezilla
        run: sudo apt-get install filezilla
      - name: Change password for root so that we can test Set-TenCertificate
        run: |
          docker exec nessus echo -e "0Eff92c0eff92c\n0Eff92c0eff92c" '|' passwd
      - name: Enable ssh within the container for complete testing
        run: |
          # install ssh to test Set-TenCertificate
          docker exec nessus yum install -y openssh-server
          docker exec nessus ssh-keygen -P "" -t rsa -f /etc/ssh/ssh_host_rsa_key
          docker exec nessus ssh-keygen -P "" -t dsa -f /etc/ssh/ssh_host_dsa_key
          docker exec nessus ssh-keygen -P "" -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key
          docker exec nessus ssh-keygen -P "" -t ed25519 -f /etc/ssh/ssh_host_ed25519_key
          docker exec nessus /usr/sbin/sshd -D &
potatoqualitee commented 3 years ago

winscp library does not work on linux

potatoqualitee commented 3 years ago

Removed Pester code

Context "Set-TenCertificate" {
        It -Skip "Sets a Certificate" {
            $cred = New-Object -TypeName PSCredential -ArgumentList "root", (ConvertTo-SecureString -String 0Eff92c0eff92c -AsPlainText -Force)
            Set-TenCertificate -ComputerName localhost -Credential $cred -CertPath /tmp/servercert.pem -KeyPath /tmp/serverkey.pem -AcceptAnyThumbprint -Type Nessus -Verbose
            Restart-TenService
            $cred = New-Object -TypeName PSCredential -ArgumentList "admin", (ConvertTo-SecureString -String admin123 -AsPlainText -Force)
            $splat = @{
                ComputerName    = "localhost"
                Credential      = $cred
                EnableException = $true
                Port            = 8834
            }
            Start-Sleep 3
            Wait-TenServerReady -ComputerName localhost
            (Connect-TenServer @splat).ComputerName | Should -Be "localhost"
        }
    }