Advertisement
AtomicOs

php

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