File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,24 @@ def file(self, fileid):
241241 time .sleep (5 )
242242 sys .exit ()
243243 return binascii .unhexlify (json ["contents" ])
244+
245+ def check (self ):
246+ init_iv = SHA256 .new (str (uuid4 ())[:8 ].encode ()).hexdigest ()
247+ post_data = {
248+ "type" : binascii .hexlify (("check" ).encode ()),
249+ "sessionid" : binascii .hexlify (self .sessionid .encode ()),
250+ "name" : binascii .hexlify (self .name .encode ()),
251+ "ownerid" : binascii .hexlify (self .ownerid .encode ()),
252+ "init_iv" : init_iv
253+ }
254+ response = self .__do_request (post_data )
255+
256+ response = encryption .decrypt (response , self .enckey , init_iv )
257+ json = jsond .loads (response )
258+ if json ["success" ]:
259+ return True
260+ else :
261+ return False
244262
245263 def webhook (self , webid , param ):
246264
Original file line number Diff line number Diff line change 19193.Upgrade
20204.License Key Only
2121""" )
22+ print (f"Current Session Validation Status: { keyauthapp .check ()} " )
2223ans = input ("Select Option: " )
2324if ans == "1" :
2425 user = input ('Provide username: ' )
4748print ("Created at: " + datetime .utcfromtimestamp (int (keyauthapp .user_data .createdate )).strftime ('%Y-%m-%d %H:%M:%S' ))
4849print ("Last login at: " + datetime .utcfromtimestamp (int (keyauthapp .user_data .lastlogin )).strftime ('%Y-%m-%d %H:%M:%S' ))
4950print ("Expires at: " + datetime .utcfromtimestamp (int (keyauthapp .user_data .expires )).strftime ('%Y-%m-%d %H:%M:%S' ))
51+ print (f"Current Session Validation Status: { keyauthapp .check ()} " )
You can’t perform that action at this time.
0 commit comments