Results 1 to 5 of 5

Thread: VB - A Simple Portscanner

  1. #1

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359

    VB - A Simple Portscanner

    Attached is a simple implementation of a port scanner.
    It uses the Winsock control, and gives the option of how many threads to use for scanning at any one time.

    Simple Port Scanner.zip
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  2. #2
    Fanatic Member LITHIA's Avatar
    Join Date
    Dec 2002
    Location
    UK, England
    Posts
    575
    Cool project well done plenderj

    I like the way you have set out your code, looks very neat and almost c++ like heh

    Keep up the good work, this should be a good example!

    Only improvments I could say, is to increase the Refresh Rate of the label which shows which port is currently being scanned. I have seen other examples (EXE form) that refresh at each port chnage, not sure how much resources that would take though...

    Thanks again

  3. #3
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Originally posted by LITHIA
    Only improvments I could say, is to increase the Refresh Rate of the label which shows which port is currently being scanned. I have seen other examples (EXE form) that refresh at each port chnage, not sure how much resources that would take though
    When port scanners refresh on ever port thats normally because they're only scanning using 1 thread if I remember correctly. And if you scan with 5 threads your label will do this: 0,5,10,15,20,...
    Its because the threads is how many ports to scan at a time.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  4. #4
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    425

    Re: VB - A Simple Portscanner

    Originally posted by plenderj
    Attached is a simple implementation of a port scanner.
    It uses the Winsock control, and gives the option of how many threads to use for scanning at any one time.

    Simple Port Scanner.zip
    Very nice project. I'm working on a similar project myself. I've created ActiveX Exe multithreading objects to boost up some speed. I've used the Winsock class (forgot where I found that one) for Winsock, because it's laks the MS Winsock control bugs. Because it uses API to access Windows Winsock, I had to create the ActiveX EXE threading.

    Now, my scanner uses a time-out mechanism to make sure the app doesn't hang when a .connect() is not accepted because the port doesn't exist. This is the most time consuming of the whole scanning. How can this be made more efficient?
    "Experience is something you don't get until just after you need it."

  5. #5

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    * 21-October-2004 - Moved to CodeBank *
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width