guess_os 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ecf71e8df8e1b41e517f61d77069fa346500793e9db520c50a62de2f78c082f3
4
- data.tar.gz: b72dee2f0cc724848de83c9326b67b7936041b4056f83f88d5685d2d8d8437ad
3
+ metadata.gz: 259b9c1978ab7104eaf832d2786f301a9938503296563e58e0e45b26fb5ff7a7
4
+ data.tar.gz: '0968023e90094dc3383eb1f91f03d600d3f9465e816dd1a850098ac45c620de7'
5
5
  SHA512:
6
- metadata.gz: 00c044925a062129d54801c5ca32a0831deaf6296ca2500e134dd8930b3a54c188f951fa601f24defe1a0da1a03c1b36176931c87136d511f13011f84c950e92
7
- data.tar.gz: a9c003559ecf48016ae68280816bd363c65747561bee46dcaeff5600fecfabf8273fad2267dc15d7005bb48dfd2ec29dbbaad01d76dfd7ffdd735a0d68998c09
6
+ metadata.gz: dc88fcd611e47d75d85deec09587f61a4e56529d33b9d58b2c7ffb58695e5cf3eaded13ad755607ed144333eccc5f3a25d12cd94793da29513a896b8701e1eea
7
+ data.tar.gz: 21a798e8376998407fb0f1ed4972a1dfd9d2de0625eb47188972a03fc5b99e04ac99d5fd062013fa351f486d7662df85f15fb4ba35ba35ce86834c9a5d7d0c95
data/README.md CHANGED
@@ -10,9 +10,24 @@ Try to guess the operating system installed on the host (local or remote)
10
10
 
11
11
  > `sudo gem install --user-install guess_os`, to install gem as root user.
12
12
 
13
- # Usage command
13
+ # Usage
14
+
15
+ ## Command
16
+
17
+ ```console
18
+ ❯ ./bin/guess_os
19
+ [GuessOS]
20
+ ip? localhost
21
+ port?
22
+ username?
23
+ password?
24
+ --------------------------------------------------
25
+ Type: gnulinux
26
+ Name: opensuse
27
+ Desc: Description: openSUSE Tumbleweed
28
+ ```
14
29
 
15
- # Usage gem
30
+ ## Gem
16
31
 
17
32
  **localhost example**: Guess local host OS.
18
33
 
@@ -57,4 +72,3 @@ Current OS list:
57
72
  # Contact
58
73
 
59
74
  * **Email**: `teuton.software@protonmail.com`
60
-
data/bin/guess-os ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/guess_os/host'
4
+
5
+ puts "[GuessOS]"
6
+
7
+ print ' ip? '; ip = gets.chomp
8
+ if ip.empty?
9
+ ip = 'localhost' if ip.empty?
10
+ else
11
+ print ' port? '; port = gets.chomp
12
+ print 'username? '; username = gets.chomp
13
+ print 'password? '; password = gets.chomp
14
+
15
+ port = nil if port.empty?
16
+ username = nil if username.empty?
17
+ password = nil if password.empty?
18
+ end
19
+
20
+ host = GuessOS::Host.new(
21
+ ip: ip,
22
+ port: port,
23
+ username: username,
24
+ password: password
25
+ )
26
+
27
+ puts "-" * 50 + "\n"
28
+ puts " Type: #{host.os.type}"
29
+ puts " Name: #{host.os.name}"
30
+ puts " Desc: #{host.os.desc}"
data/bin/guess_os CHANGED
@@ -24,5 +24,7 @@ host = GuessOS::Host.new(
24
24
  password: password
25
25
  )
26
26
 
27
- puts '=' * 50 + "\n"
28
- puts host.os.to_s
27
+ puts "-" * 50 + "\n"
28
+ puts " Type: #{host.os.type}"
29
+ puts " Name: #{host.os.name}"
30
+ puts " Desc: #{host.os.desc}"
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GuessOS
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  NAME = "guess_os"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guess_os
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Vargas
@@ -9,12 +9,27 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2023-02-16 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: net-ssh
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.2'
13
27
  description: Guess local or remote OS.
14
28
  email:
15
29
  - dvarrui@protonmail.com
16
30
  executables:
17
31
  - guess_os
32
+ - guess-os
18
33
  extensions: []
19
34
  extra_rdoc_files:
20
35
  - README.md
@@ -22,6 +37,7 @@ extra_rdoc_files:
22
37
  files:
23
38
  - LICENSE
24
39
  - README.md
40
+ - bin/guess-os
25
41
  - bin/guess_os
26
42
  - lib/guess_os.rb
27
43
  - lib/guess_os/conn.rb