From 1e73015e29f497fa5aab6212a7fb6d725692f442 Mon Sep 17 00:00:00 2001 From: Si-Huan <49349784+Si-Huan@users.noreply.github.com> Date: Mon, 2 Mar 2020 21:51:47 +0800 Subject: [PATCH] ns up up up --- worker/ns.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/worker/ns.py b/worker/ns.py index cbb6f96..37f94e0 100644 --- a/worker/ns.py +++ b/worker/ns.py @@ -1,9 +1,8 @@ from zzcore import StdAns -from subprocess import Popen +from subprocess import run class Ans(StdAns): def GETMSG(self): domain = self.raw_msg['message'][4:] - p = Popen(["nslookup",domain]) - msg = p.read() + msg = run(["nslookup",domain],capture_output=True) return msg