Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

this may be kind of an odd question. My friend has challenged me. So somehow, he change the "port" of his site to 31337. If you just go to domain.com, you get redirected to google, to access the real site you go to domain.com:31337. He is going to change it again and he is challenging me to find out which port it is. Is this possible without guessing? Hopefully someone can help! Thanks. Oh, and is this the right stack exchange site to post this on...

share|improve this question

closed as not a real question by Su', John Conde Sep 27 '12 at 1:08

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
This topic is kind of marginal for this site, but I'd say it's probably OK. It might be better suited for security.SE, but that's really only obvious if you already know the answer. You could flag your question for migration there by a ♦ mod, if you want. –  Ilmari Karonen Sep 7 '12 at 12:56

3 Answers 3

You can use any port scanner - nmap being one of the most common.

Since this is your friend's machine and its a challenge, a full connect scan should not be a problem. A full connect will not only find the ports that are open but will also find the services/applications listening on it.

I just did a quick nmap scan from on my own linux box and in the output below you can see it detects the open ports, the service they are running and the application behind it. It shows that I am running webservers (http service) on 80 and 3000 which should be accessible on http://localhost:80 (same as http://localhost) and http://localhost:3000

The command I used is :

nmap -v -sV -T4 -F 127.0.0.1

If you are on windows and want a nice GUI version of nmap, install zenmap

enter image description here

share|improve this answer

Use nmap to port scan you can perform all types of scans some without being detected. If the port is open you'll find it there's no way to hide an open port.

share|improve this answer

This is such a vast topic (yes, for doing a simple task, many many methods). It would be impossible for me to say anything but this: You are looking for a port scanner. It can be written in any language under the sun, from PHP to C to Perl, Delphi, Python, whatever. You can run it from your local computer (executable) or from a website (remotely).

Now be warned: some firewalls will detect your scans, and maybe blacklist your IP for (example, Project Honeypot). This could land you in some nasty places. So use this only for your friend's game.

Basically how it works though, is your script or program will send a few packets (of varying species) to essentially every port from 0-65535 on the remote host. A stealth scan only sends partial packets, just enough to register that the host is 'listening' on that port, so that it can evade some firewalls or be (less) traceable.

I advise you take a read: http://en.wikipedia.org/wiki/Port_scanner

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.