File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,24 @@ def file(self, fileid):
231231 time .sleep (5 )
232232 sys .exit ()
233233 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
234252
235253 def webhook (self , webid , param ):
236254
You can’t perform that action at this time.
0 commit comments