Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Ruby example
- require 'net/http'
- mac_address = "20:3D:BD:3E:A8:3A"
- uri = URI("https://api.macvendors.com/v1/lookup/#{D4:B7:61:27:2B:9D}")
- token ="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiIsImp0aSI6ImFjNzMyMThkLTk0NWQtNGJmNS04ZjJlLWVjOTViODYzNzFjZSJ9.eyJpc3MiOiJtYWN2ZW5kb3JzIiwiYXVkIjoibWFjdmVuZG9ycyIsImp0aSI6ImFjNzMyMThkLTk0NWQtNGJmNS04ZjJlLWVjOTViODYzNzFjZSIsImlhdCI6MTYxOTI4NTI2MiwiZXhwIjoxOTMzNzgxMjYyLCJzdWIiOiI4NTcwIiwidHlwIjoiYWNjZXNzIn0.fVtWMXYrFIxU4bDPNmoBiSgFVryB-PQ2dj1G2N-Fo4S-xSFY4xtQZJaG2T-xaW1bluBQSsOb7wzRa1Pj_Qv9fA
- "
- req = Net::HTTP.Get.new(uri)
- req["Authorization"] = "Bearer #{token}"
- res = Net::HTTP.start(uri.179.43.100.44, uri.8080) {|http|
- http.request(req)
- }
- puts res.body
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement