juga0 / dhcpcanon Goto Github PK
View Code? Open in Web Editor NEWDHCP client disclosing less identifying information.
Home Page: https://dhcpap.tech
License: MIT License
DHCP client disclosing less identifying information.
Home Page: https://dhcpap.tech
License: MIT License
I'm probably doing something wrong here, I have this test case which basically just runs py.test inside the release tar ball:
check() {
cd "${pkgname}-${pkgver}"
py.test
}
and I get this error (the environment is clean, so dhcpcanon isn't installed yet and therefore can't be imported):
==> Starting check()...
ImportError while loading conftest '/build/dhcpcanon/src/dhcpcanon-0.8.5/tests/conftest.py'.
tests/conftest.py:6: in <module>
from dhcpcanon.dhcpcap import DHCPCAP
E ModuleNotFoundError: No module named 'dhcpcanon'
==> ERROR: A failure occurred in check().
This seems to be related to this answer: https://stackoverflow.com/a/46222631
Apr 14 12:48:49 dhcpanon dhcpcanon[3179]: ......
Apr 14 12:48:49 dhcpanon dhcpcanon[3179]: Sent 1 packets.
Apr 14 12:48:49 dhcpanon python3[3179]: detected unhandled Python exception in '/sbin/dhcpcanon'
Apr 14 12:48:49 dhcpanon dhcpcanon[3179]: Traceback (most recent call last):
Apr 14 12:48:49 dhcpanon dhcpcanon[3179]: File "/sbin/dhcpcanon", line 11, in <module>
Apr 14 12:48:49 dhcpanon dhcpcanon[3179]: load_entry_point('dhcpcanon==0.8.5', 'console_scripts', 'dhcpcanon')()
Apr 14 12:48:49 dhcpanon dhcpcanon[3179]: File "/usr/lib/python3.6/site-packages/dhcpcanon-0.8.5-py3.6.egg/dhcpcanon/dhcpcanon.py", line 89, in main
Apr 14 12:48:49 dhcpanon dhcpcanon[3179]: dhcpcap.run()
Apr 14 12:48:49 dhcpanon dhcpcanon[3179]: File "/usr/lib/python3.6/site-packages/scapy_python3-0.23-py3.6.egg/scapy/automaton.py", line 715, in run
Apr 14 12:48:49 dhcpanon dhcpcanon[3179]: raise c.exc_info[0](c.exc_info[1])
Apr 14 12:48:49 dhcpanon dhcpcanon[3179]: ValueError: invalid literal for int() with base 10: ''
Apr 14 12:48:49 dhcpanon systemd[1]: dhcpcanon.service: Main process exited, code=exited, status=1/FAILURE
Apr 14 12:48:49 dhcpanon audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=dhcpcanon comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Apr 14 12:48:49 dhcpanon systemd[1]: dhcpcanon.service: Unit entered failed state.
Apr 14 12:48:49 dhcpanon systemd[1]: dhcpcanon.service: Failed with result 'exit-code'.
Apr 14 12:48:50 dhcpanon abrt-notification[3512]: Process 3179 (dhcpcanon) of user 988 encountered an uncaught ValueError exception
-- Subject: ABRT has detected an uncaught ValueError exception in dhcpcanon
-- Defined-By: ABRT
-- Support: https://bugzilla.redhat.com/
-- Documentation: man:abrt(1)
-- PROBLEM_REPORT
-- Use the abrt command-line tool for further analysis or to report
-- the problem to the appropriate support site.
I can't reproduce it yet.
Failed to start lib-systemd-system-dhcpcanon.service.mount: Unit lib-systemd-system-dhcpcanon.service.mount not found.
Unit lib-systemd-system-dhcpcanon.service.mount could not be found.
make: *** [Makefile:78: install] Error 4
This project in the early stages supports python 2. Now their is no python 2 support anyway. This is caused by two bugs that simply got ignored and not solved.
#21
Is a bug that appears because a int parsing do not work correctly. load_entry_point
can not be found in source code anymore their is not reason for switch the version for a trivial error like this.
#15
Is a bug that using a python3 parameter to the function open this have something todo with encoding and can be used in python2 too
I basically miss the cool looking version badges in the README
Possibilities:
Started in Qubes Debian buster based DispVM.
Apr 13 14:17:05 disp6704 systemd[1]: Started dhcpcanon DHCP client Anonymity Profile.
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: Unable to init server: Could not connect: Connection refused
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: Unable to init server: Could not connect: Connection refused
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: Traceback (most recent call last):
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/automaton.py", line 679, in _run_condition
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: cond(self,*args, **kargs)
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/dhcpcanon/dhcpcapfsm.py", line 429, in timeout_delay_be
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: raise self.SELECTING()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: scapy.automaton.NewStateRequested
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: During handling of the above exception, another exception occurred:
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: Traceback (most recent call last):
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/sbin/dhcpcanon", line 11, in <module>
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: load_entry_point('dhcpcanon==0.8.5', 'console_scripts', 'dhcpcanon')()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/dhcpcanon/dhcpcanon.py", line 89, in main
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: dhcpcap.run()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/automaton.py", line 892, in run
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: six.reraise(c.exc_info[0], c.exc_info[1], c.exc_info[2])
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/modules/six.py", line 697, in reraise
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: raise value
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/automaton.py", line 736, in _do_control
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: state = next(iterator)
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/automaton.py", line 806, in _do_iter
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: self._run_condition(timeout_func, *state_output)
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/automaton.py", line 687, in _run_condition
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: action(self, *state_req.action_args, **state_req.action_kargs)
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/dhcpcanon/dhcpcapfsm.py", line 646, in action_transmit_
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: self.send_discover()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/dhcpcanon/dhcpcapfsm.py", line 154, in send_discover
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: sendp(pkt)
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/sendrecv.py", line 315, in sendp
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: verbose=verbose, realtime=realtime, return_packets=return_packets)
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/sendrecv.py", line 276, in __gen_send
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: s.send(p)
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/arch/linux.py", line 551, in send
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: return SuperSocket.send(self, x)
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/supersocket.py", line 42, in send
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: sx = raw(x)
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/compat.py", line 96, in raw
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: return bytes(x)
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/packet.py", line 345, in __bytes__
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: return self.build()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/packet.py", line 444, in build
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: p = self.do_build()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/packet.py", line 429, in do_build
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: pay = self.do_build_payload()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/packet.py", line 416, in do_build_payload
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: return self.payload.do_build()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/packet.py", line 429, in do_build
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: pay = self.do_build_payload()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/packet.py", line 416, in do_build_payload
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: return self.payload.do_build()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/packet.py", line 429, in do_build
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: pay = self.do_build_payload()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/packet.py", line 416, in do_build_payload
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: return self.payload.do_build()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/packet.py", line 429, in do_build
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: pay = self.do_build_payload()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/packet.py", line 416, in do_build_payload
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: return self.payload.do_build()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/packet.py", line 426, in do_build
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: pkt = self.self_build()
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/packet.py", line 407, in self_build
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: p = f.addfield(self, p, val)
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/fields.py", line 521, in addfield
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: return s + self.i2m(pkt, val)
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/layers/dhcp.py", line 269, in i2m
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: lval = [f.addfield(pkt,b"",f.any2i(pkt,val)) for val in lval]
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/layers/dhcp.py", line 269, in <listcomp>
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: lval = [f.addfield(pkt,b"",f.any2i(pkt,val)) for val in lval]
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/fields.py", line 841, in addfield
Apr 13 14:17:09 disp6704 dhcpcanon[1338]: s = self.field.addfield(pkt, s, v)
Apr 13 14:17:10 disp6704 dhcpcanon[1338]: File "/usr/lib/python3/dist-packages/scapy/fields.py", line 80, in addfield
Apr 13 14:17:10 disp6704 dhcpcanon[1338]: return s+struct.pack(self.fmt, self.i2m(pkt,val))
Apr 13 14:17:10 disp6704 dhcpcanon[1338]: struct.error: required argument is not an integer
Apr 13 14:17:10 disp6704 systemd[1]: dhcpcanon.service: Main process exited, code=exited, status=1/FAILURE
Apr 13 14:17:10 disp6704 systemd[1]: dhcpcanon.service: Failed with result 'exit-code'.
Apr 13 14:26:30 disp6704 systemd[1]: Started dhcpcanon DHCP client Anonymity Profile.
Traceback (most recent call last):
File "/usr/local/sbin/dhcpcanon", line 11, in
load_entry_point('dhcpcanon==0.8.0', 'console_scripts', 'dhcpcanon')()
File "/usr/local/lib/python2.7/dist-packages/dhcpcanon-0.8.0-py2.7.egg/dhcpcanon/dhcpcanon.py", line 89, in main
dhcpcap.run()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/automaton.py", line 899, in run
six.reraise(c.exc_info[0], c.exc_info[1], c.exc_info[2])
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/automaton.py", line 743, in _do_control
state = next(iterator)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/automaton.py", line 813, in _do_iter
self._run_condition(timeout_func, *state_output)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/automaton.py", line 694, in _run_condition
action(self, *state_req.action_args, **state_req.action_kargs)
File "/usr/local/lib/python2.7/dist-packages/dhcpcanon-0.8.0-py2.7.egg/dhcpcanon/dhcpcapfsm.py", line 646, in action_transmit_discover
self.send_discover()
File "/usr/local/lib/python2.7/dist-packages/dhcpcanon-0.8.0-py2.7.egg/dhcpcanon/dhcpcapfsm.py", line 154, in send_discover
sendp(pkt)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/sendrecv.py", line 304, in sendp
verbose=verbose, realtime=realtime, return_packets=return_packets)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/sendrecv.py", line 265, in __gen_send
s.send(p)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/arch/linux.py", line 545, in send
return SuperSocket.send(self, x)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/supersocket.py", line 42, in send
sx = raw(x)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/compat.py", line 72, in raw
return x.bytes()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 338, in bytes
return self.build()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 436, in build
p = self.do_build()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 421, in do_build
pay = self.do_build_payload()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 408, in do_build_payload
return self.payload.do_build()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 421, in do_build
pay = self.do_build_payload()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 408, in do_build_payload
return self.payload.do_build()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 421, in do_build
pay = self.do_build_payload()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 408, in do_build_payload
return self.payload.do_build()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 421, in do_build
pay = self.do_build_payload()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 408, in do_build_payload
return self.payload.do_build()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 418, in do_build
pkt = self.self_build()
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/packet.py", line 399, in self_build
p = f.addfield(self, p, val)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/fields.py", line 408, in addfield
return s + self.i2m(pkt, val)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/layers/dhcp.py", line 269, in i2m
lval = [f.addfield(pkt,b"",f.any2i(pkt,val)) for val in lval]
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/fields.py", line 732, in addfield
s = self.field.addfield(pkt, s, v)
File "/usr/local/lib/python2.7/dist-packages/scapy-2.4.0rc4-py2.7.egg/scapy/fields.py", line 80, in addfield
return s+struct.pack(self.fmt, self.i2m(pkt,val))
struct.error: cannot convert argument to integer
Submitted by ian.
sudo /usr/local/bin/dhcpcanon -v
Traceback (most recent call last):
File "/usr/local/bin/dhcpcanon", line 9, in <module>
load_entry_point('dhcpcanon==0.5', 'console_scripts',
'dhcpcanon')()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py",
line 542, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py",
line 2569, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py",
line 2229, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py",
line 2235, in resolve
module = __import__(self.module_name, fromlist=['__name__'],
level=0)
File "build/bdist.linux-x86_64/egg/dhcpcanon/dhcpcanon.py", line
11, in <module>
File
"/home/esc/.local/lib/python2.7/site-packages/scapy/config.py", line
11, in <module>
from .data import *
File "/home/esc/.local/lib/python2.7/site-packages/scapy/data.py",
line 184, in <module>
TCP_SERVICES,UDP_SERVICES=load_services("/etc/services")
File "/home/esc/.local/lib/python2.7/site-packages/scapy/data.py",
line 109, in load_services
f=open(filename, errors='ignore')
TypeError: 'errors' is an invalid keyword argument for this function
This would depend on scapy
There hasn't been a commit since 2018 and https://github.com/juga0/dhcpcanon#current-status says:
WIP, still not recommended for end users.
Does that mean this project is dead? Are there any security issues? Should it still be used?
Currently as per the spec, there is a variable 10 - 60 second delay before dhcpcanon
asks for an IP address from the router. This is a relatively poor users experience given what people are used to (a few seconds usually).
Hi,
I am proposing some updates regarding copyright and licensing information according to REUSE v3 on this pull request:
Please feel free to follow up on these matters.
Thanks
adduser
is a Debian frontend for useradd
. It's not available on e.g. Archlinux. I don't have a proposed solution; I'm not sure if there's a nice portable way to add a system user.
They keep accumulating on the interface:(
The pyroute2 internal configuration is preferred to using the dhcpc script, right?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.