【发布时间】:2017-04-27 14:33:18
【问题描述】:
经过一些教程后,我正在尝试通过 shell cmds 下载报告:
wget -v –user 'nagUser' –password '.C|n#q.U$#r' –no-check-certificate -O report.html "http://[IP]/nagios/cgi-bin/avail.cgi?show_log_entries=&hostgroup=all&timeperiod=lastweek"
但我收到以下错误:
--2017-04-27 09:23:05-- http://xn--user-z86a/
Resolving –user (xn--user-z86a)... failed: Name or service not known.
wget: unable to resolve host address ‘xn--user-z86a’
--2017-04-27 09:23:05-- http://xn--user-z86a/
Resolving –user (xn--user-z86a)... failed: Name or service not known.
wget: unable to resolve host address ‘xn--user-z86a’
--2017-04-27 09:23:05-- http://nagUser/
Resolving nagUser(nagUser)... failed: Name or service not known.
wget: unable to resolve host address ‘nagUser’
--2017-04-27 09:23:05-- http://xn--password-rn3d/
Resolving –password (xn--password-rn3d)... failed: Name or service not known.
wget: unable to resolve host address ‘xn--password-rn3d’
--2017-04-27 09:23:05-- http://xn--password-rn3d/
Resolving –password (xn--password-rn3d)... failed: Name or service not known.
wget: unable to resolve host address ‘xn--password-rn3d’
--2017-04-27 09:23:05-- http://.c%7Cn/
Resolving .c|n (.c|n)... failed: Name or service not known.
wget: unable to resolve host address ‘.c|n’
--2017-04-27 09:23:05-- http://xn--no-check-certificate-2t2l/
Resolving –no-check-certificate (xn--no-check-certificate-2t2l)... failed: Name or service not known.
wget: unable to resolve host address ‘xn--no-check-certificate-2t2l’
--2017-04-27 09:23:05-- http://xn--no-check-certificate-2t2l/
Resolving –no-check-certificate (xn--no-check-certificate-2t2l)... failed: Name or service not known.
wget: unable to resolve host address ‘xn--no-check-certificate-2t2l’
--2017-04-27 09:23:05-- http://[IP]/nagios/cgi-bin/avail.cgi?show_log_entries=&hostgroup=all&timeperiod=lastweek
Connecting to [IP]:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-04-27 09:23:05 ERROR 404: Not Found.
也许我错过了一个论点?
【问题讨论】:
-
您可能需要转义 VERTICAL BAR
|字符。如果你使用'.C^|n#q.U$#r'会发生什么?