view bin/toutf8 @ 5967:9f67418e5043

<b_jonas> ` f=bin/w\xc3\xa4lc\xc3\xa5m\xc3\xa4; >"$f" echo $\'/bin/sh\\nwelcome | sed "s/E/\xc3\x84/g;s/O/\xc3\x85/g;s/e/\xc3\xa4/g;s/o/\xc3\xa5/g"\'; chmod a+x "$f"
author HackBot
date Thu, 10 Sep 2015 11:15:33 +0000
parents e037173e0012
children
line wrap: on
line source

#!/usr/bin/python
import sys
import chardet
x = sys.stdin.read()
enc = chardet.detect(x)['encoding']
sys.stdout.write(x.decode(enc).encode('UTF-8'))