Skip to content

PowerShellHistory Exception #70

@leechristensen

Description

@leechristensen

Describe the bug
PowerShellHistory was failing with the following error:

ERROR:   [!] Terminating exception running command 'PowerShellHistory': System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex
   at System.String.Substring(Int32 startIndex, Int32 length)
   at Windows.PowerShellHistoryCommand.<Execute>d__10.MoveNext()
   at Runtime.ExecuteCommand(CommandBase command, String[] commandArgs)

Not sure what was causing it and don't have the ConsoleHost_history.txt to troubleshoot

To Reproduce
Run Seatbelt.exe -q PowerShellHistory

Expected behavior
For the command to run and no errors be thrown

Observed behavior
An exception was thrown due to string parsing bugs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions