Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powershell history bug? #416

Open
emizzz opened this issue Feb 23, 2024 · 1 comment
Open

Powershell history bug? #416

emizzz opened this issue Feb 23, 2024 · 1 comment

Comments

@emizzz
Copy link

emizzz commented Feb 23, 2024

Hi 馃憢

regarding reading the Powershell history, why filter the results for the string "pa"?

Write-Host "=|| PowerShell Console History"
Write-Host "=|| To see all history, run this command: Get-Content (Get-PSReadlineOption).HistorySavePath"
Write-Host $(Get-Content (Get-PSReadLineOption).HistorySavePath | Select-String pa)

Is this a bug or "pa" stands for "password, "passwd", ... ?

What about using something like this?

$(Get-Content (Get-PSReadLineOption).HistorySavePath  -Tail 10)

Or maybe something that contains more than one keyword (e.g. secret, pass, pwd, ...)?

Thanks 馃檹




@RandolphConley

@RandolphConley
Copy link
Contributor

The reason it looks for "pa" is to not rule out the iterations of "password". This of course can generate false positives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants