J0hnMilt0n

J0hnMilt0n

Reverse Engineer | Android Modder

26 Oct 2022

Convert Hex Oct Dec to Chr

hex to chr:

hex = input("hex-> ")
hex_list = hex.split()
ans = ""
for h in hex_list:
  ans += chr(int(h, 2))
print(ans)

example:

hex-> 01110011 01101111 01100011 01101011 01100101 01110100
socket

oct to chr:

oct = input("oct-> ")
oct_list = oct.split()
ans = ""
for o in oct_list:
  ans += chr(int(o, 8))
print(ans)

example:

oct-> 155 141 160
map

hex string to chr:

hex = input("hex str-> ")
print(bytes.fromhex(hex).decode("utf-8"))

example:

hex str-> 636f6c6f7261646f
colorado

dec to chr:

dec = input("dec-> ")
dec_list = dec.split()
ans = ""
for d in dec_list:
  ans += chr(int(d, 10))
print(ans)

example:

dec-> 65
A

Categories

ctf

Tags