Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Remote OS Detection

by pankaj_it09 (Scribe)
on Apr 07, 2010 at 08:40 UTC ( #833226=perlquestion: print w/replies, xml ) Need Help??
pankaj_it09 has asked for the wisdom of the Perl Monks concerning the following question:

I have the admin username and password of a remote machine.

I want to determine the OS type of the remote machine .

How to do that ?

Replies are listed 'Best First'.
Re: Remote OS Detection
by marto (Archbishop) on Apr 07, 2010 at 08:52 UTC

    If the remote host has perl you login (via ssh) and use $OSNAME or $^O, see perlvar. man uname on a *nix host may be what you're looking for.

      No the remote host need not have Perl or SSH.

      Also the OS can be Windows, Unix etc.

        Then you need to think about how you would query such systems. I suspect that, once again, you've been given a task to do at work and the first thing you've done is post a poor question here asking for advice, without even doing any research for yourself. It doesn't even sound like you're looking for a perl based solution to this. Various open source projects already exist for the purposes of monitoring and auditing networks of computers.

        You want p0f. There's a perl wrapper in Net::P0f. Unfortunately it has failing tests.
Re: Remote OS Detection
by ZlR (Chaplain) on Apr 07, 2010 at 12:09 UTC
    I would use nmap to do that.
        What a fascinating article ! Modifying the kernel's tcp stack to fool nmap, that's some level of extremism i had not seen before :)
Re: Remote OS Detection
by Anonymous Monk on Apr 07, 2010 at 08:52 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://833226]
Approved by Hue-Bond
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2018-06-24 18:36 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.