Skip to content

zbreplay not working #143

Closed
Closed

Description

@mrnice1

Hello guys,
it's me again.

I'm using an RZUSBSTICK with the latest firmware on it. I also use Ubuntu 16.04
zbreplay won't work, I always get this error:

sudo zbreplay -r huedumpreplay.pcap --channel 15
Warning: You are using pyUSB 1.x, support is in beta.
Traceback (most recent call last):
File "/usr/local/bin/zbreplay", line 4, in
import('pkg_resources').run_script('killerbee==2.7.0', 'zbreplay')
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 719, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 1511, in run_script
exec(script_code, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/killerbee-2.7.0-py2.7-linux-x86_64.egg/EGG-INFO/scripts/zbreplay", line 72, in

TypeError: is_valid_channel() takes exactly 3 arguments (2 given)

How can I solve it.

Activity

  1. FengGou commented on Sep 27, 2018

    @FengGou

    Me too , have a fix ?

  2. ichintu commented on Oct 11, 2018

    @ichintu

    I am having this issue too. Affects zbjammer too. If anyone has a fix please let me know.

    root@kali:~# zbjammer -i 1:4 -c 25
    Warning: You are using pyUSB 1.x, support is in beta.
    Traceback (most recent call last):
    File "/usr/local/bin/zbjammer", line 4, in
    import('pkg_resources').run_script('killerbee==2.7.0', 'zbjammer')
    File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 661, in run_script
    self.require(requires)[0].run_script(script_name, ns)
    File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 1448, in run_script
    exec(script_code, namespace, namespace)
    File "/usr/local/lib/python2.7/dist-packages/killerbee-2.7.0-py2.7-linux-armv7l.egg/EGG-INFO/scripts/zbjammer", line 40, in

    TypeError: is_valid_channel() takes exactly 3 arguments (2 given)

  3. Nonnie8665 commented on Nov 7, 2018

    @Nonnie8665

    So this may be a crappy fix, but I got it to work... I went to the zbreplay.py in the killerbee/tools folder on line 72 and commented out "if not kb.is_valid_channel(args.channel):" . Afterwards, I replaced it with the some code from kbutils.py and re-ran setup.py. Hopefully this works for everyone till the bug gets resolved:

    signal.signal(signal.SIGINT, interrupt)
    #if not kb.is_valid_channel(args.channel): # This blows up zbreplay
    if not (args.channel >= 1 and args.channel <= 26): # This was taken directly from kbutils.py is_valid_channel() function
    print >>sys.stderr, "ERROR: Must specify a valid IEEE 802.15.4 channel for the selected device."
    kb.close()
    sys.exit(1)
    kb.set_channel(args.channel)

  4. ichintu commented on Nov 7, 2018

    @ichintu

    The actual fix has been communicated with Ryan:

    The fix we were discussing is in this file: killerbee/init.py
    https://github.com/riverloopsec/killerbee/blob/master/killerbee/__init__.py

    Line 225

    Please change
    def is_valid_channel (self,channel, page):
    def is valid_channel(self, channel, page =0):

  5. rmspeers commented on Nov 7, 2018

    @rmspeers
    Contributor

    Agreed, this change is in the branch and is waiting to merge for the next release which I hope will be soon. If not I will do a dot release into master to resolve this issue.

  6. self-assigned this
    on Nov 7, 2018
  7. rmspeers commented on Nov 8, 2018

    @rmspeers
    Contributor

    Linking to PR #149. Merged to 2.7.1 branch. For now people can git checkout release/2.7.1 to get this resolved.

  8. Nonnie8665 commented on Nov 8, 2018

    @Nonnie8665

    Awesome! Thanks for the quick response and bugfix turnaround. I just applied your changes :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions