Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dnsviz/dnsviz.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCasey Deccio <casey@deccio.net>2015-08-26 22:56:31 +0300
committerCasey Deccio <casey@deccio.net>2015-08-26 22:56:31 +0300
commit4b06c85ee2dc13ae0f324ee19f27932bfe251904 (patch)
tree0fb0ebe8e0806d90966f4dafc6efd8eb2f5ee3f5 /bin
parentc61205c9e004d10c7040d653ce6f778d09f8d5d2 (diff)
Properly decode names from command-line
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dnsget4
-rwxr-xr-xbin/dnsgrok4
-rwxr-xr-xbin/dnsviz4
3 files changed, 9 insertions, 3 deletions
diff --git a/bin/dnsget b/bin/dnsget
index 401a7e6..7366caf 100755
--- a/bin/dnsget
+++ b/bin/dnsget
@@ -597,7 +597,9 @@ def main():
names.append(name)
f.close()
else:
- if not args:
+ if args:
+ args = map(lambda x: x.decode(sys.getfilesystemencoding()), args)
+ else:
try:
args = analysis_structured['_meta._dnsviz.']['names']
except KeyError:
diff --git a/bin/dnsgrok b/bin/dnsgrok
index 3edcc85..8e4edd1 100755
--- a/bin/dnsgrok
+++ b/bin/dnsgrok
@@ -163,7 +163,9 @@ def main():
names.append(name)
f.close()
else:
- if not args:
+ if args:
+ args = map(lambda x: x.decode(sys.getfilesystemencoding()), args)
+ else:
try:
args = analysis_structured['_meta._dnsviz.']['names']
except KeyError:
diff --git a/bin/dnsviz b/bin/dnsviz
index f3b058e..ce6db85 100755
--- a/bin/dnsviz
+++ b/bin/dnsviz
@@ -396,7 +396,9 @@ def main():
names.append(name)
f.close()
else:
- if not args:
+ if args:
+ args = map(lambda x: x.decode(sys.getfilesystemencoding()), args)
+ else:
try:
args = analysis_structured['_meta._dnsviz.']['names']
except KeyError: