mbt masai
 
Welcome !
         

                                
After experiencing a lot of down time, We decided to move this site to CrystalTech.com. CrystalTech.com is powered by only the finest Windows servers providing the best performance, reliability, and value anywhere.

 Script Telnet

Author Message
DiGiTAL.SkReAM

  • Total Posts : 1259
  • Scores: 7
  • Reward points : 0
  • Joined: 9/7/2005
  • Location: Clearwater, FL, USA
  • Status: offline
Script Telnet Tuesday, October 03, 2006 6:55 AM (permalink)
0
Recently, I was looking through google, trying to figure out how to script my telnet session.
I also found quite a number of posts on here that were struggling with the task.  Finally, I came across a freeware DLL
that can be accessed via CreateObject().  It is called w3sockets, and it is by dimac.net.  The download location is here.
Here is the location of the documentation for it.
One of the nice things about this is that it does not show a popup window at all.
One word of warning... the TimeOut value does not work, and always defaults to 20 seconds, no matter what value you put in.

Here is a script that demonstrates the use of the object to telnet to an IP address and check for the existence of MS Exchange.
 fCheckExchange
 Function fCheckExchange()
 Dim oSocket, iErr, sSocketText
 sSocketText = ""
 Set oSocket = CreateObject("Socket.TCP")
 oSocket.DoTelnetEmulation = True
 oSocket.TelnetEmulation = "TTY"
 oSocket.Host = "odin:25"
 On Error Resume Next 
 oSocket.Open
 iErr = Err.Number
  If iErr <> 0 Then 
   fCheckExchange = 0
   Exit Function 
  End If 
 sSocketText = oSocket.GetLine
 oSocket.SendLine "quit"
 oSocket.Close
 On Error GoTo 0
 fCheckExchange = 0
 If InStr(sSocketText,"Microsoft ESMTP MAIL Service") <> 0 Then WScript.Echo "Exchange Found!"
 End Function
 


