Click here to Skip to main content
12,703,067 members (28,885 online)
Click here to Skip to main content
Add your own
alternative version

Stats

51.3K views
823 downloads
22 bookmarked
Posted

A simple Windows port scanner - Part 2

, 25 Jul 2003
Rate this:
Please Sign up or sign in to vote.
This project is a simple Windows port scanner which can be very useful for checking your machine to make sure it is locked down!

Sample Image - pcscan2.jpg

Introduction

i've recreated Rod VanAmburgh's "a simple port scanner" (the orignal version), because it has been something i've always planned on doing. I thought I could make small improvements on a project that was already pretty nice untouched.

I have looked the code completely over and made comments here and there. I've notice that the program is a multi-threaded program, i haven't messed with multi-threading before and didn't really touch it in my version. It took me awhile to realize why you were using a thread for each port scanned for something so simple. Then i realized the programs i've made with sockets and how messing with alot of ports the computers performance can suffer. That was nice thinking on Rod VanAmburgh part.

I've change the look of the new version and added some error handling to parts here and there. I've also added a progress bar to the new version.

I've changed the class CConnectionChk:



class CConnectionChk
{
    public:

        CConnectionChk();
        CConnectionChk(CString _ip, UINT _port)
        {
            ip = _ip;
            port = _port;
            log = "";
            found = false;
            finished = false;
        }


        CString log;
        CString ip;
        UINT port;
        bool found;
        bool finished;
};

into a struct:
struct CConnectionChk
{
        CString log;
        CString ip;
        UINT port;
        bool found;
        bool finished;
};
i've commented just about everything i've changed. I hope you enjoy and add your own style to it and repost it.

--ice911 (hope you like)

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

ice911
Web Developer
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

 
Generalfastest Port scanner of code project Pin
sudhir mangla23-Dec-04 0:37
membersudhir mangla23-Dec-04 0:37 
GeneralNotify when a port is being opened... Pin
ZarrinPour4-Sep-04 4:06
memberZarrinPour4-Sep-04 4:06 
QuestionWhy? Pin
Lars-Inge Tønnessen19-Aug-03 1:06
memberLars-Inge Tønnessen19-Aug-03 1:06 
AnswerRe: Why? Pin
ice91119-Aug-03 9:02
memberice91119-Aug-03 9:02 
GeneralI'll tell you why.... Pin
Almenara30-Dec-03 10:19
memberAlmenara30-Dec-03 10:19 
Generalwhats your problem? Pin
TuPac Omarau10-Jun-05 17:46
sussTuPac Omarau10-Jun-05 17:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170118.1 | Last Updated 26 Jul 2003
Article Copyright 2003 by ice911
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid