From 058126cf6d4441d16530cb22175caee29b3d0211 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Mon, 21 Oct 2013 00:22:30 +0200 Subject: [PATCH] =?utf8?q?Cod=C3=A9=20pour=20tail=20les=20logs=20de=20pure?= =?utf8?q?-ftpd?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- percent_decode.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 percent_decode.py 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 -- 2.39.2