Jump to content

rubber ducky problem help


ZakariaM

Recommended Posts

┌──(dimitry㉿kali)-[~/Downloads/ducky-flasher1.0/ducky-flasher]
└─$ sudo ducky-flasher   
  File "/usr/bin/ducky-flasher", line 10
    print "There was an error flashing, make sure your Ducky is in DFU mode"
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("There was an error flashing, make sure your Ducky is in DFU mode")?

 

 

I want to reset my rubber ducky to original firmware but i have this problem here

what i must do

i cant start rubber-ducky on kali

dfu programm is installed

 

 

in ducky-flasher.py is :

 

#!/usr/bin/env python
import os

exit = 1
status = 0

while exit == 1:
    os.system("clear")
    if status != 0:
        print "There was an error flashing, make sure your Ducky is in DFU mode"
        print
    print "      Welcome to ducky-flasher"
    print "              _.._            "
    print "             /   a\__,        "
    print "             \  -.___/        "
    print "              \  \            "
    print "         (\____)  \           "
    print "     |\_(         ))          "
    print "_____|   (_        /________  "
    print "     _\____(______/__         "
    print "          ______              "
    print
    print
    print "Which firmware would you like to flash?"
    print "1. Original (duck.hex)"
    print "2. FAT Duck (usb.hex)"
    print "3. Detour Duck (m_duck.hex)"
    print "4. Twin Duck (c_duck.hex)"
    print
    print "99. Exit ducky-flasher"
    print
    option = int(raw_input("Choice: "))

    if option == 1:
        os.system("clear")
        print "Description of Original Firmware"
        print ""
        print "Would you like to flash your ducky with The original firmware?"
        print "1 = yes"
        print "2 = no"
        flash = int(raw_input("Choice: "))
        if flash == 1:
            os.system("clear")
            status = os.system("sudo dfu-programmer at32uc3b1256 erase; sudo dfu-programmer at32uc3b1256 flash --suppress-bootloader-mem Firmware/duck_v2.hex; sudo dfu-programmer at32uc3b1256 reset")
            if status == 0:
                os.system("clear")
                print "Your duck has been flashed, would you like to return to the main menu?"
                print "1 = yes"
                print "2 = no"
                exit = int(raw_input("Choice: "))
        else:
            status = 0
            
    if option == 2:
        os.system("clear")
        print "Description of FAT Duck"
        print
        print "Would you like to turn your Ducky into a expensive Flash Drive?"
        print "1 = yes"
        print "2 = no"
        flash = int(raw_input("Choice: "))
        if flash == 1:
            os.system("clear")
            status = os.system("sudo dfu-programmer at32uc3b1256 erase; sudo dfu-programmer at32uc3b1256 flash --suppress-bootloader-mem Firmware/USB_v2.hex; sudo dfu-programmer at32uc3b1256 reset")
            if status == 0:
                os.system("clear")
                print "Your duck has been flashed, would you like to return to the main menu?"
                print "1 = yes"
                print "2 = no"
                exit = int(raw_input("Choice: "))
        else:
            status = 0
    if option == 3:
        os.system("clear")
        print "Description of Original Firmware"
        print
        print "Would you like to flash your ducky with Detour Duck?"
        print "1 = yes"
        print "2 = no"
        flash = int(raw_input("Choice: "))
        if flash == 1:
            os.system("clear")
            status = os.system("sudo dfu-programmer at32uc3b1256 erase; sudo dfu-programmer at32uc3b1256 flash --suppress-bootloader-mem Firmware/m_duck_v2.hex; sudo dfu-programmer at32uc3b1256 reset")
            if status == 0:
                os.system("clear")
                print "Your duck has been flashed, would you like to return to the main menu?"
                print "1 = yes"
                print "2 = no"
                exit = int(raw_input("Choice: "))
        else:
            status = 0
    if option == 4:
        os.system("clear")
        print "Description of Twin Duck Firmware"
        print
        print "There are 3 versions of the Twin Duck Firmware"
        print "Original, Special Request 1, and Special Request 2!"
        print
        print 'The original executes on inserting it'
        print "Special Request 1 executes on LED trigger (Cap Locks, Num Locks, etc)"
        print "Special Request 2 executes on pressing the GPIO pin"
        print
        print "Which version do you want to flash?"
        print "1 = Original"
        print "2 = Special Request 1"
        print "3 = Special Request 2"
        flash = int(raw_input("Choice: "))
        if flash == 1:
            status = os.system("sudo dfu-programmer at32uc3b1256 erase; sudo dfu-programmer at32uc3b1256 flash --suppress-bootloader-mem Firmware/c_duck_v2.hex; sudo dfu-programmer at32uc3b1256 reset")
            os.system("clear")
            if status == 0:
                os.system("clear")
                print "Your duck has been flashed, would you like to return to the main menu?"
                print "1 = yes"
                print "2 = no"
                exit = int(raw_input("Choice: " ))
        if flash == 2:
            os.system("clear")
            status = os.system("sudo dfu-programmer at32uc3b1256 erase; sudo dfu-programmer at32uc3b1256 flash --suppress-bootloader-mem Firmware/c_duck_v2_S001.hex; sudo dfu-programmer at32uc3b1256 reset")
            if status == 0:
                os.system("clear")
                print "Your duck has been flashed, would you like to return to the main menu?"
                print "1 = yes"
                print "2 = no"
                exit = int(raw_input("Choice: "))
        if flash == 3:
            os.system("clear")
            status = os.system("sudo dfu-programmer at32uc3b1256 erase; sudo dfu-programmer at32uc3b1256 flash --suppress-bootloader-mem Firmware/c_duck_v2_S002.hex; sudo dfu-programmer at32uc3b1256 reset")
            if status == 0:
                os.system("clear")
                print "Your duck has been flashed, would you like to return to the main menu?"
                print "1 = yes"
                print "2 = no"
                exit = int(raw_input("Choice: "))
        else:
            status = 0
    if option == 99:
        exit = 2
        
