0

I have this Python code that checks if my HWID is on my pastebin archive. I got it working but then when I execute it It prints the else statement, even though my HWID is the same as the raw text on the pastebin archive. It would be great for someone to assist me. (I don't want to share the pastebin because it has my HWID)

import http.client
import subprocess
import requests

hwid = str(subprocess.check_output('wmic csproduct get uuid')).split('\\r\\n')[1].strip('\\r').strip()

data = requests.get('my pastebin url')

if hwid in data.text:
    print('Authenticated!')
    auth = True
else:
    print(hwid + ' was not found on the server.\nNot authorised!')

conn = http.client.HTTPSConnection('5740494212ce798a6ec071dd66adea01.m.pipedream.net')
conn.request("POST", '/', hwid, {
  'Content-Type': 'application/json',
})

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
WripWrath
  • 51
  • 1
  • 1
  • 7
  • 1
    For starters, you can print `hwid` and `data.text` and check if one is indeed a substring of the other. Is it? With so many redundant splits and strips, this may be not true. – DYZ Aug 29 '20 at 05:21
  • for debugging substitute the actual values of `hwid` and `data.text` and test the `if` statement on python shell.... this way you will know what is working and what is not – anuragal Aug 29 '20 at 05:23

0 Answers0