Re: netstat & port scanning
site_archiver@lists.apple.com Delivered-To: macnetworkprog@lists.apple.com User-agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) Josh Graessley wrote: #include <netinet6/ip6_var.h> -josh On Sep 26, 2005, at 2:48 AM, Apple Developer wrote: Hi, Thank you, This email sent to jgraessley@apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/macnetworkprog/site_archiver%40lists.... netstat doesn't do a portscan. A portscan attempts to connect to various ports to determine what's open. netstat uses sysctls to get information from the kernel about which ports are open. I believe the network utility performs a classic port scan, iterating through the ports attempting to connect to each one. it is my understanding that netstat tells you the state of an address.port (I needed to do other sysctls calls as well) I was only interested in the code that checks if the port is open/closed, and was looking for code to does this. The ip6stat structure is a private structure. This structure is likely to change from release to release. Since netstat is recompiled by Apple with every release where the structure changes, this isn't a problem. If a third party used that data structure, they would find that their program broke every time we changed the data structure. I downloaded netstat from darwin sources and was unable to compile due to files not present in 10.4.x for example is not found with spotlight. Was not sure if there was anything else I needed to download to get it to compile. I was able to get nc to compile from the cmd line and get the code that I needed from that. I need to get the status of a port (open or closed). I have attempted to get netstat from the darwin sources to compile, but found problems in that 'ip6stat' structure was not found (a .h file is not found in 10.4). Does anyone else know of any source that can do a port scan like the network utility does? Randy _______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/macnetworkprog/jgraessley% 40apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Apple Developer