SpecialAttack.net https://forum.specialattack.net/ |
|
vbs scripting https://forum.specialattack.net/viewtopic.php?t=8762 |
Page 1 of 1 |
Author: | [SpA]SaintK [ 22 Nov 2010, 15:42 ] |
Post subject: | vbs scripting |
Anyone here with decent knowledge on vbs scripting? If you, could you explain me a thing or 2 in a private confo? |
Author: | [SpA]Frosty [ 22 Nov 2010, 16:46 ] |
Post subject: | Re: vbs scripting |
You talking about vbscript? As is document.write("this stuff"); |
Author: | [SpA]SaintK [ 22 Nov 2010, 17:24 ] |
Post subject: | Re: vbs scripting |
Its this: Quote:
# $language = "VBScript"
I made this today to semi-automate a reset cycle we need to perform due to some software bug. Pretty much what i want to do is replace the IP promt for a list with dropdown options but i can't find any example code to steal from.
# $interface = "1.0" ' script version = 0.3 ' set delay timer g_nDelay = 1000 Sub Main Dim host host = crt.Dialog.Prompt("Enter IP address", "IP", "", False) Dim user user = "xxxx" Dim passwd passwd = "xxxx" Dim interface interface = crt.Dialog.Prompt("Enter interface", "Interface", "", False) ' Build a command-line string to pass to the Connect method. ' cmd = "/SSH2 /L " & user & " /PASSWORD " & passwd & " /C 3DES /M MD5 " & host crt.Session.Connect cmd crt.Screen.WaitForString "Press any key to continue" crt.screen.Send Chr(10) crt.Screen.Send "conf t" & vbCr crt.Screen.WaitForString "(config)#" crt.Screen.Send "no aaa port-access mac-based " & interface & vbCr crt.Screen.WaitForString "(config)#" crt.Screen.Send "interface " & interface & vbCr crt.Screen.WaitForString "(eth-" crt.Screen.Send "disable" & vbCr crt.Screen.WaitForString "(eth-" crt.Sleep g_nDelay crt.Screen.Send "enable" & vbCr crt.Screen.WaitForString "(eth-" crt.Screen.Send "exit" & vbCr crt.Screen.WaitForString "(config)#" crt.Screen.Send "aaa port-access mac-based " & interface & vbCr crt.Screen.WaitForString "(config)#" crt.Screen.Send "exit" & vbCr crt.Screen.WaitForString "#" crt.Screen.Send "sh port-access mac-based " & interface & vbCr crt.Screen.WaitForString "#" crt.Screen.Send "repeat" & vbCr crt.Screen.WaitForString "1 0" crt.Screen.Send Chr(10) crt.Screen.Send "sh mac " & interface End Sub |
Author: | Planitia [ 25 Dec 2010, 05:05 ] |
Post subject: | Re: vbs scripting |
I know Visual Basic and if you mean .bat file VBScript i may be able to help. |
Author: | dckjns [ 25 Dec 2010, 10:53 ] |
Post subject: | Re: vbs scripting |
Planitia wrote: I know Visual Basic
Judging by the date of the topic, he probably has this fixed by now. and if you mean .bat file VBScript i may be able to help. ![]() And I'm fairly sure it doesn't come with any controls bar the confirmation and message box (wrap something around it?) |
Page 1 of 1 | All times are UTC+02:00 |
Powered by phpBB® Forum Software © phpBB Limited |