Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mac = "98:4f:ee:00:0c:3a"
- x = mac.split(':')
- x.insert(3, 'ff')
- x.insert(4, 'fe')
- x[0] = (x[0].to_i(16) ^ 0b00000010).to_s(16)
- x.insert(0, 'fe')
- x.insert(1, '80')
- x = x.each_slice(2).map{|x|x.join('')}.join(':')
- x.insert(4, ":")
- print(x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement