This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To port forward 127.0.0.1:3340 to 192.168.0.10:80 in Windows 10: | |
Launch an Administrator Command Prompt. | |
netsh interface portproxy add v4tov4 listenaddress=127.0.0.1 listenport=3340 connectaddress=192.168.0.10 connectport=80 | |
Check that the port is not already used: | |
netstat -na|find "3340" | |
To display a list of all active TCP port forwarding rules on Windows, run the command: | |
netsh interface portproxy show all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Crypto.Hash import CMAC | |
from Crypto.Cipher import AES | |
init_vector = bytearray(16) # IV=0 | |
aes_key_str = "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00" | |
full_tg_str = "B346FA121028000001068C00DB900F002C25030000008298D056148A8B757AE100900710EB64AF75C4FC415400EF598690C50CA2494E0AE679FE25D3BC322881E6EEFF4C34618226A68DA5E9D33DD9DC45C72D8BA8170C6D13551CE15E1FC67AF1D642F1EE51E886A6C242C3FB9CCC0B60F7DAFF0E62E27BF5FD1A7FACD16C0975ED870A7D119F1F87BBC06B201D1509A01088402FE9A3DFD985DD6FB178236A6DED2DEE4FA81867003CEFAFA24B1727F2786812" | |
stripped_tg = full_tg_str[72:] # strip plain data | |
# build ephimeral key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from inspect import getmembers | |
def print_com_members(obj, obj_name="placeholder_name"): | |
"""Print members of given COM object""" | |
try: | |
fields = list(obj._prop_map_get_.keys()) | |
except AttributeError: | |
print("Object has no attribute '_prop_map_get_'") | |
print("Check if the initial COM object was created with" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Computation of CRC16 CCITT (0xFFFC) | |
# The input parameter for crc16Eval() is a hexString obtained from a bytearray bytes values | |
# The function returns a string with the hexadecimal value, an int with the low byte value | |
# and an int with the high byte value of the crc. | |
# | |
# hexArray = bytearray(b'\xe8\x8a\x04\r\x00W\x8b') | |
# hexString = = "".join(map(chr, hexArray)) | |
# (crcHexStr, crcHighByte, crcLowByte) = crc16Eval(hexString) | |
class CRC_CCITT: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TWRP->Advanced->Terminal | |
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/misc count=1 bs=32 |