LinuxQuestions.org
Help answer threads with 0 replies.
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 04-22-2008, 01:54 PM   #1
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Probing a network in Java


I'm writing a manufacturing inventory system in Java, and - for the life of me - I can't figure out what it is I need to search for, or how to probe a network for a particular server type.

For the client installer, I'm trying to get it to probe the network for any SQL servers, but I have no idea where to even start with this.

If there's any thought about it, I'm not in school, and this isn't a homework help request.
 
Old 04-22-2008, 03:56 PM   #2
rg.viza
Member
 
Registered: Aug 2006
Posts: 74

Rep: Reputation: 15
Indienick,

TBH, the user will just have to know what they are connecting to. In today's world figuring this out for them could be quite hazardous to your user's career (and yours by extension) if you resort to TCP connection tests.

That would look malicious to an IDS and amounts to a port scan. If they have a zealous and competent security staff at the place, they'll be at your user's desk within a couple of minutes.

You could try listening for UDP broadcasts, but security conscious dbas will limit udp to the local database server subnet. You really don't want to broadcast your db server's heartbeat (or whatever) to the entire network. It's just not a good thing to do.

IMHO this is probably the last thing you should worry about and could do more harm than good.

-Viz
 
Old 04-22-2008, 05:47 PM   #3
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
Have a look at java.net package classes and look for Java networking librairies(for utilities such as ping, etc.)
For example when you telnet a mysql server : telnet somehost.com 3306, there is a mysql response string which you can read. The string contains the server name and version.
 
Old 04-23-2008, 07:57 AM   #4
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Original Poster
Rep: Reputation: 65
Thanks for the responses!

I'll definitely post my results when I get the chance to test it out; I figured I would have to use the java.net package, but I didn't know what on Earth I would do with it.
 
  


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
Probing for new hardware zillah Linux - Hardware 2 02-20-2005 07:35 AM
Probing disk gsrikanth Linux - Hardware 3 11-25-2004 11:39 PM
Probing Monitor rajatgarg Linux - Hardware 2 01-13-2004 04:33 PM
boot WITHOUT probing hamish Red Hat 5 10-07-2003 10:33 AM
probing Joey.Dale Linux - General 2 08-28-2003 10:58 AM

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

All times are GMT -5. The time now is 05:07 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