gpt4 book ai didi

Python Hotmail 登录

转载 作者:行者123 更新时间:2023-11-28 20:53:58 30 4
gpt4 key购买 nike

我需要一个 python 脚本来提示输入用户名和密码,并尝试使用这些凭据登录到 Hotmail,并输出它们是否有效。

最佳答案

Hotmail 登录!

import poplib

M = poplib.POP3_SSL('pop3.live.com', 995) #Connect to hotmail pop3 server
try:
M.user(raw_input("username: ")) #Get the username from the standar input
M.pass_(raw_input("password: ")) #Get the password from the standar input
except:
print "username or password incorrect"
else:
print "Successful login"

编辑:因为你只需要知道你是否可以登录,所以我重写了代码

如果您在输入用户名或密码时失去连接,我不知道会发生什么。

关于Python Hotmail 登录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3251237/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com