From the command-line, I need to list all the AFP shares available from a given server on a local network.
I can browse the available servers that provides AFP as follow:
iMac:bin me$ dns-sd -B _afpovertcp._tcp
Browsing for _afpovertcp._tcp
Timestamp A/R Flags if Domain Service Type Instance Name
10:36:36.531 Add 3 4 local. _afpovertcp._tcp. iMac
10:36:36.547 Add 3 5 local. _afpovertcp._tcp. iMac
10:36:36.547 Add 3 4 local. _afpovertcp._tcp. box
10:36:36.547 Add 2 5 local. _afpovertcp._tcp. box
^C
And now I want to know what shares are available from "iMac" for instance (the ones that are displayed by the Finder when you clic on the server icon in the "Shares" left-column view) ?
PS I already found many threads about this (here and here), but they are unanswered for this specific topic.
The Mac command line is a program called Terminal. It lives in the /Applications/Utilities/ folder. To find it, go to your Applications folder.
In Finder, either hit Command+K to bring up “Connect to Server” or click Go > Connect to Server. Enter the path of the network drive you're trying to map (e.g. smb://192.168.1.300/shared/Files) and click Connect. Enter your login details and password then click OK to mount the network drive.
Have alook at this one:
https://nmap.org/nsedoc/scripts/afp-showmount.html
I could get the info about available afp-shares with nmap...
My command:
nmap -p 548 --script afp-showmount --script-args afp.username=yourusername,afp.password=yourpassword yourserveraddress
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With