LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-26-2008, 03:03 PM   #1
author_unknown
Member
 
Registered: Aug 2007
Location: Buffalo, NY
Distribution: Fedora 7, RHEL5, CentOS 5 and Backtrack 2.0
Posts: 73

Rep: Reputation: 15
need u guyz for making my portscanner work


hi Folks!!!!!

i hv made an attempt to make a portscanner using C by making use of socket programming.. everything is fine... the programs works well but when i compare the result with that of nmap... there are three changes...it shows 3 extra open ports than nmap... two of them are 2207 nd 2208 nd the other is a high order port which changes each time i run my program nd has been always above 50000 so far which i guess to be the port to which my portscanner binds itself.... Now the question is which services r binding themselves to ports 2208 nd 2207.... there is no entry in /etc/services regarding these two ports... however... they do appear to be listening when i execute netstat -ntlp frm the shell....... another question is to kick out the port frm the output to which my portscannner binds itself......nd the third question is that how can i make my portscanner match the list of open ports it finds to the entries in /etc/services... so dat it can pick up the name of that service nd print the name of the service in the output on the shell.



Waiting 4 ur responses....

author_unknown
 
Old 03-26-2008, 04:08 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
2208 & 2207: I found them to be related to certain HP printers. They may be also used by troyans etc.

What method of portscanning do you use? The results will depend on that. So will do the way you open your portscanner port: is it raw, tcp, udp?

When it comes to service names, check getservent() function and the related ones (from man servent). getservbyport() seems to be the right one for you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hi Guyz stephen84s LinuxQuestions.org Member Intro 3 01-18-2007 01:35 AM
hEY gUYZ BHARATH HAS ARRIVED bchintala LinuxQuestions.org Member Intro 1 06-08-2004 02:54 PM
Portscanner? zexter Linux - Security 3 11-19-2003 07:42 AM
portscanner on my linux box-help please rhodespc Linux - Security 11 11-09-2003 05:23 PM
Is there a linux portscanner? jon_k Linux - Software 10 07-26-2003 04:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration