Giter VIP home page Giter VIP logo

sleepproxyserver's People

Contributors

kfix avatar rcloran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sleepproxyserver's Issues

SyntaxError: invalid token in setup.py, line 36: "os.chmod(fname, 0755)"

Trying to install on Ubuntu 16.04.3 LTS (Xubuntu Xenial)

$ pip install git+https://github.com/kfix/SleepProxyServer.git
Collecting git+https://github.com/kfix/SleepProxyServer.git
  Cloning https://github.com/kfix/SleepProxyServer.git to /tmp/pip-r9tqmmsi-build
Collecting dnspython (from SleepProxyServer==0.1)
  Downloading dnspython-1.15.0-py2.py3-none-any.whl (177kB)
    100% |████████████████████████████████| 184kB 2.0MB/s 
Collecting gevent (from SleepProxyServer==0.1)
  Downloading gevent-1.2.2-cp35-cp35m-manylinux1_x86_64.whl (1.7MB)
    100% |████████████████████████████████| 1.7MB 127kB/s 
Collecting netifaces (from SleepProxyServer==0.1)
  Downloading netifaces-0.10.6.tar.gz
Collecting scapy (from SleepProxyServer==0.1)
  Downloading scapy-2.3.3.tgz (1.4MB)
    100% |████████████████████████████████| 1.4MB 196kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-qxs1o84d/scapy/setup.py", line 36
        os.chmod(fname, 0755)
                           ^
    SyntaxError: invalid token
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-qxs1o84d/scapy/

Exception in snifferthread when creating L2listen

After a registration is successfully confirmed, a sniffer thread is set up which creates a socket that listens for the appropriate ARP and TCP traffic. However something goes wrong when passing the compiled BPF filter code to setsockopt.

Exception in thread Thread-5: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/home/jerry/.local/lib/python2.7/site-packages/sleepproxy/sniff.py", line 18, in run self._sniff() File "/home/jerry/.local/lib/python2.7/site-packages/sleepproxy/sniff.py", line 24, in _sniff sock = conf.L2listen(type=ETH_P_ALL, filter=self._filterexp, iface=self._iface) File "/home/jerry/.local/lib/python2.7/site-packages/scapy/arch/linux.py", line 454, in __init__ attach_filter(self.ins, filter, iface) File "/home/jerry/.local/lib/python2.7/site-packages/scapy/arch/linux.py", line 141, in attach_filter sock.setsockopt(socket.SOL_SOCKET, SO_ATTACH_FILTER, bp) File "<string>", line 1, in setsockopt error: [Errno 22] Invalid argument

Running lubuntu 16.04.6 LTS on a Macmini G4.

I have confirmed that the BPF filters are being correctly generated in scapy. I suspect that it is a similar issue to secdev/scapy#842.

Work with High Sierra?

I installed this on a Raspberry Pi on my network along with two macs running High Sierra. It shows up and looks like it's doing something but I'm still unable to wake one mac from the other using ssh or screen sharing. Should this still theoretically work?

Error with logging of SPS registration datagrams

When executing lines 177 and 208 of dnsserve.py the following error occurs:

Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run
  File "/home/jerry/.local/lib/python2.7/site-packages/gevent/baseserver.py", line 26, in _handle_and_close_when_done
    return handle(*args_tuple)
  File "/home/jerry/.local/lib/python2.7/site-packages/sleepproxy/dnsserve.py", line 187, in handle
    self._answer(raddress, message)
  File "/home/jerry/.local/lib/python2.7/site-packages/sleepproxy/dnsserve.py", line 208, in _answer
    logging.debug('RESPONSE--\n\n%s\n\n%s\n\n--RESPONSE END' % (response,response.options))
  File "/home/jerry/.local/lib/python2.7/site-packages/dns/message.py", line 122, in __str__
    return self.to_text()
  File "/home/jerry/.local/lib/python2.7/site-packages/dns/message.py", line 147, in to_text
    s.write(u'option %s\n' % opt.to_text())
AttributeError: 'UpdateLeaseOption' object has no attribute 'to_text'
2019-05-12T21:17:46Z <Greenlet at 0xb6af70b8L: _handle_and_close_when_done(<bound method SleepProxyServer.handle of <SleepPro, <bound method SleepProxyServer.do_close of <SleepP, ('Vc(\x00\x00\x00\x00\x00\x00\r\x00\x01\x0bmacbook)> failed with AttributeError

Running lubuntu 16.04.6 LTS on a Macmini G4.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.