-
-
Save alexwh/68c897e55b72f15ffde7e593c0d9cddb to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3 | |
import sys | |
import struct | |
import base64 | |
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes | |
from cryptography.hazmat.primitives import padding | |
key = [26, 81, 131, 250, 10, 187, 159, 184, 11, 73, 15, 155, 49, 88, 34, 42, 208, 18, 72, 255, 54, 63, 172, 106, 238, 47, 139, 16, 106, 105, 155, 41] | |
key = struct.pack(">" + "B"*len(key), *key) | |
iv = [189, 12, 193, 53, 87, 80, 242, 83, 178, 140, 144, 17, 190, 48, 4, 143] | |
iv = struct.pack(">" + "B"*len(iv), *iv) | |
padder = padding.PKCS7(128).padder() | |
padded_data = padder.update(bytes(sys.argv[1], "utf-8")) | |
padded_data += padder.finalize() | |
cipher = Cipher(algorithms.AES(key), modes.CBC(iv)) | |
encryptor = cipher.encryptor() | |
ct = encryptor.update(padded_data) | |
# print(ct) | |
decryptor = cipher.decryptor() | |
# print(decryptor.update(ct) + decryptor.finalize()) | |
print(f"put {base64.b64encode(ct).decode()} in HKEY_CURRENT_USER\\SOFTWARE\\Pushbullet\\AccessToken (string)") |
Traceback (most recent call last): File "H:\pushbulletbypass.py", line 14, in padded_data = padder.update(bytes(sys.argv[1], "utf-8")) ~~~~~~~~^^^ IndexError: list index out of range
I forgot how this works exactly since it's been so long but you have to provide something as an argument on the command line - probably whatever was a parameter for the localhost URL.
Traceback (most recent call last): File "H:\pushbulletbypass.py", line 14, in padded_data = padder.update(bytes(sys.argv[1], "utf-8")) ~~~~~~~~^^^ IndexError: list index out of range
I forgot how this works exactly since it's been so long but you have to provide something as an argument on the command line - probably whatever was a parameter for the localhost URL.
ok thanks for anwser. Ive revoked all token and all good ^^
Traceback (most recent call last):
File "H:\pushbulletbypass.py", line 14, in
padded_data = padder.update(bytes(sys.argv[1], "utf-8"))
~~~~~~~~^^^
IndexError: list index out of range