bdraco / aiodiscover

Discover Hosts via ARP and PTR lookup
Other
4 stars 5 forks source link

I think need fix get_local_ip() function. #25

Closed bongdang closed 2 years ago

bongdang commented 2 years ago

Hi.

get_local_ip function in network.py doing some wired action. Connecting to "(10.255.255.255", 1) generate exception in my env. How about change to ("8.8.8.8", 1)? My env ls 10.X.X.X private IP networks.

Thanks.

Reproduction

A minimal example that exhibits the behavior.

Environment

Any additional information about your environment

bdraco commented 2 years ago

Fixed via #26

bongdang commented 2 years ago

Still got Exception.

s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.setblocking(False) s.connect(('10.255.255.255',1)) Traceback (most recent call last): File "", line 1, in PermissionError: [Errno 13] Permission denied

as above.

2022년 4월 18일 (월) 오전 11:26, J. Nick Koston @.***>님이 작성:

Fixed via #26 https://github.com/bdraco/aiodiscover/pull/26

— Reply to this email directly, view it on GitHub https://github.com/bdraco/aiodiscover/issues/25#issuecomment-1101032668, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWWMSMBQXULYSTUGY5TLPITVFTB6VANCNFSM5S3RSFAQ . You are receiving this because you authored the thread.Message ID: @.***>

bdraco commented 2 years ago

Please see https://github.com/bdraco/aiodiscover/blob/main/aiodiscover/network.py#L162

bongdang commented 2 years ago

Sorry. I didn't view all source. ;) Thank you for your job. I think it's better.

Have a nice day!

2022년 4월 18일 (월) 오후 4:54, J. Nick Koston @.***>님이 작성:

Please see https://github.com/bdraco/aiodiscover/blob/main/aiodiscover/network.py#L162

— Reply to this email directly, view it on GitHub https://github.com/bdraco/aiodiscover/issues/25#issuecomment-1101189885, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWWMSMAY5S5NTVPTNOZNM63VFUIJVANCNFSM5S3RSFAQ . You are receiving this because you authored the thread.Message ID: @.***>