Click here to Skip to main content
15,892,809 members
Articles / Desktop Programming / MFC

How to write a simple but effective TCP/IP port scanner for Win32

Rate me:
Please Sign up or sign in to vote.
4.82/5 (15 votes)
27 Oct 20017 min read 163K   7.3K   101  
An article on how to write a TCP/IP port scanner with a GUI, based on the MFC's property sheet paradigm
/*
	lmhosts.h
	Luca Piergentili, 22/01/97
	lpiergentili@yahoo.com
	http://www.geocities.com/lpiergentili/

	Indirizzo IP host locale.
	Referenzia la postazione utilizzata come server nella rete locale (vedi elenco sotto).

	Sul server impostare le proprieta' TCP/IP (relative alla rete locale) indicando un
	indirizzo IP statico (192.168.0.1) e specificando come	submask l'indirizzo 255.255.255.0.

	Sui client impostare le proprieta' TCP/IP (relative alla scheda di rete) indicando un
	indirizzo IP statico (da 192.168.0.2 a 192.168.0.n, con n che si incrementa per ogni
	postazione) e specificando come submask l'indirizzo 255.255.255.0.

	Prima di impostare un indirizzo statico nelle proprieta TCP/IP delle postazioni di rete,
	disabilitare la configurazione DNS Internet.
	Dato che la modifica si ripercuote sulle proprieta' TCP/IP dell'accesso telefonico,
	impostare gli indirizzi DNS direttamente nelle proprieta' della connessione telefonica.

	192.168.0.1	server NT
	192.168.0.2	client
	192.168.0.3	  ""
	192.168.0.4	  ""
	192.168.0.5	  ""
	192.168.0.6	  ""
	192.168.0.7	  ""
	192.168.0.8	  ""
*/
#ifndef _LMHOSTS_H
#define _LMHOSTS_H 1

#define DUMMY_HOST		"128.128.128.128"
#define NULL_HOST		"0.0.0.0"
#define LOCAL_HOST		"127.0.0.1"
#define LOCAL_HOST_NAME	"localhost"
#define LOCAL_HOST_NUM	((unsigned long)16777343)

#endif /* _LMHOSTS_H */

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

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


Written By
Web Developer
Italy Italy
I like C and C++, Acid Jazz, James Brown, gli Spaghetti Aglio e Olio, alla Bolognesa, alla Puttanesca e le Fettuccine alla Matriciana ('Maccaroni' over the world). Of course I like beautiful big tits girls too, my little car, Frank Zappa, the art of Zen, italian coffee and much more...

Comments and Discussions