亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Python 套接字不會阻止垃圾郵件

Python 套接字不會阻止垃圾郵件

慕碼人8056858 2021-09-14 16:26:13
我正在向客戶端發送消息,但客戶端不會停止發送垃圾郵件服務器.pyserver = socket.socket(socket.AF_INET, socket.SOCK_STREAM)hostname = socket.gethostname()hostip = socket.gethostbyname(hostname)port = 462server.bind((hostname, port))server.listen(1)print((hostip, port))client, address = server.accept()print("New connection!: ", address)while True:    data = input("Do something:")    if data == "help":        print("test: 'test'")        input("Click ENTER to continue")    elif data == "test":        client.send("test".encode('ascii'))    else:        continue客戶端.pys = socket.socket(socket.AF_INET, socket.SOCK_STREAM)host = socket.gethostname()port = 462s.connect(('', port))data = s.recv(1024)while True:    if data.decode('ascii') == "test":        print(data.decode('ascii'))    else:        continue
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 162 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號