andgineer / docker-amazon-dash-button-hack

Amazon Dash Button hack in Docker for Synology
http://masterandrey.com/posts/en/amazon_dash_button/
11 stars 8 forks source link

Expression rejects all packages #1

Closed tobsch closed 7 years ago

tobsch commented 7 years ago

Hi there,

I'm thrilled to try this package. Unfortunately, I ended up with the following problem running it on Synology / Docker:

https://github.com/secdev/scapy/issues/722

Any ideas? Many thanks,

Tobias

andgineer commented 7 years ago

We can use developer version of scapy as they recommend.

But on scapy site they say that python3 is not supported. I am using python3 fork of this lib scapy-python3 (pip.requirements.txt)

And it works fine for me. May be you installed scapy instead?

tobsch commented 7 years ago

Nono, I just straight-on used the Dockerhub version of your image on my synology. I even copied your recommended settings.json file...

Maybe it's worth a try to switch to the dev version?

andgineer commented 7 years ago

How did you managed to make it work?

tobsch commented 7 years ago

I manipulated the "sniff(...)" call like this "sniff(iface='eth0'...)"

Any ideas how to integrate this in a nice way?

Tobias

andgineer commented 7 years ago

environment variable for doker? So add to docker command line: docker run -e "SNIFF_IFACE=eth0" ... And in code

    import os
    sniff(iface=os.environ.get('SNIFF_IFACE', None)...)

So by default scapy will use first interface and if you want you can use specific interface.

We definitely do not want to remove ARP filter (it would be poor performance). And with filter scapy wants specific interface. I think there is no way for application to know which interface is the right one..

andgineer commented 7 years ago

https://github.com/secdev/scapy/issues/722 was closed