SHARE
TWEET

Untitled

a guest Apr 26th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import time
  2. import json
  3. import http.client, urllib
  4. import requests
  5.  
  6. from selenium import webdriver
  7. from selenium.webdriver.common.by import By
  8.  
  9. browser = webdriver.Chrome("/usr/lib/chromium-browser/chromedriver")
  10. browser.get('https://valve.github.io/fingerprintjs2/')
  11. value = browser.find_element(By.ID, 'fp').text
  12. details = browser.find_element(By.ID, 'details').text
  13.  
  14. time.sleep(2)
  15. tmpd = "'details' : '" + details + "'"
  16. tmph = "'hash' : '" + value + "'"
  17. _details = json.dumps(tmpd)
  18. _hash = json.dumps(tmph)
  19. time.sleep(2)
  20. browser.get('http://10.0.2.2:8000/fingerprinting')
  21. time.sleep(2)
  22. browser.quit()
  23.  
  24.  
  25. endpoint_detail = 'http://10.0.2.2:8000/sendFingerprintDetail'
  26. endpoint_hash = 'http://10.0.2.2:8000/sendFingerprintHash'
  27. headers = {'Content-Type': 'application/json'}
  28. r1 = requests.post(endpoint_detail, data=_details, headers=headers)
  29. r2 = requests.post(endpoint_hash, data=_hash, headers=headers)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top