Results 1 to 7 of 7

Thread: Binwalk Plugins is not defined

  1. #1
    Join Date
    2013-Jul
    Posts
    4

    Binwalk Plugins is not defined

    Hi,
    I havent used Kali for a while, so I updated with the commands apt-get update apt-get-upgrade and apt-get dist-upgrade.

    I want to use BinWalk but I get this error:
    Code:
    root@kali:~/usb/Phison_PS2251# binwalk 2261FW30753.BIN 
    Traceback (most recent call last):
      File "/usr/bin/binwalk", line 536, in <module>
        main()
      File "/usr/bin/binwalk", line 481, in main
        plugins_blacklist=plugin_blacklist)
      File "/usr/lib/pymodules/python2.7/binwalk/__init__.py", line 306, in scan
        self.plugins = Plugins(self, whitelist=plugins_whitelist, blacklist=plugins_blacklist)
    NameError: global name 'Plugins' is not defined
    I have:
    updated kali
    Checked the dependancies of binwalk at the wiki and they are installed.
    apt-get remove binwalk, then apt-get install binwalk (didnt think this would do anything but tried it )

    Has anyone else had this issue, or can point me straight please?
    cheers

  2. #2
    Same issue here
    Using Kali x86 1.0.3, with & without bleeding edge - fully up-to-date each time

    Code:
    root@kali ~$ wget http://www.tp-link.com/resources/software/TL-WA801ND_V2_130121.zip                                                                                                                    
    --2013-07-24 12:03:17--  http://www.tp-link.com/resources/software/TL-WA801ND_V2_130121.zip
    Resolving www.tp-link.com (www.tp-link.com)... 50.62.149.47
    Connecting to www.tp-link.com (www.tp-link.com)|50.62.149.47|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 3597282 (3.4M) [application/x-zip-compressed]
    Saving to: `TL-WA801ND_V2_130121.zip'
    
    100%[===============================================================================================================================================================>] 3,597,282    512K/s   in 7.7s    
    
    2013-07-24 12:03:25 (459 KB/s) - `TL-WA801ND_V2_130121.zip' saved [3597282/3597282]
    
    root@kali ~$ unzip TL-WA801ND_V2_130121.zip                                                                                                                                                             
    Archive:  TL-WA801ND_V2_130121.zip
       creating: TL-WA801ND_V2_130121/
      inflating: TL-WA801ND_V2_130121/wa801nv2_en_3_13_30_up_boot(130121).bin  
    root@kali ~$ cd TL-WA801ND_V2_130121                                                                                                                                                                    
    root@kali ~/TL-WA801ND_V2_130121$ binwalk -B wa801nv2_en_3_13_30_up_boot\(130121\).bin                                                                                                                     
    Traceback (most recent call last):
      File "/usr/bin/binwalk", line 536, in <module>
        main()
      File "/usr/bin/binwalk", line 481, in main
        plugins_blacklist=plugin_blacklist)
      File "/usr/lib/pymodules/python2.7/binwalk/__init__.py", line 306, in scan
        self.plugins = Plugins(self, whitelist=plugins_whitelist, blacklist=plugins_blacklist)
    NameError: global name 'Plugins' is not defined
    root@kali ~/TL-WA801ND_V2_130121$

    Code:
    root@kali ~$ binwalk 2>&1 | head                                                                                                                                                                        
    
    Binwalk v1.2.1
    Craig Heffner, http://www.devttys0.com
    
    Usage: binwalk [OPTIONS] [FILE1] [FILE2] [FILE3] ...
    
    Signature Analysis:
    	-B, --binwalk                 Perform a file signature scan (default)
    	-R, --raw-bytes=<string>      Search for a custom signature
    	-A, --opcodes                 Scan for executable code signatures
    root@kali ~$
    I think this should make its way onto http://bugs.kali.org if it hasn't already.

    Edit:
    Bug submitted: http://bugs.kali.org/view.php?id=460
    Last edited by g0tmi1k; 2013-07-25 at 15:38.

  3. #3
    Join Date
    2013-Jul
    Posts
    4
    Thanks alot for going to the trouble of testing it, I appreciate that.

    Seems its not me then (for a change). I don't know enough linux coding to help solve the bug though in Kali unfortunately.

    I did manage to get binwalk working fine on another VM of BT5r3 after a few hours of updating that and installing it from source. IIRC the version of binwalk BT had was 0.4 something.

    Worked great, though after around 4 hours of work realised these tools arent going to help with the firmware Im looking at.

  4. #4
    Thank you for taking the time to report the issue in the first place!

    The issue I believe is with package in Kali and as a result, I've submitted it to the bug tracker (didn't see anyone else reporting the issue).

    Backtrack 5 has 0.4.3 its in repos (that was released in March 2012), Kali has 1.2.1 (released in April 2013).
    However I guess the better version is the one that works for you

    Sorry to hear that it didn't do the trick.
    If it helps, I know that pauldotcom.com love firmware stuff, and have had a few talks about tools on their podcast so you could check their wiki.

  5. #5
    Join Date
    2013-Aug
    Posts
    1
    Removing these files fixed this problem for me:
    /usr/lib/pymodules/python2.7/binwalk/plugins/__init__.py
    /usr/lib/pymodules/python2.7/binwalk/plugins/__init__.pyc
    /usr/lib/pymodules/python2.6/binwalk/plugins/__init__.py
    /usr/lib/pymodules/python2.6/binwalk/plugins/__init__.pyc

    The binwalk package does not show these files in this directory, so I'm not sure how they got installed. The issue appears to be that the python import finds __init__.py in the plugins directory before the plugins.py file in the binwalk directory and thus the Plugins class does not get defined.

  6. #6
    Join Date
    2013-Jul
    Posts
    4
    Many many Thanks for figuring that out, it worked for me as well.

    I am now binwalking again

  7. #7
    The issue should be fixed now. Package has been updated.

    Upgraded and fixed in binwalk_1.2.2-1-1kali0.
    Source: https://bugs.kali.org/view.php?id=460

Similar Threads

  1. SET - msfpath not defined
    By Draka in forum TroubleShooting Archive
    Replies: 7
    Last Post: 2016-05-09, 16:38

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •