Sign in to follow this  
Followers 0
ausssieautomate

Console Cmd/Putty Query

3 posts in this topic

Hi Guys/Gals,

I would like to record input and output from a console box like CMD or a Telnet session in Putty and then save that to txt file with a date and time.

For example CMD:

ping www.google.com

-- output follows

Any assistance would be much appreciated.

Cheers. :)


Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Something like this?

$output = ""
$test Run(@ComSpec & " /c " & "ping www.google.com", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
While 1
    $output &= StdoutRead($Std)
    If @error Then ExitLoop
Wend

MsgBox(0, "", $output)
Edited by Pain

Share this post


Link to post
Share on other sites

Something like this?

$output = ""
$test Run(@ComSpec & " /c " & "ping www.google.com", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
While 1
    $output &= StdoutRead($Std)
    If @error Then ExitLoop
Wend

MsgBox(0, "", $output)
Looked into those commands, I mean something that can literally pull the data from a console box like Putty, CMD after a serials of commands have been run and save that to a file.

In CMD you can right click on the box and go Edit -> "Select All" then copy a similar rule applies to Putty is there anyway to automate this process rather than just automating mouse clicks.

Cheers


Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0