【发布时间】:2017-07-16 16:00:12
【问题描述】:
for ((zeile=1;zeile<=1284;zeile++));
do
sleep 1.5
export accountList=$(cat /root/pawnedDog/database/accountList | head -n${zeile})
wget https://haveibeenpwned.com/api/v2/breachedaccount/${accountList}@gmail.com-P /root/pawnedDog/pawnedList/
done
我想制作一个 shell 脚本来检查整个电子邮件地址列表是否被黑客入侵。如果我运行脚本 wget 命令开始下载 gmail.com。我究竟做错了什么?
输出:
--2017-02-25 22:52:52-- https://haveibeenpwned.com/api/v2/breachedaccount/Adanna-Marie.Feder@gmail.com
Resolving haveibeenpwned.com (haveibeenpwned.com)... 2400:cb00:2048:1::6814:5b3a, 2400:cb00:2048:1::6814:5c3a, 104.20.92.58, ...
Connecting to haveibeenpwned.com (haveibeenpwned.com)|2400:cb00:2048:1::6814:5b3a|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-02-25 22:52:53 ERROR 404: Not Found.
--2017-02-25 22:52:54-- https://haveibeenpwned.com/api/v2/breachedaccount/Adanna-Marie.Feder
Resolving haveibeenpwned.com (haveibeenpwned.com)... 2400:cb00:2048:1::6814:5c3a, 2400:cb00:2048:1::6814:5b3a, 104.20.91.58, ...
Connecting to haveibeenpwned.com (haveibeenpwned.com)|2400:cb00:2048:1::6814:5c3a|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-02-25 22:52:55 ERROR 404: Not Found.
--2017-02-25 22:52:55-- http://Ada.Petriconi@gmail.com/
Resolving gmail.com (gmail.com)... 2a00:1450:4001:815::2005, 172.217.16.165
Connecting to gmail.com (gmail.com)|2a00:1450:4001:815::2005|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://www.google.com/gmail/ [following]
--2017-02-25 22:52:55-- https://www.google.com/gmail/
Resolving www.google.com (www.google.com)... 2a00:1450:4013:c05::69, 64.15.112.93, 64.15.112.89, ...
Connecting to www.google.com (www.google.com)|2a00:1450:4013:c05::69|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://mail.google.com/mail/ [following]
--2017-02-25 22:52:55-- https://mail.google.com/mail/
Resolving mail.google.com (mail.google.com)... 2a00:1450:4001:81c::2005, 172.217.16.165
Connecting to mail.google.com (mail.google.com)|2a00:1450:4001:81c::2005|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=googlemail&emr=1&osid=1 [following]
--2017-02-25 22:52:55-- https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1<mpl=googlemail&emr=1&osid=1
Resolving accounts.google.com (accounts.google.com)... 2a00:1450:4001:819::200d, 172.217.23.141
Connecting to accounts.google.com (accounts.google.com)|2a00:1450:4001:819::200d|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘/root/pawnedDog/pawnedList/index.html.14’
/root/pawnedDog/pawnedList/index.html.14 [ <=> ] 58.38K --.-KB/s in 0.05s
2017-02-25 22:52:55 (1.11 MB/s) - ‘/root/pawnedDog/pawnedList/index.html.14’ saved [59777]
FINISHED --2017-02-25 22:52:55--
Total wall clock time: 1.3s
Downloaded: 1 files, 58K in 0.05s (1.11 MB/s)
这是我的第一篇文章,我的英语不是很好。
【问题讨论】:
标签: bash shell ubuntu debian wget