]> gitweb.pimeys.fr Git - scripts-20-100.git/commitdiff
Codé pour tail les logs de pure-ftpd
authorVincent Le Gallic <legallic@crans.org>
Sun, 20 Oct 2013 22:22:30 +0000 (00:22 +0200)
committerVincent Le Gallic <legallic@crans.org>
Sun, 20 Oct 2013 22:22:30 +0000 (00:22 +0200)
percent_decode.py [new file with mode: 0755]

diff --git a/percent_decode.py b/percent_decode.py
new file mode 100755 (executable)
index 0000000..fd0e583
--- /dev/null
@@ -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 <legallic@crans.org>"
+
+__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