Skip to content

Nessus File Format Change? #11

Description

@LarryLambert

Running in debug, here is the error we get:

PS C:\inetpub\scans> C:\Scripts\Nessus_Schedule.ps1
DEBUG: NessusFilePath: \ZZZ\nessus\6923.nessus
DEBUG: CustomerName: ZZZ
DEBUG: Current Dir: C:\inetpub\scans
DEBUG: TemplatePath: C:\Scripts\vcr-master\template-networkscan
DEBUG: NewFolderPath: C:\inetpub\scans\ZZZ-20191231021514
[] Performing PreReq Checks...
[
] Parsing Nessus File (could take a while)...
DEBUG: Parse-NessusFile: Entered Parse-NessusFile
DEBUG: Parse-NessusFile: Successfully loaded xml into memory
Exception calling "ContainsKey" with "1" argument(s): "Key cannot be null.
Parameter name: key"
At C:\Scripts\vcr-master\Parse-Nessus.ps1:935 char:6

  • if ($vulnnames.ContainsKey($vulnname) -eq $false)
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : ArgumentNullException

Line 935 of the script:

#region NESSUS FILE PARSING

function Update-UniqueVulns($vulnname, $criticality)
{
if ($vulnnames.ContainsKey($vulnname) -eq $false)
{
$script:vulnnames.Add($vulnname, $criticality)
Write-Debug "Update-UniqueVulns: Added uniqe vulnn to $ vulnnames: $vulnname"
}
}

Something in the format of the Nessus file changed so $vulnname variable is returning null.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions