Category : vb.net

I am trying to take a Python program and convert it into VB.Net. It uses the PyTryFi ( https://pypi.org/project/pytryfi/ ). I am able to get a sessionId, userId from logging in. It uses GraphQL to access the data. The PyTryFi uses the sessionId.get which I am trying to achieve in .Net but not having any ..

Read more

I want someone to convert this code for me from python to vb.net import hmac import hashlib import base64 def _checksum(self): checksum = ‘eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiJkYzBmMjRiYS1iYTYzLTQyMjktYTIzZS05ZjY1MTNlYzNlM2IiLCJzdWIiOiI2OTUwODA0IiwiaWRfc2Vzc2lvbiI6Ijc4ODJhN2ZkLTFhY2YtMzM5NS04YWUwLWUwNGE4ODYzZjg1MCIsImF1dGhvcml0aWVzIjpbIkVuZFVzZXJSb2xlIl0sImFwaXAiOiIxOTYuMjM1LjgxLjcxIiwiY2xpZW50X2lkIjoidExwaXRSaXJscGhvZmFjbGh1c3RsemlTcGlXZXdybDkiLCJpYXQiOjE2MjQzOTk0ODgsImV4cCI6MTYyNDQxMzg4OCwiaWRfc3NvIjoyMzc1OTM3LCJpZF9kZXZpY2UiOiJYS0RsTTFibHhSZUFDTGpHS3pob3lnPT0ifQ.Pgt-0x5rknSsZjamnQ6ZwgIIy1yW8j8b5IODnP79GicHfVjTfjVLFefx85KDV_upADrzije3oUMnO0UU1KGia8S_wIDpsDcn4aAcnagPogEnwcw9Eroe_LOgorbFwDuFYWLqCGBSRsevcO8sN6QNJ_z2TjjYEs-RkiKGgLTpijZ1sxLNpu1pfTlhA1IfuKSrs0skyeUbGat6nLgEvqG6IJx-3UXs4KeFtcZZRNNFQwbzhf3duqbPOQQIEcsORSWQglfAQvVuv9WuOoaF2IQ3lut_db6ouMN7xtUv5n-KzKFPxufKnSmT-X5xot-f29IUQHB1kTeVz4IXT_PCe6mU-A749.6.4’ checksum = hmac.new(SECRET_KEY.encode(‘utf8’), msg=checksum.encode(‘utf8’), digestmod=hashlib.sha256).digest() return base64.b64encode(checksum).decode(‘utf8’) Source: Python..

Read more

I have a Python code that I want to convert to vb.net import base64 from Crypto.Cipher import AES def decrypt(enc): unpad = lambda s: s[:-ord(s[len(s) – 1:])] private_key = base64.b64decode("loACCyXcAAlsCHFPlwu+RwUfDwJzPObKC0Us9w9dsAY=") enc = base64.b64decode(enc) iv = enc[:16] cipher = AES.new(private_key, AES.MODE_CBC, iv) return unpad(cipher.decrypt(enc[16:])) print(decrypt("QAWhEk+FdZzNXdv+OAGBp+4zMMhKfTyUbegMOX9On/Z9EFNIQXrUIyY8gnxNpNPc15OHWv8ckxzmrK4AHnc9cnDL7Df3KfzkEOnLEcW6PmD+V+1Q0CpZn9rWkScpLwIIQiaukMuyOwcQULbAWdWXPQ==")) I converted it but the code is wrong Imports base64 Imports ..

Read more