EONRaider / blackhat-python3

Source code for the book "Black Hat Python" by Justin Seitz. The code has been fully converted to Python 3, reformatted to comply with PEP8 standards and refactored to eliminate dependency issues involving the implementation of deprecated libraries.
2.02k stars 414 forks source link

Update bhnet.py #1

Closed Wojciech-Mazurowski closed 4 years ago

Wojciech-Mazurowski commented 4 years ago

echo -ne "GET / HTTP/1.1\r\nHost: www.google.com\r\n\r\n" | ./bhnet.py -t www.google.com -p 80 Traceback (most recent call last): File "./bhnet.py", line 239, in main()

File "./bhnet.py", line 230, in main client_sender(buffer) File "./bhnet.py", line 127, in client_sender client.send(buffer) TypeError: a bytes-like object is required, not 'str'

encoding buffer fixed it for me :)

EONRaider commented 4 years ago

Makes sense. Thanks for the contribution! Will merge to master.