DX Script Help!!!
Arrrg!
from
WinCustomize Forums
EDIT: OK, I can get a command to execute. I can click on an object and ping an ip address, so long as I have the IP addr hard-coded.
So now I must try to accomplish the following:
1) Be able to write to a (local) file a new IP address. - EDIT:DONE!
2) Read in the file and put the contents EDIT:DONE! (but not the dropdown stuff) in a drop down (list) box (would this be done as an array?)
3) Be able to select that IP addr from the drop downbox (which would then set the value of that dropdown box's variable to the selected IP addr, which I guess would eliminate the need for an array, really)
4) Take the current variable value from the drop down box (the selected IP addr) and pass that to the commandline.
5) Get the output from the cmd.exe console and pipe it (hopefully) in realtime to a textwindow
6) Once finished, a Button on the object should kill the console box (cmd.exe)
I think step 4 should be simple enough. Something like:
objShell.run "telnet" & DesktopX.ScriptObject("IPAddr").SelectedIP & DesktopX.ScriptObject("port").SelectedPort, 0, True
to run comething like
telnet 127.0.0.1 25
(assuming the IP addr & port are in the seperate objects "IPAddr" and "port").
Basically I am trying to make something like this:
http://www.wap.org/journal/security3/portscansm.jpg
by using DX and the commandline.
END EDIT
OK, I need help. I am new to scripting w/ DX & VBScript, etc. I can't seem to get this to work...
I want an object with a drop-down box. The drop down box should have a list of IP addrs. I want an "Add host" button that I can click on, enter in an IP, and that IP is added to the list in the drop down box.
I then want another drop downbox that has various commands in it (say ping, netstat, etc. - commandline stuff).
My object is to CLick "add" and put in an ip addr which is then added to the dropdown box (lets say 10.1.1.1). I select an ip from the drop down box. Then in the next drop down box I select something like Ping. I click on the "Go" button.
In the background the app runs the command
ping 10.1.1.1
Then the output of this command is dumped to a textbox for display.
When I am done, I can then click on a "FINISHED!" button that will kill the process (the ping process), and then clear the display box.
Then if I wanted to run something like netstat I could select "None" from the dropdown list, and the command netstat and it would run
netstat -a
and dump the output to the textbox. Alternately I could not have the none, and just set it so that when I choose netstat from the command, it does not utilize the IP addr variable in the commandline at all.
If you are familiar with the MAC OSX network panel where you can fill in an IP and click on the ping or traceroute, etc. buttons and it shows you the results in the window, you have a really good idea of what I am trying to build.
If this requires writing to and reading from an .ini file of sorts, that is fine. I want to ultimately package this up as a DXPro Gadget so I can use it at home & at work, etc.
Any help with this would be greatly appreciated.
I have looked at a number of Objects & downloaded them. Either I am too clueless to figure it out, or something, cause nothing is really helping. If anyone can point me in the right direction I would be grateful. I am definitely a n00b, so a handholding site would be nice.
Yes, I looked through the DX scripting reference, etc. Didn't help.
I am stuck!
Thanks,
Brain21
So now I must try to accomplish the following:
1) Be able to write to a (local) file a new IP address. - EDIT:DONE!
2) Read in the file and put the contents EDIT:DONE! (but not the dropdown stuff) in a drop down (list) box (would this be done as an array?)
3) Be able to select that IP addr from the drop downbox (which would then set the value of that dropdown box's variable to the selected IP addr, which I guess would eliminate the need for an array, really)
4) Take the current variable value from the drop down box (the selected IP addr) and pass that to the commandline.
5) Get the output from the cmd.exe console and pipe it (hopefully) in realtime to a textwindow
6) Once finished, a Button on the object should kill the console box (cmd.exe)
I think step 4 should be simple enough. Something like:
objShell.run "telnet" & DesktopX.ScriptObject("IPAddr").SelectedIP & DesktopX.ScriptObject("port").SelectedPort, 0, True
to run comething like
telnet 127.0.0.1 25
(assuming the IP addr & port are in the seperate objects "IPAddr" and "port").
Basically I am trying to make something like this:
http://www.wap.org/journal/security3/portscansm.jpg
by using DX and the commandline.
END EDIT
OK, I need help. I am new to scripting w/ DX & VBScript, etc. I can't seem to get this to work...
I want an object with a drop-down box. The drop down box should have a list of IP addrs. I want an "Add host" button that I can click on, enter in an IP, and that IP is added to the list in the drop down box.
I then want another drop downbox that has various commands in it (say ping, netstat, etc. - commandline stuff).
My object is to CLick "add" and put in an ip addr which is then added to the dropdown box (lets say 10.1.1.1). I select an ip from the drop down box. Then in the next drop down box I select something like Ping. I click on the "Go" button.
In the background the app runs the command
ping 10.1.1.1
Then the output of this command is dumped to a textbox for display.
When I am done, I can then click on a "FINISHED!" button that will kill the process (the ping process), and then clear the display box.
Then if I wanted to run something like netstat I could select "None" from the dropdown list, and the command netstat and it would run
netstat -a
and dump the output to the textbox. Alternately I could not have the none, and just set it so that when I choose netstat from the command, it does not utilize the IP addr variable in the commandline at all.
If you are familiar with the MAC OSX network panel where you can fill in an IP and click on the ping or traceroute, etc. buttons and it shows you the results in the window, you have a really good idea of what I am trying to build.
If this requires writing to and reading from an .ini file of sorts, that is fine. I want to ultimately package this up as a DXPro Gadget so I can use it at home & at work, etc.
Any help with this would be greatly appreciated.
I have looked at a number of Objects & downloaded them. Either I am too clueless to figure it out, or something, cause nothing is really helping. If anyone can point me in the right direction I would be grateful. I am definitely a n00b, so a handholding site would be nice.
Yes, I looked through the DX scripting reference, etc. Didn't help.
I am stuck!

Thanks,
Brain21