guess_os 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/.standard.yml +3 -0
  3. data/CHANGELOG.md +5 -0
  4. data/Gemfile +12 -0
  5. data/Gemfile.lock +48 -0
  6. data/LICENSE +674 -0
  7. data/README.md +30 -0
  8. data/Rakefile +19 -0
  9. data/examples/demo-1-input.rb +25 -0
  10. data/examples/demo-2-input.rb +40 -0
  11. data/examples/demo-3-staticvalues.rb +9 -0
  12. data/examples/demo-4-staticvalues.rb +28 -0
  13. data/guess_os.gemspec +38 -0
  14. data/lib/guess_os/conn.rb +76 -0
  15. data/lib/guess_os/host.rb +27 -0
  16. data/lib/guess_os/os.rb +16 -0
  17. data/lib/guess_os/type.rb +92 -0
  18. data/lib/guess_os/version.rb +6 -0
  19. data/lib/guess_os.rb +7 -0
  20. data/sig/guess_os.rbs +4 -0
  21. data/vagrant/.gitignore +5 -0
  22. data/vagrant/debian/.gitignore +2 -0
  23. data/vagrant/debian/Vagrantfile +23 -0
  24. data/vagrant/manjaro/.gitignore +3 -0
  25. data/vagrant/manjaro/Vagrantfile +22 -0
  26. data/vagrant/manjaro/Vagrantfile.1mv +26 -0
  27. data/vagrant/minix/.gitignore +3 -0
  28. data/vagrant/minix/README.md +6 -0
  29. data/vagrant/minix/Vagrantfile +19 -0
  30. data/vagrant/opensuse/.gitignore +4 -0
  31. data/vagrant/opensuse/Vagrantfile +25 -0
  32. data/vagrant/opensuse.kde/.gitignore +1 -0
  33. data/vagrant/opensuse.kde/Vagrantfile +20 -0
  34. data/vagrant/ubuntu/.gitignore +2 -0
  35. data/vagrant/ubuntu/02-install-software.rb +27 -0
  36. data/vagrant/ubuntu/Vagrantfile +27 -0
  37. data/vagrant/ubuntu/install-software.rb +27 -0
  38. data/vagrant/windows10/.gitignore +1 -0
  39. data/vagrant/windows10/Vagrantfile +17 -0
  40. data/vagrant/windows10/Vagrantfile.edge +19 -0
  41. data/vagrant/windows7/.gitignore +2 -0
  42. data/vagrant/windows7/Vagrantfile +21 -0
  43. data/vagrant/winserver/.gitignore +3 -0
  44. data/vagrant/winserver/Vagrantfile +19 -0
  45. metadata +88 -0
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ text = <<-TEXT
4
+ apt install -y vim tree nmap
5
+ apt install -y git
6
+ apt install -y figlet
7
+
8
+ figlet ubuntu > /etc/motd
9
+ echo "" >> /etc/motd
10
+ echo "David Vargas Ruiz" >> /etc/motd
11
+ echo "https://github.com/dvarrui" >> /etc/motd
12
+
13
+ echo "# Adding more alias" >> /home/vagrant/.bashrc
14
+ echo "alias c='clear'" >> /home/vagrant/.bashrc
15
+ echo "alias v='vdir'" >> /home/vagrant/.bashrc
16
+
17
+ lsb_release -d
18
+ TEXT
19
+
20
+ lines = text.split("\n")
21
+ total = lines.size
22
+ lines.each_with_index do |line, index|
23
+ print "=" * 10
24
+ print " [ INFO ] Step #{index + 1}/#{total}"
25
+ puts "=" * 10
26
+ system(line)
27
+ end
@@ -0,0 +1 @@
1
+ .vagrant
@@ -0,0 +1,17 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ Vagrant.configure("2") do |config|
5
+ config.vm.define "vagrant-windows10" do |i|
6
+ i.vm.box = "senglin/win-10-enterprise-vs2015community"
7
+ i.vm.box_version = "1.0.0"
8
+ i.vm.hostname = "vagrant-windows10"
9
+ # i.vm.network "public_network", bridge: [ "eth0" ]
10
+ i.vm.network :forwarded_port, guest: 22, host: 2211
11
+ i.vm.synced_folder "./", "/vagrant"
12
+ i.vm.provider "virtualbox" do |v|
13
+ v.name = "vagrant-windows10"
14
+ v.memory = 2048
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,19 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ Vagrant.configure("2") do |config|
5
+ config.vm.define "windows10" do |i|
6
+ i.vm.box = "Microsoft/EdgeOnWindows10"
7
+ i.vm.box_version = "1.0"
8
+ i.vm.hostname = "profesor42w10"
9
+ i.vm.network "public_network", bridge: [ "eth0" ]
10
+ i.vm.network :forwarded_port, guest: 80, host: 8081
11
+ i.vm.provider "virtualbox" do |v|
12
+ v.name = "windows10-edge"
13
+ v.memory = 2048
14
+ end
15
+
16
+ i.ssh.username = "IEUser"
17
+ i.ssh.password = "Passw0rd"
18
+ end
19
+ end
@@ -0,0 +1,2 @@
1
+ .vagrant
2
+ private*
@@ -0,0 +1,21 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ HOSTNAME = "vagrant-windows7"
5
+
6
+ Vagrant.configure("2") do |config|
7
+ config.vm.define HOSTNAME do |i|
8
+ i.vm.box = "gusztavvargadr/windows-server"
9
+ i.vm.hostname = HOSTNAME
10
+ # i.vm.network "public_network", bridge: [ "eth0" ]
11
+ i.vm.network "public_network", bridge: ["wlan0"]
12
+ # i.vm.network :forwarded_port, guest: 22, host: 1122
13
+ i.vm.synced_folder "./", "/vagrant"
14
+ # i.ssh.username = "IEUser"
15
+ # i.ssh.password = "Passw0rd"
16
+ i.vm.provider "virtualbox" do |v|
17
+ v.name = HOSTNAME
18
+ v.memory = 2048
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,3 @@
1
+ .vagrant
2
+ *.log
3
+ private*
@@ -0,0 +1,19 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ Vagrant.configure("2") do |config|
5
+ config.vm.define "vagrant-winserver" do |i|
6
+ i.vm.box = "gusztavvargadr/windows-server"
7
+ i.vm.hostname = "vagrant-winserver"
8
+ # i.vm.network "public_network", bridge: [ "eth0" ]
9
+ # i.vm.network "public_network", bridge: [ "wlan0" ]
10
+ i.vm.network :forwarded_port, guest: 22, host: 2221
11
+ i.vm.synced_folder "./", "/vagrant"
12
+ # i.ssh.username = "IEUser"
13
+ # i.ssh.password = "Passw0rd"
14
+ i.vm.provider "virtualbox" do |v|
15
+ v.name = "vagrant-winserver"
16
+ v.memory = 2048
17
+ end
18
+ end
19
+ end
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: guess_os
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - David Vargas
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-07-05 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Guess local or remote OS.
14
+ email:
15
+ - dvarrui@protonmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".standard.yml"
21
+ - CHANGELOG.md
22
+ - Gemfile
23
+ - Gemfile.lock
24
+ - LICENSE
25
+ - README.md
26
+ - Rakefile
27
+ - examples/demo-1-input.rb
28
+ - examples/demo-2-input.rb
29
+ - examples/demo-3-staticvalues.rb
30
+ - examples/demo-4-staticvalues.rb
31
+ - guess_os.gemspec
32
+ - lib/guess_os.rb
33
+ - lib/guess_os/conn.rb
34
+ - lib/guess_os/host.rb
35
+ - lib/guess_os/os.rb
36
+ - lib/guess_os/type.rb
37
+ - lib/guess_os/version.rb
38
+ - sig/guess_os.rbs
39
+ - vagrant/.gitignore
40
+ - vagrant/debian/.gitignore
41
+ - vagrant/debian/Vagrantfile
42
+ - vagrant/manjaro/.gitignore
43
+ - vagrant/manjaro/Vagrantfile
44
+ - vagrant/manjaro/Vagrantfile.1mv
45
+ - vagrant/minix/.gitignore
46
+ - vagrant/minix/README.md
47
+ - vagrant/minix/Vagrantfile
48
+ - vagrant/opensuse.kde/.gitignore
49
+ - vagrant/opensuse.kde/Vagrantfile
50
+ - vagrant/opensuse/.gitignore
51
+ - vagrant/opensuse/Vagrantfile
52
+ - vagrant/ubuntu/.gitignore
53
+ - vagrant/ubuntu/02-install-software.rb
54
+ - vagrant/ubuntu/Vagrantfile
55
+ - vagrant/ubuntu/install-software.rb
56
+ - vagrant/windows10/.gitignore
57
+ - vagrant/windows10/Vagrantfile
58
+ - vagrant/windows10/Vagrantfile.edge
59
+ - vagrant/windows7/.gitignore
60
+ - vagrant/windows7/Vagrantfile
61
+ - vagrant/winserver/.gitignore
62
+ - vagrant/winserver/Vagrantfile
63
+ homepage: https://github.com/dvarrui/guess_os
64
+ licenses: []
65
+ metadata:
66
+ homepage_uri: https://github.com/dvarrui/guess_os
67
+ source_code_uri: https://github.com/dvarrui/guess_os
68
+ changelog_uri: https://github.com/dvarrui/guess_os/CHANGELOG.md
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: 2.6.0
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ requirements: []
84
+ rubygems_version: 3.1.6
85
+ signing_key:
86
+ specification_version: 4
87
+ summary: Guess local or remote OS.
88
+ test_files: []