Jump to content

ControlSend - Send


Recommended Posts

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.

Link to comment
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.

 
Link to comment
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.

Link to comment
Share on other sites

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.

 
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...