完全公开,我完全是编程新手,所以我提前道歉。我正在编写这个python脚本,它将获取用户输入,并在某些操作系统命令(ping、traceroute、whois)中使用该输入。它并不完整,但下面是脚本:
#!/usr/bin/python
from os import system
def pingz():
system('ping -c 5 %(ab)s' % locals())
def trace_route():
system('traceroute %(cd)s' % locals())
print("My Web Ut
我正在运行以下批处理脚本来反向查找IP中的域名
For /f %%i in (c:\ip.txt) do (Ping -a %i -n 1 >>output.txt )
文件ip.txt中有一个in列表。
输出文件有一个类似于预期的输出
Pinging UKSEVRERNAME.com [10.87.130.200] with 32 bytes of data:
Reply from 10.87.130.200: bytes=32 time=16ms TTL=53
Ping statistics for 10.87.130.200:
Packets: Sent = 1