Results 1 to 10 of 10

Thread: Port Scanner

  1. #1
    Senior Member
    Join Date
    Jun 2003

    Port Scanner

    Hello Everyone...
    Its me here again.Well I am looking to write a port scanner for a network that could let the users know that ports are open. Any help regarding this would be highly appreciated. I want to program this in C or Visual C. I am a complete n00b in network programming. Any good refernces for network programming would also be a great help.
    Another question that bogs my mind is that if someone came to know that these ports are open ,and security can be compromised or breached, how would one close those relevant ports.
    Thirdly are there any tools that can open closed ports for certain purposes. These questions are acdemically oriented and i do not use the information in a wrong way. I ve heard that NETCAT can be used to open closed ports.
    Thank you for reading out. I am obliged.

  2. #2
    I assume listening and open are the same thing. Now, if an app does listen on a certain port, it doesn't mean the port needs to be closed.

    Your app may serve an enduser better by warning of the listening port and maybe it helps check for any known exploits on that port. I wouldn't go as far as closing the ports, apps need the ports to be open.
    - Boyam

  3. #3
    AO Decepticon CXGJarrod's Avatar
    Join Date
    Jul 2002
    I wonder why so many people have wanted to write port scanners lately: Here is a link to another discussion you might find relevent.
    N00b> STFU i r teh 1337 (english: You must be mistaken, good sir or madam. I believe myself to be quite a good player. On an unrelated matter, I also apparently enjoy math.)

  4. #4
    Join Date
    Jun 2003
    Ok, for letting users know what ports are open considering that you are using. Windows.

    Go to Start-->Run--> have the user type in Command.

    And then after that have then type in Netstat -n

    That will show you all open ports. Save you the time of having to right the bloody scanner.
    Now for opening up ports I am not sure but, you can just us an exploit on Your Firewall. Like let's say that you are using Zone Alarm. You can. Hold up I will hold that one. Pm me if you want to know that Exploit.

    But yeah that should do it for opens ports.

  5. #5
    Senior Member
    Join Date
    Jun 2003
    is'nt a great help??need more suggestions

  6. #6
    Senior Member tampabay420's Avatar
    Join Date
    Aug 2002
    too bad it's not in C, but here is an application that i wrote a while back (some of the Netstat API code was taken from CodeGuru.com i think...)


    Netcat can be used to listen on specific port...
     netcat -l -p 100
    yeah, I\'m gonna need that by friday...

  7. #7
    Elite Hacker
    Join Date
    Mar 2003
    Another question that bogs my mind is that if someone came to know that these ports are open ,and security can be compromised or breached, how would one close those relevant ports.
    If I were you then I would just install a firewall that should by default block all ports. Then I would open them up as needed, like if you had a web server you would open up port 80 on the firewall, or if you had realVNC server installed you would open up port 5900. Hopefully your firewall allows you to customize it like this. I used to use the free version of zonealarm and it didn't really let you customize it, it would just ask you if you wanted to let realVNC act as a server, then I would say yes, and that would open up port 5900.

  8. #8
    Master-Jedi-Pimps0r & Moderator thehorse13's Avatar
    Join Date
    Dec 2002
    Washington D.C. area
    In my opinion, why recreate the wheel when you can get the best port scanner (and more) on the planet for free?!


    Also, you can easily write a simple port scanner in PERL. It would take about 10 lines of code.

    NetCat can be configured to listen on ports but the wording of your question suggests that you can select a closed port and open it remotely with NetCat. This is not possible. If there were such a tool, the internet would be in chaos.

    Our scars have the power to remind us that our past was real. -- Hannibal Lecter.
    Talent is God given. Be humble. Fame is man-given. Be grateful. Conceit is self-given. Be careful. -- John Wooden

  9. #9
    Most of the time, I would agree with thehorse13, but I suppose that there is always room for new ideas and new ways of doing things.

    What port scanner do you suppose was the best before nmap? What would have happened if someone had told fyodor not to bother writing a scanner since he would just be reinventing the wheel?

    Ommy, if you're just looking for a way to do a portscan, then I agree with thehorse13 that nmap is the way to go. But if you're interested in making a better, faster portscanner, then more power to you and let me know if there's any assistance I could provide.

  10. #10
    AO Ancient: Team Leader
    Join Date
    Oct 2002

    But if you're interested in making a better, faster portscanner
    It's the faster bit thats the real issue..... You show yourself to my IDS or firewall too quickly and you are toasted..... So a distributed system is in order, that reports back to a central scanner..... But if you don't own the distributed systems that is probably illegal....

    Just a thunk......
    Don\'t SYN us.... We\'ll SYN you.....
    \"A nation that draws too broad a difference between its scholars and its warriors will have its thinking done by cowards, and its fighting done by fools.\" - Thucydides

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts