Sign in to follow this  
Followers 0
Erlend

ControlSend - Send

7 posts in this topic

Hello

i have som problems getting this script to work:

Run("c:\rb3000vpn\plink admin@myip -pw mypwd")
sleep(5000)
send("2")
sleep(5000)
send("{ENTER}")
sleep(5000)
send("3")
sleep(5000)
send("{ENTER}")
sleep(5000)
send("2")
sleep(5000)
send("{ENTER}")
sleep(5000)
send("2")
sleep(5000)
send("{ENTER}")
sleep(5000)
send("4")
sleep(5000)
send("{ENTER}")
sleep(5000)
send("05:00")
sleep(5000)
send("{ENTER}")
sleep(5000)
ProcessClose("plink.exe")

The script works when the user is logged on the workstaion, but not when i locked.

i am now trying to use ControlSend

here is a test script i am curently writing to get the controls right

Run("c:\windows\system32\cmd.exe")
sleep(5000)
ControlSend("C:\WINDOWS\system32\cmd.exe", "", "ConsoleWindowClass", "2")
sleep(5000)
ControlSend("c:\WINDOWS\system32\cmd.exe", "", "ConsoleWindowClass", "{ENTER}")

What is wrong with the script? The cmd windows opens but nothing more hapends.

Share this post


Link to post
Share on other sites



ControlSend("C:\WINDOWS\system32\cmd.exe", "", "ConsoleWindowClass", "2")

try

ControlSend("C:\WINDOWS\system32\cmd.exe", "", "", "2")


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

no, dosen't work.

Share this post


Link to post
Share on other sites

(...)

Run("c:\windows\system32\cmd.exe")
sleep(5000)
ControlSend("C:\WINDOWS\system32\cmd.exe", "", "ConsoleWindowClass", "2")
sleep(5000)
ControlSend("c:\WINDOWS\system32\cmd.exe", "", "ConsoleWindowClass", "{ENTER}")

What is wrong with the script? The cmd windows opens but nothing more hapends.

An MSDOS box has no controls (check it with AutoInfo - ctrl-F6 from Scite). Hence you cannot ControlSend anything to it. Try Send() or look for examples of StdOutWrite() and StdInRead() for more interaction with the dos box.

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

if you dont need Run("c:\windows\system32\cmd.exe") then you can try this

Send("{LWIN} R")
WinWaitActive("Run")
ControlSend("Run", "", "", "cmd")
sleep(100)
ControlSend("Run", "", "", "{enter}")
sleep(5000)
ControlSend("C:\WINDOWS\system32\cmd.exe", "", "", "2")
sleep(5000)
ControlSend("c:\WINDOWS\system32\cmd.exe", "", "", "{ENTER}")

this is working 4 me...

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Hello

I desided to use putty as my terminal client, i have setup a task that runs in a minute on a locked workstation.

i will update this post in a minute :whistle:

Share this post


Link to post
Share on other sites

The change of terminal client solwed the problem.

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