VBScript port listener/simple server

Posted on 2006-06-05
Last Modified: 2012-06-27
Is it possible to write a standalone vbscript that would listen on specified port (e.g. 80) for incomming connections using only components/objets available in a basic/default windows xp environment?


Question by:lbolek
    LVL 11

    Expert Comment

    I believe you would need a service to accomplish this. VBScript isn't really an application which is capable of listening. It runs and it's done, but it requires execution whether on a predefined schedule or manually. What you are trying to do requires a constant and continuous observation of the port in question. VBScript may be able to access the port at specific intervals, but it would miss activity between them. It may be more doable to set up a port monitor which triggers a script to log or notify you of connections. This, however, is beyond my scope of knowledge.

    Sorry I can't be of more help.
    LVL 1

    Author Comment

    look, i've already come across a solution thats using a VB6 ocx component:

    Set InitWinsock=WScript.CreateObject("MSWinsock.Winsock", "wsock_")
    socket.Bind( 13 )

    I was just wondering if there is something similar available in a basic winXP environment.
    LVL 1

    Accepted Solution

    PAQed with points refunded (500)

    Community Support Moderator

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Suggested Solutions

    Building “do-it-yourself” web sites has become an epidemic. There are so many blogs, web sites and even books that "teach" you how to build your web site in a few extremely simple and easy steps. Building a web site has become easier than boiling an…
    Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now