Commit 30c657b 1 parent 6b048e6 commit 30c657b Copy full SHA for 30c657b
File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
require 'optparse'
4
4
options = { }
5
- VERSION = '1.4.0 '
5
+ VERSION = '1.4.1 '
6
6
7
7
optparse = OptionParser . new do |opts |
8
8
opts . banner = 'Usage: macchanger [options] device'
28
28
29
29
class MacChanger
30
30
def self . show ( device )
31
- show = `ifconfig #{ device } |grep ether`
31
+ show = `/sbin/ ifconfig #{ device } |grep ether`
32
32
show [ 7 , 17 ]
33
33
end
34
34
@@ -44,7 +44,7 @@ class MacChanger
44
44
end
45
45
46
46
def self . down? ( device )
47
- unless `ifconfig -d |grep -E '^#{ device } :'` . empty?
47
+ unless `/sbin/ ifconfig -d |grep -E '^#{ device } :'` . empty?
48
48
fail OptionParser ::InvalidArgument , "Device #{ device } is down"
49
49
end
50
50
end
@@ -60,7 +60,7 @@ class MacChanger
60
60
61
61
def self . set ( options )
62
62
if system ( "sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport #{ options [ :device ] } -z" )
63
- if system ( "sudo ifconfig #{ options [ :device ] } ether #{ options [ :mac ] } " )
63
+ if system ( "sudo /sbin/ ifconfig #{ options [ :device ] } ether #{ options [ :mac ] } " )
64
64
show ( options [ :device ] ) == options [ :mac ]
65
65
end
66
66
else
You can’t perform that action at this time.
0 commit comments