hwid 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hwid/base.rb +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1ddba97eb04afa0e369f6ea6bb0d7fead646b6c659e9248ed199ba32b1d2d51
|
4
|
+
data.tar.gz: f1b3efe3f416d71a3bb80febb9106cd04d2259f9d8b966e310e46e3e13df042c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1dcabb6f5ef8adb5281cdae85a96902b2eb67cf8a882ba242b862d1ad44612b476408f610e061912c1ea6d61d85bfd7aaf5d5cdb19af3d3004aaaad2887b974
|
7
|
+
data.tar.gz: e87d5b4d3524d5d02afffc2d4a0ebe01f3fe9553703f30e724f69a6bad924f2d8c232f056b0fc75722b6da21f6a07fafc5c65be7200e245992f6b763cfa1e00e
|
data/lib/hwid/base.rb
CHANGED
@@ -30,14 +30,14 @@ module Hwid
|
|
30
30
|
platform << "x86" if (/x86/ =~ RUBY_PLATFORM) != nil
|
31
31
|
platform << "i686" if (/i686/ =~ RUBY_PLATFORM) != nil
|
32
32
|
platform << "debian" if `uname -a`.include?('Debian')
|
33
|
-
platform << "microsoft" if
|
33
|
+
platform << "microsoft" if `uname -a`.include?('Microsoft')
|
34
34
|
platform << "ubuntu" if `uname -a`.include?('Ubuntu')
|
35
35
|
platform << "linux" if (/linux/ =~ RUBY_PLATFORM) != nil
|
36
36
|
platform
|
37
37
|
end
|
38
38
|
def systemid
|
39
39
|
platform=get_platform
|
40
|
-
|
40
|
+
puts "debug: platform is #{platform} #{RUBY_PLATFORM}"
|
41
41
|
return get_rasp_id if platform.include?("raspberry")
|
42
42
|
return get_rasp_id if platform.include?("raspberry 2")
|
43
43
|
return get_mac_id if platform.include?("mac")
|
@@ -63,8 +63,9 @@ module Hwid
|
|
63
63
|
puts "running windows linux sigh"
|
64
64
|
res=run_cmd("lshw -quiet -class network -disable usb -disable spd | grep -oP '(serial: )\\K.*'")
|
65
65
|
res=res.gsub("0000-","")
|
66
|
-
res=res.
|
66
|
+
res=res.gsub(":","")
|
67
67
|
res=res.gsub("\n","")
|
68
|
+
res=res.gsub(" ","")
|
68
69
|
#res=run_cmd("lshw | grep -A 10 '*-cpu' | grep -oP '(serial: )\\K.*'")
|
69
70
|
#puts "Interim result is #{res.inspect}"
|
70
71
|
res=res.chomp
|