<commit_before>On Error Resume Next
Dim WshShell
set WshShell=CreateObject("WScript.Shell")
WshShell.run "cmd.exe"
WScript.Sleep 50

REM DateInfo = DateInfo & Now & VbCrLf
REM DateInfo = DateInfo & Date & VbCrLf
REM DateInfo = DateInfo & Time & VbCrLf
REM Wscript.Echo DateInfo

' The first parameter determines how the difference will be
' measured in i.e. "S" for seconds.
UnixTime = DateDiff("S", "1/1/1970", Now)
' WScript.Echo UnixTime

' Append epoch time to log file.
TelnetCommand = "telnet 10.0.0.1 23 -f logs\telnet_" & UnixTime & ".log{ENTER}"
' WScript.Echo TelnetCommand

'Send commands to the window as needed - IP and customized commands.
'Step 1 - Telnet to remote IP'
WshShell.SendKeys TelnetCommand
WScript.sleep 1000
WshShell.SendKeys ("admin{ENTER}")
WScript.sleep 500
WshShell.SendKeys ("V<KEY>")
WshShell.SendKeys ("{Enter}")
WScript.sleep 500
'WshShell.SendKeys ("{Enter}")
'WScript.Sleep 500
'Step 2 - Issue Commands with pauses'
WshShell.SendKeys ("{Enter}")
WScript.Sleep 100
WshShell.SendKeys ("sntp date{Enter}")
WScript.Sleep 200
WshShell.SendKeys ("adsl info{Enter}")
WScript.Sleep 2000
'Step 3 - Exit Command Window
WshShell.SendKeys ("logout{Enter}")
WScript.Sleep 100
'WshShell.SendKeys "^]" 'Microsoft Telnet Client. Escape Character is 'CTRL+]'.
'VBScript - SendKeys Method
'http://social.technet.microsoft.com/wiki/contents/articles/5169.vbscript-sendkeys-method.aspx
'WshShell.SendKeys ("quit") 'Quit Microsoft Telnet Client.
WshShell.SendKeys ("{Enter}")
WScript.Sleep 100
WshShell.SendKeys ("exit{Enter}") 'Quit Command Prompt.

WScript.Quit<commit_msg>Add more telnet query commands.<commit_after>On Error Resume Next
Dim WshShell
set WshShell=CreateObject("WScript.Shell")
WshShell.run "cmd.exe"
WScript.Sleep 50

REM DateInfo = DateInfo & Now & VbCrLf
REM DateInfo = DateInfo & Date & VbCrLf
REM DateInfo = DateInfo & Time & VbCrLf
REM Wscript.Echo DateInfo

' The first parameter determines how the difference will be
' measured in i.e. "S" for seconds.
UnixTime = DateDiff("S", "1/1/1970", Now)
' WScript.Echo UnixTime

' Append epoch time to log file.
TelnetCommand = "telnet 10.0.0.1 23 -f logs\telnet_" & UnixTime & ".log{ENTER}"
' WScript.Echo TelnetCommand

'Send commands to the window as needed - IP and customized commands.
'Step 1 - Telnet to remote IP'
WshShell.SendKeys TelnetCommand
WScript.sleep 1000
WshShell.SendKeys ("admin{ENTER}")
WScript.sleep 500
WshShell.SendKeys ("V<KEY>")
WshShell.SendKeys ("{Enter}")
WScript.sleep 500
'WshShell.SendKeys ("{Enter}")
'WScript.Sleep 500
'Step 2 - Issue Commands with pauses'
WshShell.SendKeys ("{Enter}")
WScript.Sleep 100
WshShell.SendKeys ("sntp date{Enter}")
WScript.Sleep 200
WshShell.SendKeys ("adsl info{Enter}")
WScript.Sleep 2000
WshShell.SendKeys ("defaultgateway show")
WshShell.SendKeys ("{Enter}")
WScript.sleep 200
WshShell.SendKeys ("dhcpserver show")
WshShell.SendKeys ("{Enter}")
WScript.sleep 200
WshShell.SendKeys ("dns show")
WshShell.SendKeys ("{Enter}")
WScript.sleep 200
WshShell.SendKeys ("swversion show")
WshShell.SendKeys ("{Enter}")
WScript.sleep 200
WshShell.SendKeys ("wan show")
WshShell.SendKeys ("{Enter}")
WScript.sleep 200
WshShell.SendKeys ("sysinfo")
WshShell.SendKeys ("{Enter}")
WScript.sleep 200
WshShell.SendKeys ("wlctl ver")
WshShell.SendKeys ("{Enter}")
WScript.sleep 200
WshShell.SendKeys ("macaddr")
WshShell.SendKeys ("{Enter}")
WScript.sleep 200
WshShell.SendKeys ("serialnum")
WshShell.SendKeys ("{Enter}")
WScript.sleep 200
'Step 3 - Exit Command Window
WshShell.SendKeys ("logout{Enter}")
WScript.Sleep 100
'WshShell.SendKeys "^]" 'Microsoft Telnet Client. Escape Character is 'CTRL+]'.
'VBScript - SendKeys Method
'http://social.technet.microsoft.com/wiki/contents/articles/5169.vbscript-sendkeys-method.aspx
'WshShell.SendKeys ("quit") 'Quit Microsoft Telnet Client.
WshShell.SendKeys ("{Enter}")
WScript.Sleep 100
WshShell.SendKeys ("exit{Enter}") 'Quit Command Prompt.

WScript.Quit
{'fraction_non_alphanumeric': 0.13004826009652018, 'fraction_numerical': 0.032766065532131065, 'mean_word_length': 5.596314907872697, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5068211', 'n_tokens_mistral': 1514, 'n_tokens_neox': 1382, 'n_words': 381}