Common guys why is so hard to teach someone something new? This is the tutorial section and are ment to spread knowledge.
What's the point of having a tutorial section if we are going to criticize every one that makes a question?
I really don't understand how can you infect someone by giving the link that contains localhost's address. There should be an advanced configuration I think. It's not that easy
.
It's not that hard. When you start up BeeF directly connected to the internet, having an external IP associated to your network card (check it out with ifconfig and make sure to know what's the difference between an internal IP and a external IP), BeeF should give you URI with your external IP.
After you have this Script on the outside you could include it on a phishing, hack a site and put it into an iframe, create a domain with a fake site and spread it, or just raise an Apache in the same IP with a simple HTML with beef embedded and pass your IP with a http:// to a friend of yours to test this tool.
Of course you could learn a lot of Javascript, that would be pretty useful for you but this is a very complete suite for attacks and it saves a lot of time. There's no need to reinvent the wheel.
Perhaps the best would be that you spend hours, days, weeks, years reading and reading but this can be a fun way to learn asking yourself "Why this works like this?" "Why it isn't working?" and such.
Cheers