Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Python by Emil ( 7 years ago )
#-*- coding: utf-8 -*-
import string
import collections
from pathlib import Path
def chunks(l, n):
# For item i in a range that is a length of l,
for i in range(0, len(l), n):
# Create an index range for l of n items:
yield l[i:i+n]
uuu = Path("data.txt").read_bytes()[256:512]
print(len(uuu))
full = chunks(Path("data.txt").read_bytes(), 256)
target_plaintext = "Ryknelo. Jakby elastyczna prasa zleciala mu na piersi i glowe. - Booster - zdazyl pomyslec i pociemnialo mu w oczach. Tylko troche i tylko na chwile. Gdy juz mogl dobrze widziec, choc ten sam nieustepliwy ciezar czul rozlany w calym ciele, wszystkie ekrany"
plain = target_plaintext.encode("utf-8")[:256]
print(len(plain))
key = bytes(
[
c ^ uuu[i]
for i, c in enumerate(plain)
]
)
print(len(key))
for cipher in full:
unhashed = bytes(
[c ^ key[i] for i, c in enumerate(cipher)]
)
print(unhashed)
Revise this Paste