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.01k stars 410 forks source link

Having issue with netcat.py #22

Closed Mellow-Cobra closed 1 year ago

Mellow-Cobra commented 1 year ago

Traceback (most recent call last): File "C:\Users\MMR3\Documents\Python\BlackHatPython\netcat.py", line 126, in nc = NetCat(args, buffer.encode()) File "C:\Users\MMR3\Documents\Python\BlackHatPython\netcat.py", line 24, in init self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) TypeError: setsockopt() takes exactly 3 arguments (2 given)

Mellow-Cobra commented 1 year ago

I figured this out you need to have 1 the int socket.setsockopt(level: ..., optname: ...,value: 1)