質問編集履歴
1
py
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
+
1[*] Listening on 0.0.0.0:9999
|
1
|
-
|
2
|
+
2[*] Accepted connection from: 127.0.0.1:62512
|
3
|
+
3[*] Received: ABCDEF
|
2
|
-
|
4
|
+
123がでるとサイトにはあったのですが、2と3は出てこないでずっとプログラムは動いている状態になっています。
|
5
|
+
123のどれかがでるのか、全てがでるのかは詳しく書いてなかったので、勘違いしているだけかもしれません。
|
3
|
-
|
6
|
+
ご指摘よろしくお願いします
|
4
7
|
```ここに言語を入力
|
5
8
|
コード
|
6
9
|
import socket
|
@@ -32,7 +35,7 @@
|
|
32
35
|
|
33
36
|
while True:
|
34
37
|
client,addr=server.accept()
|
35
|
-
print"[*] Accepted connection from : %s:%d %(addr[0],addr[1])
|
38
|
+
print"[*] Accepted connection from : %s:%d" %(addr[0],addr[1])
|
36
39
|
#spin up our client thread to handle incoming data
|
37
40
|
client_handler=threading.Thread(target=handle_client,args=(client,))
|
38
41
|
client_handler.start()
|