• f

    fritz

    3 years ago
    @R0n I wonder if you could create an augeas lens to parse:
    %userprofile%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt
  • r

    R0n

    3 years ago
    is there something to pull what is in the file?
  • like the etc_hosts
  • 8p8c

    8p8c

    3 years ago
    What do you mean by pull, R0n?
  • r

    R0n

    3 years ago
    i meant get the content from the file
  • 8p8c

    8p8c

    3 years ago
    The only two ways i know to pull content from a file like this is either a custom extension (probably simple to write, allows safely dropping privileges) OR an augeas lens and a query. In my opinion writing an extension is simpler - at least I haven’t yet grokked how the language behind augeas works, and I don’t know how it handles untrusted input from a file like this.
  • r

    R0n

    3 years ago
    something like this
  • ?
  • 8p8c

    8p8c

    3 years ago
    Yea, sort of - depends on if your aim is to include it in the core or as an extension. I’m not the gate keeper but my understanding is that one off files like this make more sense as an extension, but if this is very useful for wide userbase then it can be included in the core.
  • r

    R0n

    3 years ago
    yes, it would make more sense as an extension/plugin . i'll try to find information about extensions and how to implement them
  • 8p8c

    8p8c

    3 years ago
  • r

    R0n

    3 years ago
    👍 thank you