Socket
Book a DemoInstallSign in
Socket

guess_os

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

guess_os

0.1.15
bundlerRubygems
Version published
Maintainers
1
Created
Source

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

  • Install Ruby on your system.
  • 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 typeOS name
:gnulinuxopensuse, debian, ubuntu, manjaro, mint
:windowswindows
:macosmacos
:cygwincygwin
:minixminix
:unkownunkown

Contact

  • Email: teuton.software@protonmail.com

FAQs

Package last updated on 27 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.