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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Having issue with netcat.py

Mellow-Cobra opened this issue · comments

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)

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