We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f7938b commit 70b8c75Copy full SHA for 70b8c75
1 file changed
keyauth.py
@@ -231,6 +231,24 @@ def file(self, fileid):
231
time.sleep(5)
232
sys.exit()
233
return binascii.unhexlify(json["contents"])
234
+
235
+ def check(self):
236
+ init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest()
237
+ post_data = {
238
+ "type": binascii.hexlify(("check").encode()),
239
+ "sessionid": binascii.hexlify(self.sessionid.encode()),
240
+ "name": binascii.hexlify(self.name.encode()),
241
+ "ownerid": binascii.hexlify(self.ownerid.encode()),
242
+ "init_iv": init_iv
243
+ }
244
+ response = self.__do_request(post_data)
245
246
+ response = encryption.decrypt(response, self.enckey, init_iv)
247
+ json = jsond.loads(response)
248
+ if json["success"]:
249
+ return True
250
+ else:
251
+ return False
252
253
def webhook(self, webid, param):
254
0 commit comments