Another note: There is an object by ActiveExperts, The ActiveSocket Network Communication Toolkit that does the same kind of thing, along with some other functionality.  It is a nicer object, overall, but it does come with a $US140/10 computer license fee.  Since I prefer to NOT pay for things if there is a free/public domain alternative, I went with w3Sockets.
 
 
EDIT(EBGREEN): Added the correction that DM added a few posts down.
<message edited by ebgreen on Thursday, July 05, 2007 4:40 AM>
"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury
#1
    est

    • Total Posts : 40
    • Scores: 0
    • Reward points : 0
    • Joined: 10/12/2006
    • Status: offline
    RE: Script Telnet Thursday, October 12, 2006 9:28 PM (permalink)
    0
    Try MSWinsock.Winsock.1 in VB6, also scriptable with wsh, that's a 107KB mswinsck.ocx
    Do NOT program in a programmer's way
    #2
      DiGiTAL.SkReAM

      • Total Posts : 1259
      • Scores: 7
      • Reward points : 0
      • Joined: 9/7/2005
      • Location: Clearwater, FL, USA
      • Status: offline
      RE: Script Telnet Friday, October 13, 2006 1:06 AM (permalink)
      0
      Generally, you will have problems using this control in VBScript unless you have a Visual Studio or other design app installed on your PC.  You will get license errors, etc.  A way around this, however is to go to here and download another ocx which will then act as a wrapper for the first ocx.  Now, granted, you will then have access to a bunch of other fucntionality, but ya know, it is much easier to use just a single activex component and teh previous simple code example - at least in my mind.
      But by itself, mswinsck.ocx is, unfortunately, not generally scriptable via vbscript.
      <message edited by DiGiTAL.SkReAM on Friday, October 13, 2006 1:08 AM>
      "Would you like to touch my monkey?" - Dieter (Mike Meyers)

      "It is better to die like a tiger, than to live like a pussy."
      -Master Wong, from Balls of Fury
      #3
        est

        • Total Posts : 40
        • Scores: 0
        • Reward points : 0
        • Joined: 10/12/2006
        • Status: offline
        RE: Script Telnet Friday, October 13, 2006 2:19 AM (permalink)
        0
        Here is the very very very simple solution.

        Import this to your registry and mswinsock will be OK!

        ..............the specific reg code was removed........

        Unfortunately Microsoft regards this as a violation of COPYRIGHT, so please just import these keys just for testing, do not use them in your script.
         
         
        2006-10-14 edited by est: Sorry everyone, I just wanted to test mswinsock object in vbs. I didn't mean to violate the copyright.
        <message edited by est on Friday, October 13, 2006 4:08 PM>
        Do NOT program in a programmer's way
        #4
          DiGiTAL.SkReAM

          • Total Posts : 1259
          • Scores: 7
          • Reward points : 0
          • Joined: 9/7/2005
          • Location: Clearwater, FL, USA
          • Status: offline
          RE: Script Telnet Friday, October 13, 2006 2:30 AM (permalink)
          0
          While I am sure everyone appreciates your efforts, if it is a violation of copyright, it shouldn't be posted to the fora.
          I am well aware that there are many ways to 'get around' various limitations, but not all of them are aboveboard, and therefore are not proper material for posting here, at least as I understand the rules and the admins' wishes.
           
          Plus, 99.9% of my scripting is used in a business environment and must therefore be very stringent concerning anything the authorities might frown upon.
          "Would you like to touch my monkey?" - Dieter (Mike Meyers)

          "It is better to die like a tiger, than to live like a pussy."
          -Master Wong, from Balls of Fury
          #5
            mcds99

            • Total Posts : 515
            • Scores: 4
            • Reward points : 0
            • Joined: 2/28/2006
            • Status: offline
            RE: Script Telnet Friday, October 13, 2006 8:44 AM (permalink)
            0
            This should let me get to the Cisco routers and do configutation in VBS insted of Perl.

            I'll let you know.
            Sam

            Keep it Simple Make it Fun KiSMiF
            #6
              4scriptmoni

              • Total Posts : 225
              • Scores: 0
              • Reward points : 0
              • Joined: 5/3/2007
              • Status: offline
              RE: Script Telnet Tuesday, May 08, 2007 3:15 AM (permalink)
              0
              COOL SCRIPT MAN!!! great job.
              i was doing telnet with TST10.exe
              cheers

              Enterprise Microsoft Scripts Exchange, Login/Logout Monitor,TS, Monitoring, Security, AD, etc... http://www.felipeferreira.net
              #7
                DiGiTAL.SkReAM

                • Total Posts : 1259
                • Scores: 7
                • Reward points : 0
                • Joined: 9/7/2005
                • Location: Clearwater, FL, USA
                • Status: offline
                RE: Script Telnet Thursday, July 05, 2007 4:15 AM (permalink)
                0
                I apologize folks it wasn't until just now that I realized the script wasn't correct.
                There were a couple of line missing, as it was just the bare function, but without the function name() and end function lines, etc.
                And, since I am apparently not allowed to edit previous messages.??? I will post it here.
                 
                MAKE SURE THAT YOU HAVE THE DLL REGISTERED PROPERLY
                 
                Here is a working script.
                 fCheckExchange
                 Function fCheckExchange()
                  Dim oSocket, iErr, sSocketText
                  sSocketText = ""
                  Set oSocket = CreateObject("Socket.TCP")
                  oSocket.DoTelnetEmulation = True
                  oSocket.TelnetEmulation = "TTY"
                  oSocket.Host = "odin:25"
                  On Error Resume Next 
                  oSocket.Open
                  iErr = Err.Number
                   If iErr <> 0 Then 
                    fCheckExchange = 0
                    Exit Function 
                   End If 
                  sSocketText = oSocket.GetLine
                  oSocket.SendLine "quit"
                  oSocket.Close
                  On Error GoTo 0
                  fCheckExchange = 0
                  If InStr(sSocketText,"Microsoft ESMTP MAIL Service") <> 0 Then WScript.Echo "Exchange Found!"
                 End Function
                 

                 
                "Would you like to touch my monkey?" - Dieter (Mike Meyers)

                "It is better to die like a tiger, than to live like a pussy."
                -Master Wong, from Balls of Fury
                #8
                  simon

                  • Total Posts : 8
                  • Scores: 0
                  • Reward points : 0
                  • Joined: 6/6/2008
                  • Status: offline
                  RE: Script Telnet Monday, June 23, 2008 12:34 PM (permalink)
                  0
                  ok so i figure i am going to have to use telnet for this, because i am required to test specific ports to see if they're open. 

                  ive got a script to run telnet through a command prompt, but i'm having trouble getting it to return a value to tell if it has successfully connected or not.

                  Any ideas?
                  #9
                    ebgreen

                    • Total Posts : 8081
                    • Scores: 94
                    • Reward points : 0
                    • Joined: 7/12/2005
                    • Status: offline
                    RE: Script Telnet Tuesday, June 24, 2008 1:01 AM (permalink)
                    0
                    Are you restricted to VBS? I suspect this would be trivial in PowerShell.
                    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
                    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
                    http://www.visualbasicscript.com/m_47117/tm.htm
                    #10
                      4scriptmoni

                      • Total Posts : 225
                      • Scores: 0
                      • Reward points : 0
                      • Joined: 5/3/2007
                      • Status: offline
                      RE: Script Telnet Sunday, June 29, 2008 7:22 PM (permalink)
                      0
                      You can easly check if the connection was successfully or not.
                      Check out my post
                      http://www.visualbasicscript.com/m_60280/tm.htm

                      Like
                       On Error Resume Next 
                           oSocket.Open
                           iErr = Err.Number
                            If iErr <> 0 Then 
                              'Log That Server Refused connection and send EMAIl
                              Exit Function 
                            End If 
                           sSocketText = oSocket.GetLine
                           oSocket.SendLine "quit"    
                           oSocket.Close
                       

                      Enterprise Microsoft Scripts Exchange, Login/Logout Monitor,TS, Monitoring, Security, AD, etc... http://www.felipeferreira.net
                      #11
                        Compuguide

                        • Total Posts : 3
                        • Scores: 0
                        • Reward points : 0
                        • Joined: 9/25/2009
                        • Status: offline
                        RE: Script Telnet Friday, September 25, 2009 7:52 PM (permalink)
                        0
                        This is probably a dead thread but here goes.

                        My script has been running fine on my Vista (32bit) machine.
                        I can't get it to run on my new Windows 7 (64bit) machine.
                        It fails with:

                        "Error: Activex component can't create object: 'Socket.TCP'
                        Code: 800A01AD"

                        I suspect Socket.dll has not been registered properly, but I have registered (and unregistered) it with SocketReg.exe, regsvr32.exe, and C:\Windows\SysWOW64\regsvr32.exe, but it still fails with the same error.

                        Has anyone else got this working with Windows 7 64bit?

                        Thanks

                        #12
                          DiGiTAL.SkReAM

                          • Total Posts : 1259
                          • Scores: 7
                          • Reward points : 0
                          • Joined: 9/7/2005
                          • Location: Clearwater, FL, USA
                          • Status: offline
                          RE: Script Telnet Monday, September 28, 2009 4:46 PM (permalink)
                          0
                          Compuguide


                          This is probably a dead thread but here goes.

                          My script has been running fine on my Vista (32bit) machine.
                          I can't get it to run on my new Windows 7 (64bit) machine.
                          It fails with:

                          "Error: Activex component can't create object: 'Socket.TCP'
                          Code: 800A01AD"

                          I suspect Socket.dll has not been registered properly, but I have registered (and unregistered) it with SocketReg.exe, regsvr32.exe, and C:\Windows\SysWOW64\regsvr32.exe, but it still fails with the same error.

                          Has anyone else got this working with Windows 7 64bit?

                          Thanks


                          I don't have a copy of Windows 7 yet to play with, so I have no way of giving any real advice on this, sorry.  I doubt, however, that it is related to Win7 vs. Vista, but rather to 64bit vs. 32bit.  And again, the only 64bit versions of operating systems I have right now up and running are my linux servers.
                          "Would you like to touch my monkey?" - Dieter (Mike Meyers)

                          "It is better to die like a tiger, than to live like a pussy."
                          -Master Wong, from Balls of Fury
                          #13
                            Compuguide

                            • Total Posts : 3
                            • Scores: 0
                            • Reward points : 0
                            • Joined: 9/25/2009
                            • Status: offline
                            RE: Script Telnet Tuesday, September 29, 2009 11:25 AM (permalink)
                            0
                            Thanks for taking the time to reply.
                            I agree that it seems to be a 64bit problem.
                            I have reverted to TST10.exe but it is rather unreliable.
                            Please update this thread if and when you find or hear of a solution.
                            Thanks
                            #14
                              gazumba

                              • Total Posts : 1
                              • Scores: 0
                              • Reward points : 0
                              • Joined: 10/21/2009
                              • Status: offline
                              RE: Script Telnet Wednesday, October 21, 2009 5:04 AM (permalink)
                              0
                              Compuguide,

                              I had the same problem.

                              I found a solution:
                              1. Seek the C: for the four CSCRIPT.EXE files. Each pair of them have the same size, but there are two smaller.
                              2. One of these (smaller) is located on the subdir:
                              C:\Windows\winsxs\wow64_microsoft-windows-scripting_31bf3856ad364e35_6.1.7600.16385_none_aeb1ef0f4e6bba1d\cscript.exe
                              3. Edit its properties and set it to run in a compatibility way using "Windows XP SP3", for example, as I use
                              4. Run your scripts using the path for the CSCRIPT.EXE like item 2 above, followed by the script you must run

                              I use it inside batches and the path I copy/paste just one time. To run in the command line you must to include the directory (item 2) in the system path (I really do not know if it will run fine this way, but try it and let me know the results).

                              If you have any sugestions to my solution, let me know. It will be welcome.
                              EDITED BY THE AUTHOR
                              After followed the steps 1 thru 4, just copy the file above to the subdir you are working. The scripts will run as it was in the old Windows (XP or Vista 32) using the command line as shown below without the <> symbols:
                              cscript <scriptname.vbs>
                              Good lucky.
                              <message edited by gazumba on Wednesday, October 21, 2009 5:48 AM>
                              #15
                                xaxis

                                • Total Posts : 1
                                • Scores: 0
                                • Reward points : 0
                                • Joined: 1/7/2010
                                • Status: offline
                                RE: Script Telnet Thursday, January 07, 2010 12:14 PM (permalink)
                                0
                                gazumba


                                Compuguide,

                                I had the same problem.

                                I found a solution:
                                1. Seek the C: for the four CSCRIPT.EXE files. Each pair of them have the same size, but there are two smaller.
                                2. One of these (smaller) is located on the subdir:
                                C:\Windows\winsxs\wow64_microsoft-windows-scripting_31bf3856ad364e35_6.1.7600.16385_none_aeb1ef0f4e6bba1d\cscript.exe
                                3. Edit its properties and set it to run in a compatibility way using "Windows XP SP3", for example, as I use
                                4. Run your scripts using the path for the CSCRIPT.EXE like item 2 above, followed by the script you must run

                                I use it inside batches and the path I copy/paste just one time. To run in the command line you must to include the directory (item 2) in the system path (I really do not know if it will run fine this way, but try it and let me know the results).

                                If you have any sugestions to my solution, let me know. It will be welcome.
                                EDITED BY THE AUTHOR
                                After followed the steps 1 thru 4, just copy the file above to the subdir you are working. The scripts will run as it was in the old Windows (XP or Vista 32) using the command line as shown below without the <> symbols:
                                cscript <scriptname.vbs>
                                Good lucky.


                                Well I'm having the same problem as Compuguide except I am running Windows Server 2003 R2 Enterprise 64-bit Service Pack 2.  I'm calling cscript from the command line and on this system there is a 32-bit and 64-bit cscript.exe (don't have two pairs).  The error I get back with the 64-bit one is: Object doesn't support this property or method.  The error I get back with the 32-bit version is: ActiveX component can't create object: socket.tcp.
                                 
                                I tried using the Compatability Wizard to set the compatability properties of the 64-bit cscript to Windows XP but the window flashed by so fast I don't know what it did.  It didn't change the error, though.  I am so stuck - anyone have any ideas?  Please?   Thanks in advance...
                                #16
                                  DiGiTAL.SkReAM

                                  • Total Posts : 1259
                                  • Scores: 7
                                  • Reward points : 0
                                  • Joined: 9/7/2005
                                  • Location: Clearwater, FL, USA
                                  • Status: offline
                                  RE: Script Telnet Friday, February 05, 2010 6:44 PM (permalink)
                                  0
                                  Ok, with everyone having problems with this over the past few months, I decided to go back over it.
                                   
                                  Step #1) Go to this site and get the w3sockets dll.
                                  Step #2) Unzip it
                                  Step #3) Run the SocketReg.exe that is included in the zip file.
                                  Step #4) If it says that everything is good-to-go use the script that is posted in the beginning of the thread.
                                   
                                  I did these on a new xp install, and voila!  it worked just fine.
                                  The only thing that I can tell you is to make sure that you have winsock2 and that the w3sockets dll is registered.
                                  At this time I have no way to test it on every possible version of Windows out there.  It works on WinXP 32bit.
                                  Know that it will NOT work if you do not have the capability to have winsock2 on your machine.
                                   
                                  As it is a free DLL, the authors have given this little bit of documentation.
                                   
                                  "Would you like to touch my monkey?" - Dieter (Mike Meyers)

                                  "It is better to die like a tiger, than to live like a pussy."
                                  -Master Wong, from Balls of Fury
                                  #17
                                    Compuguide

                                    • Total Posts : 3
                                    • Scores: 0
                                    • Reward points : 0
                                    • Joined: 9/25/2009
                                    • Status: offline
                                    RE: Script Telnet Wednesday, April 07, 2010 5:10 AM (permalink)
                                    0
                                    gazumba


                                    Compuguide,

                                    I had the same problem.

                                    I found a solution:
                                    1. Seek the C: for the four CSCRIPT.EXE files. Each pair of them have the same size, but there are two smaller.
                                    2. One of these (smaller) is located on the subdir:
                                    C:\Windows\winsxs\wow64_microsoft-windows-scripting_31bf3856ad364e35_6.1.7600.16385_none_aeb1ef0f4e6bba1d\cscript.exe
                                    3. Edit its properties and set it to run in a compatibility way using "Windows XP SP3", for example, as I use
                                    4. Run your scripts using the path for the CSCRIPT.EXE like item 2 above, followed by the script you must run

                                    I use it inside batches and the path I copy/paste just one time. To run in the command line you must to include the directory (item 2) in the system path (I really do not know if it will run fine this way, but try it and let me know the results).

                                    If you have any sugestions to my solution, let me know. It will be welcome.
                                    EDITED BY THE AUTHOR
                                    After followed the steps 1 thru 4, just copy the file above to the subdir you are working. The scripts will run as it was in the old Windows (XP or Vista 32) using the command line as shown below without the <> symbols:
                                    cscript <scriptname.vbs>
                                    Good lucky.


                                    Appologies for taking so long to respond, I have only just rediscovered this thread and seen the above solution.

                                    gazumba, many thanks, I can confirm that it works perfectly!
                                    #18
                                      megatron

                                      • Total Posts : 1
                                      • Scores: 0
                                      • Reward points : 0
                                      • Joined: 5/29/2010
                                      • Status: offline
                                      RE: Script Telnet Saturday, May 29, 2010 9:40 PM (permalink)
                                      0
                                      Hi All, I would like to thank DiGiTAL.SkReAM for starting this post which was way back in 2006 lol but hey i just found it today since i was looking for a telnet vb client so i could make telnet automation i started learning vb few weeks ago so if i do something stupid consider it noob mistake :p

                                      I am running Visual basic 2010 n its running on .net framework 4.

                                      I tried running the above script provided by Digi Skream and quote error at :-

                                      If InStr(sSocketText,"Microsoft ESMTP MAIL Service") <> 1819 Then WScript.Echo "Exchange Found!"

                                      WScript.Echo kept giving declare var issue so i replaced it with Msgbox("Exchange Found!") and it worked.

                                       
                                      Now since i wanted telnet and this only checks if its exchange server or not then didnt help me. But since i found out about w3sockets i googled and found http://www.sudowudo.com/index.php?page=1020 which is awesome program too bad i couldnt thank him since he doesnt have contact board or email listed.
                                       
                                      Ok now i had everything but one thing kept on bothering me was asking my user to install or run "SocketReg.exe" since i know most of the time user will just try to run the telnet program without running SocketReg.exe which was a problem. So i wanted to automate the process. I thought of vbhide option and then put a timer and close it but hell i just started learning dont really know how to do it. So i ran Vm ThinApp and ran SocketReg ..doing so basically broke register creation down for me to see which regs it created. Following is the breakdown of regs :-
                                       Windows Registry Editor Version 5.00      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B8EDC06D-2FF9-11D1-9755-0060979FF483}] 
                                           @="TCPObject" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B8EDC06D-2FF9-11D1-9755-0060979FF483}\InprocServer32] 
                                           @="C:\\w3Sockets\\socket.dll" "ThreadingModel"="Both" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B8EDC06D-2FF9-11D1-9755-0060979FF483}\ProgID] 
                                           @="Socket.TCP" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B8EDC06D-2FF9-11D1-9755-0060979FF483}\TypeLib] 
                                           @="{B8EDC06B-2FF9-11D1-9755-0060979FF483}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B8EDC06D-2FF9-11D1-9755-0060979FF483}\Version] 
                                           @="1.0" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{B8EDC06C-2FF9-11D1-9755-0060979FF483}] 
                                           @="ITCP" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{B8EDC06C-2FF9-11D1-9755-0060979FF483}\ProxyStubClsid] 
                                           @="{00020424-0000-0000-C000-000000000046}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{B8EDC06C-2FF9-11D1-9755-0060979FF483}\ProxyStubClsid32] 
                                           @="{00020424-0000-0000-C000-000000000046}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{B8EDC06C-2FF9-11D1-9755-0060979FF483}\TypeLib] 
                                           @="{B8EDC06B-2FF9-11D1-9755-0060979FF483}" 
                                           "Version"="1.0" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Socket.TCP] 
                                           @="TCPObject" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Socket.TCP\Clsid] 
                                           @="{B8EDC06D-2FF9-11D1-9755-0060979FF483}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{B8EDC06B-2FF9-11D1-9755-0060979FF483}] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{B8EDC06B-2FF9-11D1-9755-0060979FF483}\1.0] 
                                           @="Socket Library" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{B8EDC06B-2FF9-11D1-9755-0060979FF483}\1.0\0] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{B8EDC06B-2FF9-11D1-9755-0060979FF483}\1.0\0\win32] 
                                           @="C:\\w3Sockets\\socket.dll" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{B8EDC06B-2FF9-11D1-9755-0060979FF483}\1.0\FLAGS] 
                                           @="0" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{B8EDC06B-2FF9-11D1-9755-0060979FF483}\1.0\HELPDIR] 
                                           @="C:\\w3Sockets\\" 
                                           
                                       

                                      I had to edit my post to fix the reg and it still didnt show the code properly so i am going to keep it there just in case someone is lazy enuf not to download the zip file with reg entries. Here's the rapidshare link for downloading the reg http://rapidshare.com/files/393203383/AIO_Reg_for_w3Sockets.zip.html <--All In One Reg for w3sockets.

                                       
                                      thats all the reg being created by SocketReg.exe i have tested it by importing registery and running the w3Sockets program without running SocketReg.exe. This basically makes it fully non interactive. My insight on why SocketReg.exe was created at the 1st place :- 
                                       
                                      If you sniff thru the above reg you will see Directory Reference on atleast 3 places :-
                                       
                                      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B8EDC06D-2FF9-11D1-9755-0060979FF483}\InprocServer32]
                                      @="C:\\w3Sockets\\socket.dll"
                                      "ThreadingModel"="Both"
                                      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{B8EDC06B-2FF9-11D1-9755-0060979FF483}\1.0\0\win32]
                                      @="C:\\w3Sockets\\socket.dll
                                      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{B8EDC06B-2FF9-11D1-9755-0060979FF483}\1.0\HELPDIR]
                                      @="C:\\w3Sockets\\"
                                       
                                      So if you make two Dim variables one for mainDir and one for exactDLL
                                       
                                      i.e
                                      Dim mainDir = "c:\\w3Sockets\\"
                                      Dim exactDLL = "c:\\w3Sockets\\socket.dll"
                                       
                                      and replace reg with Dim vars i.e :-
                                       
                                      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{B8EDC06B-2FF9-11D1-9755-0060979FF483}\1.0\0\win32]
                                      @=""& exactDLL &""
                                       
                                      That will make it fully automated and wont give you runtime error. In my program i will extract these two a installation folder and place "socket.dll" in that place as well and basically define the installation folder and assign Dim mainDir & Dim exactDLL location right there and then.
                                       
                                      Hopefully all this writing will come handy for someone out there like me. 
                                       
                                      All thanks goes to w3sockets creator and sharing his wonderful dll with us for free and for people creating wonderful softwares out of it :)
                                      Regards,
                                       
                                      Megatron

                                      <message edited by megatron on Saturday, May 29, 2010 9:57 PM>
                                      #19
                                        ady2n

                                        • Total Posts : 1
                                        • Scores: 0
                                        • Reward points : 0
                                        • Joined: 8/16/2010
                                        • Status: offline
                                        Re:Script Telnet Tuesday, February 01, 2011 5:51 AM (permalink)
                                        0
                                        After decompiling w3sockets.dll, i found that it was made in Delphi4 and that the only terminal type that will be necogiated are VT100 and JAFTN
                                        #20

                                          Online Bookmarks Sharing: Share/Bookmark

                                          Jump to:

                                          Current active users

                                          There are 0 members and 1 guests.

                                          Icon Legend and Permission

                                          • New Messages
                                          • No New Messages
                                          • Hot Topic w/ New Messages
                                          • Hot Topic w/o New Messages
                                          • Locked w/ New Messages
                                          • Locked w/o New Messages
                                          • Read Message
                                          • Post New Thread
                                          • Reply to message
                                          • Post New Poll
                                          • Submit Vote
                                          • Post reward post
                                          • Delete my own posts
                                          • Delete my own threads
                                          • Rate post

                                          2000-2012 ASPPlayground.NET Forum Version 3.8
                                          mbt shoes www.wileywilson.com