forensics/whitepages
This commit is contained in:
parent
0fec7de96a
commit
4c40d47aa5
|
@ -0,0 +1,22 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import binascii
|
||||||
|
|
||||||
|
with open('whitepages.txt') as file:
|
||||||
|
content = file.read()
|
||||||
|
|
||||||
|
bits = []
|
||||||
|
for ws in content:
|
||||||
|
if ws == ' ':
|
||||||
|
bits.append(1)
|
||||||
|
else:
|
||||||
|
bits.append(0)
|
||||||
|
|
||||||
|
def chunks(l, n):
|
||||||
|
for i in range(0, len(l), n):
|
||||||
|
yield l[i:i + n]
|
||||||
|
|
||||||
|
for byte in chunks(bits, 8):
|
||||||
|
bitstring = ''.join(str(bit) for bit in byte)
|
||||||
|
i = int(bitstring, 2)
|
||||||
|
print(chr(i), end='')
|
|
@ -0,0 +1 @@
|
||||||
|
|
Loading…
Reference in New Issue