On Wednesday, November 7, 2018 at 7:55:55 PM UTC-7, mwall wrote:
>
> here is weewx-interceptor 0.42-rc1
>
> it should work with either pylibcap or pycap
>
> m
>
>
>
Hello!
I've tried the rc1 because I was getting the exact same error. rc1 now
gets past "no pcapObject" problem but fails with the following:
weewx@fw:/home/weewx $ sudo PYTHONPATH=bin python bin/user/interceptor.py
--device=observer --mode=sniff --iface=axe0 --filter="src 10.0.26.59 and
dst port 80"
Exception in thread ServerThread:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/threading.py", line 801, in
__bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "bin/user/interceptor.py", line 285, in run_server
self._server.run()
File "bin/user/interceptor.py", line 343, in run
self.decode_ip_packet(0, data, ts)
NameError: global name 'data' is not defined
syslog shows this:
2018-12-19 12:01:23.718286500 127.0.0.1: authpriv.notice: Dec 19 12:01:23
sudo: weewx : TTY=ttyp0 ; PWD=/home/weewx ; USER=root ;
ENV=PYTHONPATH=bin ; COMMAND=/usr/local/bin/python bin/user/interceptor.py
--device=observer --mode=sniff --iface=axe0 --filter=src 10.0.26.59 and dst
port 80
2018-12-19 12:01:23.858076500 127.0.0.1: user.info: Dec 19 12:01:23
interceptor[61504]: interceptor: MainThread: mode is sniff
2018-12-19 12:01:23.858179500 127.0.0.1: user.info: Dec 19 12:01:23
interceptor[61504]: interceptor: MainThread: sniff iface=axe0 promiscuous=0
2018-12-19 12:01:23.858532500 127.0.0.1: user.info: Dec 19 12:01:23
interceptor[61504]: interceptor: MainThread: sniff filter 'src 10.0.26.59
and dst port 80'
2018-12-19 12:01:23.861201500 127.0.0.1: user.info: Dec 19 12:01:23
interceptor[61504]: interceptor: MainThread: pypcap (1.2.2)
Second question--I've seen that promiscuous should be a configuration
option and I believe that my iface should be in promiscuous mode. I tried
hard-coding it by setting pval = 1 just below line 313 in interceptor.py.
That appeared to run but captures no packets. Ctrl-C then brings up the
NameError: global name 'data' is not defined so I suspect it isn't actually
getting to self.run.
Jeff Ross
Townsend, MT
Tycon TP3000WC
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.