14 lines
440 B
14 lines
440 B
from tools.ToolBase import ToolBase
|
|
|
|
class NslookupTool(ToolBase):
|
|
def validate_instruction(self, instruction):
|
|
#指令过滤
|
|
timeout = 0
|
|
return instruction,timeout
|
|
|
|
def analyze_result(self, result,instruction,stderr,stdout):
|
|
#指令结果分析
|
|
start_index = result.find("Non-authoritative answer:")
|
|
if start_index != -1:
|
|
return result[start_index:]
|
|
return result
|