1
0
-1

ubuntu server 20.4 install openaudit 4.1.2

Cannot discover the device by executing the script

Run cscript audit_windows.vbs  192.168.xxx.xxx submit_online=y ping_target=y debugging=5 

The error message is displayed as follows  (Windows audit script Version: 3.5.0)

------------------------------------------------------------------------------------------------------

audit_windows.vbs (3500, 33) Microsoft VBScript runtime error: array index out of range:'[number: 1]'

    CommentAdd your comment...

    3 answers

    1.  
      1
      0
      -1

      You can patch this now or wait for our next release.

      Old

                  strCommand = "net user " & objItem.Name
                  On Error Resume Next
                  set objExecObject = objShell.Exec(strCommand)
                  On Error GoTo 0
                  if IsObject(objExecObject) then
                      do While Not objExecObject.StdOut.AtEndOfStream
                          strResults = objExecObject.StdOut.ReadAll()
                      Loop
                      MyArray = Split(strResults, vbcrlf)
                      if isArray(MyArray) then
                          for each line in MyArray
                              if line > "" then
                                  split_space = split(line)
                                  if (isarray(split_space)) then
                                      if (split_space(0) = "Password" and split_space(1) = "last" and split_space(2) = "set") then
                                          split_space(0) = ""
                                          split_space(1) = ""
                                          split_space(2) = ""
                                          user_password_last_changed = trim(join(split_space))
                                      end if
                                  end if
                              end if
                          next
                      end if
                  end if

      New

                  strCommand = "net user " & objItem.Name
                  On Error Resume Next
                  set objExecObject = objShell.Exec(strCommand)
                  On Error GoTo 0
                  if IsObject(objExecObject) then
                      do While Not objExecObject.StdOut.AtEndOfStream
                          strResults = objExecObject.StdOut.ReadAll()
                      Loop
                      MyArray = Split(strResults, vbcrlf)
                      if isArray(MyArray) then
                          for each line in MyArray
                              if line > "" then
                                  if InStr(line, "Password last set") then
                                      user_password_last_changed = trim(replace(line, "Password last set", ""))
                                  end if
                              end if
                          next
                      end if
                  end if
        CommentAdd your comment...
      1.  
        1
        0
        -1

        Looks like a bug.

        I would comment out lines 3500 → 3505 for now. I'll get a patch worked up ASAP.

        Comment out the below.

                                        if (split_space(0) = "Password" and split_space(1) = "last" and split_space(2) = "set") then
                                            split_space(0) = ""
                                            split_space(1) = ""
                                            split_space(2) = ""
                                            user_password_last_changed = trim(join(split_space))
                                        end if
          CommentAdd your comment...