Project

guess_os

0.0
No release in over a year
Try to guess the operating system installed on the host (local or remote). Using SSH to connect remote host.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 7.0
 Project Readme

GuessOS

Try to guess the operating system installed on the host (local or remote). Using SSH to connect remote host.

But, What about nmap?

It is true that nmap already performs the function of finding out the OS. We didn't want to repeat the work of nmap. The idea of the gem is:

  • Work without nmap installed. Its posible some host have not installed.
  • nmap is fine but slow to return results. We wanted to integrate this functionality into another application and were not completely satisfied with the nmap response times.
  • In an extension of this gem we are thinking that it will use of nmap to obtain the results when it is a remote machine and we do not have SSH access to it.

Documentation

  1. Install Ruby on your system.
  2. gem install --user-install guess_os, to install gem as normal user.

sudo gem install guess_os, to install gem as root user.

Usage

WARNING

guess_os accepts several parameters (ip, username, password) to open an SSH connection to the remote host, and guess remote OS.

In the case of writing IP="localhost" SSH is not used.

Command

guess_os

[GuessOS]
      ip? localhost
    port?
username?
password?
--------------------------------------------------
  Type: gnulinux
  Name: opensuse
  Desc: Description: openSUSE Tumbleweed

Gem

localhost example: Guess local host OS.

require 'guess_os'

host = GuessOS::Host.new(ip: 'localhost')

puts host.os.type
puts host.os.name

Remote host example: Guess remote host OS. The connection is established via SSH.

require 'guess_os'

host = GuessOS::Host.new(
  ip: '192.168.1.42',
  port: 2241,
  username: 'vagrant',
  password: 'vagrant'
)

puts host.os.type
puts host.os.name

More examples

Current OS list:

OS type OS name
:gnulinux opensuse, debian, ubuntu, manjaro, mint
:windows windows
:macos macos
:cygwin cygwin
:minix minix
:unkown unkown

Contact

  • Email: teuton.software@protonmail.com