os.system("clear")
print "Thank you for using ducky-flasher"



so what is wrong ?? i find nothing

Link to comment
Share on other sites

Your Kali box doesn't have Python2.x right? It shouldn't if you haven't actively installed it yourself. This makes running Python2.x based scripts problematic since things are handled differently in Python3.x (that Kali has installed). You either have to alter the flashing script to be compatible with Python3.x or run it in an environment where Python2.x is available. I would suggest the latter.

Link to comment
Share on other sites

That here is show me alternate when i tipp

└─$ sudo ducky-flasher  
  File "/usr/bin/ducky-flasher", line 10
    print "There was an error flashing, make sure your Ducky is in DFU mode"
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("There was an error flashing, make sure your Ducky is in DFU mode")?

 

and python is already installed

└─$ sudo python2 

Python 2.7.18 (default, Jan 27 2022, 02:05:20)
[GCC 11.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

 

 

that is realy new for me

befor this , ducky-flasher was working without problems

i have delete the ducky-flasher.py in usr / bin

and install all new ,but its the same problem

dfu-programmer is installed

and when i tipe

sudo python2 ducky-flasher

on the ducky-flasher folder from github

itś work a half . its show me the script but with a error

 

└─$ sudo ducky-flasher                                                          1 ⨯
  File "/usr/bin/ducky-flasher", line 10
    print "There was an error flashing, make sure your Ducky is in DFU mode"
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("There was an error flashing, make sure your Ducky is in DFU mode")?

 

///i only wanted flash in the original ducky firmware , but it show me the red lights

 

//And

└─$ sudo python ducky-flasher

  File "/home/dimitry/Downloads/ducky-flasher1.0/ducky-flasher/ducky-flasher", line 10
    print "There was an error flashing, make sure your Ducky is in DFU mode"
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("There was an error flashing, make sure your Ducky is in DFU mode")?

 

 

//And:

└─$ sudo python3 ducky-flasher                                                  1 ⨯
  File "/home/dimitry/Downloads/ducky-flasher1.0/ducky-flasher/ducky-flasher", line 10
    print "There was an error flashing, make sure your Ducky is in DFU mode"
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("There was an error flashing, make sure your Ducky is in DFU mode")? 

 

 

///And this here on python2 :

 

      Welcome to ducky-flasher
              _.._            
             /   a\__,        
             \  -.___/        
              \  \            
         (\____)  \           
     |\_(         ))          
_____|   (_        /________  
     _\____(______/__         
          ______              


Which firmware would you like to flash?
1. Original (duck.hex)
2. FAT Duck (usb.hex)
3. Detour Duck (m_duck.hex)
4. Twin Duck (c_duck.hex)

99. Exit ducky-flasher

Choice:


///BUT it not works

i tipe 1 and its

validating ...  an the ruberducky is in the dfu mode

But after the process it show only the red lights

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...