Skip to content

MacOsX support #272

@r4z0r5

Description

@r4z0r5

self.IP_aton = socket.inet_aton(self.Bind_To)

This line is causing the following error:

File "/Users/whatever/Repositories/Responder/settings.py", line 182, in populate
    self.IP_aton   = socket.inet_aton(self.Bind_To)

OSError: illegal IP address string passed to inet_aton

Responder started as: sudo python3.9 ./Responder.py -I en0

I debugged the problem a bit and found out the interface name (in my case 'en0') is passed to socket.inet_aton.
As a temporary workaround I have changed the code a bit:

		#IPV4
		if self.Interface == "ALL":
			self.IP_aton   = socket.inet_aton(self.OURIP)
		else:
			print(self.Bind_To)
			self.IP_aton = socket.inet_aton(netifaces.ifaddresses(self.Bind_To)[netifaces.AF_INET][0]['addr'])
		#IPV6

This resolves the OSError, perhaps this fix should be included in next version.

Sincerly, Darwin 22.6.0 Darwin Kernel Version 22.6.0 arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions