Visual C++ 7.1Visual Studio 6Visual C++ 7.0Windows 2003Windows 2000Visual C++ 6.0Windows XPMFCIntermediateDevVisual StudioWindowsC++
A simple Windows port scanner - Part 2






2.66/5 (24 votes)
Jul 26, 2003

59322

1068
This project is a simple Windows port scanner which can be very useful for checking your machine to make sure it is locked down!
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)