From: Vincent Le Gallic Date: Sun, 20 Oct 2013 22:22:30 +0000 (+0200) Subject: Codé pour tail les logs de pure-ftpd X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=058126cf6d4441d16530cb22175caee29b3d0211;p=scripts-20-100.git Codé pour tail les logs de pure-ftpd --- diff --git a/percent_decode.py b/percent_decode.py new file mode 100755 index 0000000..fd0e583 --- /dev/null +++ b/percent_decode.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +"""Piper dedans un flux avec des %20 et autres cochonneries, + il ressortira lisible.""" + +__author__ = "Vincent Le Gallic " + +__license__ = "WTFPL" + +import urllib +import sys +import time + +try: + while True: + l = sys.stdin.readline() + if l != "": + sys.stdout.write(urllib.unquote(l)) +except KeyboardInterrupt: + pass