Mozna ten kod jakos prosciej napisac, niz sam to zrobilem?
Dekodowanie i kodowanie XOR.
Dekodowanie i kodowanie XOR.
from textwrap import wrap
def xor_stringsDec(s, t):
ul=''
s=wrap(s.decode('utf8'), 2)
for sx in s:
cv=int(sx,16)
for x in t:
cv = cv^x
ul+=chr(cv)
return ul
def xor_stringsEnc(s, t):
ul=''
for sx in s:
cv=sx
for x in t:
cv = cv^x
z=hex(cv)
ul+=str(hex(cv)[2:])
return ul
messencod = '66687a7e613f617d'
key = b'biauek'
print (xor_stringsDec(messencod.encode('utf8'), key))
mess_orig = 'wykop.pl'
print
![kanasta - Mozna ten kod jakos prosciej napisac, niz sam to zrobilem?
Dekodowanie i ko...](https://wykop.pl/cdn/c3201142/e6ee1b44b690463e9c0ae27befab1e4d84541c81b509cd19fdcf18109f33d815,w400.jpg?author=kanasta&auth=d756cc5dfc9b5c547ea82e8e62eb6167)
źródło: xor
Pobierz
U.S. citizens in Belarus should depart immediately.
Consider departing via the remaining border crossings with Lithuania and Latvia, or by plane.
U.S. citizens are not permitted to enter Poland overland from Belarus.
Do not travel to Russia or to Ukraine.
https://by.usembassy.gov/alert-u-s-embassy-minsk-belarus-august-21-2023/
#bialorus #ukraina #rosja #wojna