Guest User

BrihtnaBuca

a guest
Nov 13th, 2009
154
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/python
  2.  
  3. import sys
  4.  
  5. def sub(x):
  6.     r = 255 - ord(x)
  7.     if r<0: r += 2**16
  8.     return unichr(r)
  9.  
  10. a = sys.stdin.read().decode("utf-8")
  11. b = a[::2] + a[-1-(len(a)%2)::-2]
  12. c = map(sub, b)
  13.  
  14. print u"".join(c).encode("utf-8")
  15.  
  16. # Example usage:
  17. # wget -qO- "http://www.promet.si/rwproxy/RWProxy.ashx?method=GET&rproxytype=json&remoteUrl=http%3A//promet/counters_si" | python promet.py
RAW Paste Data