vcr icon indicating copy to clipboard operation
vcr copied to clipboard

Nessus File Format Change?

Open LarryLambert opened this issue 5 years ago • 0 comments

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.

LarryLambert avatar Dec 31 '19 19:12 LarryLambert