-
Notifications
You must be signed in to change notification settings - Fork 89
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Output Decolorizer/No color option #36
Comments
Thanks for the feedback! It smells a bit funny to have to do text processing; one of the big advantages of doing stuff in Powershell/DbgShell is that you can have objects, not strings. That said, I understand sometimes it's necessary to interop with something, or even just have a way to simply persist a lot of intermediate results. So: There is code in DbgShell that will do it: Get-Content Candidates.log | `
Read-DbgMemory -LengthInBytes 4 | `
Out-String -Stream | `
%{ [MS.Dbg.ColorString]::StripPrerenderedColor( $_ ) } | `
Out-File Values.txt So then the question is: how to make it more discoverable? Perhaps a cmdlet/function to wrap that method... but what should the noun be? Were there any command names that you searched for (but didn't find)? |
BTW... I assume you are/were attached to a 32-bit target, because I noticed a bug with Did you want the ascii in your output? If not, you can tell it what you want the display format to be. Ex: And another point about this... another way you could not even go through Get-Content Candidates.log | `
Read-DbgMemory -LengthInBytes 4 | `
%{ $_.StartAddress.ToString( "x" ) + " " + $_.DWords[ 0 ].ToString( "x" ) } | `
Out-File Values.txt |
Funny thing about the PointersWithAscii... I successfully ran it twice without any Ascii characters in it, then today I ran it again and they showed up. And I just realized why.... |
Yeah, sorry about the memory command stickiness. It was intended to model the same experience as windbg, but in hindsight, perhaps the "stickiness" part could have been done just for the windbg-like commands ( For the new command, I decided to have it both ways--I named the function The issue with Thanks again for contributing! |
I'm searching for... something in a haystack. I don't even know what exactly the something is yet. I've got a memory dump, and a million candidate addresses in a file; I want to read the value for each from the dump and analyze the results.
Get-Content Candidates.log | Read-DbgMemory -LengthInBytes 4 | Out-String -Stream | Out-File Values.txt
gets me almost all of the way there - except that the output is crammed full of formatting control characters. An option to print things without formatting, or strip the control strings out, would be very helpful for this.The text was updated successfully, but these errors were encountered: