Skip to content

Capture Powerscript output for parsing? #10

@MichaelQuaMan

Description

@MichaelQuaMan

I want to run a powershell command like get-domaincomputer, capture the output, so I can parse the hosts and add them to Cobalt Strike's using the hosts_update API call.

It seems like it sould be pretty easy, but, so far, I've I haven't found a way to do it.

I thought maybe I could create a callback and pass it in bpowershell, via an alias command call, but the callback is auto registered, but never called because the 'name' is set to 'return' after the alias callback is run.

So, far it seems like only official Cobalt Script functions, expecting a call back will accept a callback. (which makes sense).

I would greatly appreciate any advice you may have on the subject,

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions