![]() |
| | #1 |
| Registered User Join Date: Mar 2008
Posts: 4
| Need to check Port 80 using C I need to write a command line app that checks if Port 80 is ope for http requests or blocked. IF its blocked it would be good to be able to output what is blocking it (NOrton or another firewall for example) but this is not totally needed. If anyone has any ideas, snippets, that would be great! Thanks |
| PaperDoylie is offline | |
| | #2 |
| Registered User Join Date: Aug 2007
Posts: 20
| Dunno if this helps? I haven't read it through.... http://tangentsoft.net/wskfaq/articles/lame-list.html |
| djnorthyy is offline | |
| | #3 |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,768
| Does nmap not suffice for this need? |
| brewbuck is offline | |
| | #4 |
| Registered User Join Date: Mar 2008
Posts: 4
| Thanks for that Hi Thanks for the posts above. The winsocks stuff isn't really what I was after. The NMAP tool does exactly what I need to be honest, except for two issue (there are always issues!) 1) it requires a user to install Winpcap (this has got to be more straightforward than that) and 2) The output is deemed to confusting for the client! Any other ideas?? Andy |
| PaperDoylie is offline | |
| | #6 |
| Registered User Join Date: Mar 2008
Posts: 4
| Thanks Yeah I download cURL, spent a while looking at it and got a bit lost to be honest. I have also found http://www.nirsoft.net/utils/cports.html Which is good and the Microsoft tool http://www.petri.co.il/quickly_find_...open_ports.htm does something similar. WOuld have liked to write it myself but time is off the essense! |
| PaperDoylie is offline | |
| | #7 |
| Registered User Join Date: Apr 2007 Location: Sydney, Australia
Posts: 217
| -Create a socket -Set the socket to non-blocking -Call the connect function (it should return immediately) -Use select with a timeout of 5 seconds. If there is a connection on port 80, select should return 1 WITHIN 5 seconds. If there is no connection, than select should return 0 AFTER 5 seconds. -Close socket. |
| 39ster is offline | |
| | #8 |
| Registered User Join Date: Mar 2008
Posts: 4
| In the end I did it in VS2005 using C++ not C. IF anyone wants to see the project the please ask |
| PaperDoylie is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| serial port to poll on request | infineonintern | C++ Programming | 2 | 06-11-2009 06:52 AM |
| Parallel Port IO ops not working properly | microtechno | Linux Programming | 16 | 06-08-2009 12:33 PM |
| MFC check box question | MyglyMP2 | Windows Programming | 2 | 03-09-2009 05:47 PM |
| connecting to server with wrong port | liri | Networking/Device Communication | 3 | 11-13-2007 03:52 AM |
| BN_CLICKED, change button style | bennyandthejets | Windows Programming | 9 | 09-11-2002 03:59 AM |