is it possible?
i only want it to port scan the computer its being run on
Hello awesomex,
Do you mean “Is it possible to create an applescript which would get computer info about a particular computer’s hardware configuration (in this case scanner ports)?”? In which case, I would say “Yes, it is possible.” and recommend using something like Extra Suites:
Sincerely,
Variable as the shade
no a portscanner
like
port 20 is ftp
and 21 is http
those kinds of ports
The short answer is this isn’t possible. Network Utility is not scriptable so you can’t use it’s port scanning function. I don’t know what command line utility handles port scanning. I tried looking for one that came installed by default but couldn’t come up with anything that stood out. There is command line utility called “nmap” that you could download and, if it’s not interactive, call from AS using “do shell script”. Other than that, I don’t think it’s possible.
I guess my question is, why not just use Network Utility? I can’t imagine an AS could do it in many fewer steps than, open, click a tab, type in the address, hit enter. You’d get rid of the click a tab step but the rest would still be necessary. Network Utility even remebers the last address you scanned so that step can be taken out after the frist time.
but how would you do it to yourself?
what is your home ip
120.0.0.1?
and i know you can becuse theres some kind of shell script i could do
Your real IP Address is either assigned by your service provider OR by your own router, if you have one. The special IP address 127.0.0.1 is always supposed to refer to the machine itself.
What command are you planning to use to do the portscan? If you already have a command-line program that can do this, just use the IP Address 127.0.0.1 and either give your utility a range of ports to check, or a specific port, if it requires it.
More information would be helpful.
Right, to target yourself you should either use 127.0.0.1 or “localhost”. Both will work.
Also, it’s probably best to just use “Network Utility” to do the port scanning. I know “localhost” works there and it also provides options for scanning only a specified range of ports.
Hope this helps.