Jump to content

Archived

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

DarkAnHell

[Discontinued] DuckyManager: Manage your scripts.. and other's, too

Should this be a thing?  

8 members have voted

  1. 1. Should this be a thing?

    • Yes, definetly, go ahead
    • Not bad, I'd take a look
      0
    • Meh, I don't know
      0
    • I don't see it...
      0
    • Please no, stop, for the love of God.
      0


Recommended Posts

Well, hello there!

A brief introduction

I just reciently got my hands on the Ducky, and still learning to use it, but I can already see the potential of it.

Looking for examples I stumbled upon the wiki list that had some examples, and some "easy scripts generators", which was really nice.

But i got myself thinking: Where are all the contributions? I mean, if this product has been out for some time, there sure must be a long list of community-made scripts avaliable, right?

Surprisingly, I didn't found much.

Which led me to start creating what I now present here as a Work-In-Progress project, hoping to hear the community's response to it.

The idea

A CLI which will serve as a manager to both, your local scripts and the community ones.

It will keep track of all your scripts, allowing you to sort them by the target OS -even by version of OS-, by name or by description, making it really easy to store dozens of scripts without losing your mind.

It will also keep track of community-sourced scripts, allowing you to browse them without even having them on your system, only downloading them when you decide to use them. You could search through thousands of scripts as easily as it is searching the local ones: By user, by OS, by effects...

How? Community repositories ,ala Linux... but on GitHub!

Any user could upload their own scripts to the repositories - from inside the manager! -, making them avaliable for anyone to use.

All scripts would be managed through a list of github repositories, which the program would automatically parse and update the local data for.

Any user could have their own repository, which any user could source from; but of course, there would be an official repository (or several) from which the program would get it's sources by default.

For bonus points, the Manager will - hopefully- also have:

  • Quick configuration of scripts: The manager will automatically let you edit the required parameters before encoding them. So, scripts that require a host to connect to, ports, emails, etc. will be easier and faster to use.
  • Automatic encode and loading: Encode any script and load them onto your SD card from inside the manager, with any avaliable keymap.
  • Multi-language: Designed to be translated, all strings used by the program is inside an easily editable file, for each language. Anyone could translate it to any language in less than a day.
  • Ducky flashing: Repositories also contain firmware for the ducky. Flash from inside the manager with any of them, without having to ever store them. Also, save a backup of your old firmware automatically. Because safety always comes first.
  • Integrated editor: Why have a program to manage your scripts and another to create them? Just code from inside the manager. With syntax recognition incorporated, of course! - not that the language is difficult anyways -.

Curent state

I have just started coding this today, in Golang.

It's already capable of managing hundreds of local scripts with no problem, so I'm pretty certain I'll have a Beta to publish for testing in not that much time - though I can't spend the day on it! -.

Of course the first version wont have all the planned features, but they will come, if the community wants it.

So that's it, basically. I'm here looking for thoughts and comments about it, so please feel free to express yourself about this idea!

I will update this post as I get things done - assuming you guys want it, of course. -

(Code is not publicly avaliable yet, will make it public with the first Alpha/Beta)

Share this post


Link to post
Share on other sites

Definitely an interesting idea. It would make it a lot easier for new users to find code to do what they want, though I still think it's best that they learn how to do it themselves.

Share this post


Link to post
Share on other sites

An AIO tool would be marvellous.

Keep on coding! :cool:

Share this post


Link to post
Share on other sites

Definitely an interesting idea. It would make it a lot easier for new users to find code to do what they want, though I still think it's best that they learn how to do it themselves.

Of course. This is intended to make everything simplier for the users of the Ducky, not to obfuscate the scripting process from them. That's why I plan on making sharing a script to the community as simple as editing a config file once, then just code and press a button. I want people to contribute, not just leech :)

An AIO tool would be marvellous.

Keep on coding! :cool:

Thanks! Working on it, though I'm having a busy weekend, but will update the main post with each step forward.

Share this post


Link to post
Share on other sites

Thanks! Working on it, though I'm having a busy weekend, but will update the main post with each step forward.

No sweat.

Take your time ;)

Share this post


Link to post
Share on other sites

Dev 1.0 is almost out!

Since apparently I can't edit my original post, I'll just write here the current roadmap, and from now on just post updates of it, not the whole thing again.

ROADMAP Dev 1 New Functionalities
  • [100%] Local script managing:
    • [100%] Automatic script inclusion (parsing folder)
    • [100%] Script searching (by Title, Operating System, Creator and Description)
    • [100%] Script properties editing (title, OS, creator and description)
  • [100%] Automatic logging file for bug reports and troubleshooting, also translate-able.
Graphical
  • [33%] Basic command line interface (ncurses style) for all functionalities
Other
  • [0%] Code posted on GitHub
Dev 2 New Functionalities
  • Remote script managing:
    • Search through remote scripts as they were local
    • Download scripts on command
Other
  • Official repository up and running, automatically included to be used
Dev 3 New Functionalities
  • Users can now create their own repositories, which others can add and use.
  • Users can upload / delete / modify scripts from their repositories, from within the app
Dev 4 New Functionalities
  • Users now can request for their scripts to be added onto the official repository (from within the app).
Alpha Other
  • User and contributors documentation added.
Beta New functionalities
  • New languages automatic adding and updating system
  • Update checking for the program
Other
  • Fix of bugs from Alpha
Future utilities ( in expected order )
  • Script setup helper (auto-fill variables in the script)
  • Embedded script editor
  • Automatic encoding and deploying system (for any keymap)
  • Firmware repositories and automated flashing

Note that "Dev" versions will not be meant to be used, as not even the documentation will be out. But if anyone wants to play around with it.. testing will be appreciated.

First code publishing will be at the end of Dev1 :)

As always, any comment on it or possible addition is welcomed.

Share this post


Link to post
Share on other sites

Copy-pasted from markdown file, and can't edit.. Hur-durr, my bad. It's still readable at least :)

I think there might be a minimum number of posts required to edit your own posts (kinda weird, right?). The link to edit your post should be right underneath the post itself, next to the Multiquote button, though it's grayed out when you're not hovering over it.

Share this post


Link to post
Share on other sites

Took me a while, but Dev 1 is out :)

The official repository is public now: DuckyManager

Keep in mind is just a dev, not even documentation is out!

But if you want to keep track of everything, the repo is the way to go.

I'll update this post only on major updates, to keep it clean.

Have a nice day!

PD: Yup, can't edit yet. I guess i'll take care of it when i'm able to :happy:

Share this post


Link to post
Share on other sites

Oh hey, not bad for "having limited programming knowledge"! haha

I sure will be taking a look at your code for inspiration, though I don't have that much time right now (college ftw), but still coding.

You are more than welcome to contribute in any way if you feel like it!

A note thought, mine aims to be bigger, more like a fully featured console IDE with remote repositories :p

PS: I'm guessing you are okay with me having this project :rolleyes:

Share this post


Link to post
Share on other sites

I created a shell script to help manage my ducky scripts and to copy what i wanted to use to the root of the drive.  After creating it, i wanted to post it just incase anyone else might find it useful and came across this thread.  I made this shell script on a mac, and also tested it out on another linux based box and didn’t have any problems.  The only thing I had to do on the mac was download the “dialog” command via brew.

 

Currently my SD card contains the following directory structure: 

As you can see, some of these scripts are from the repository.  The Directories are the same name as the script, each directory has the script and the compiled version of the script ready for the duck.

 

When i put in the SD card, i run the menu.sh to bring up the “script manager”

what is does is just read the contents of the directory structure and puts it in a menu. 

I find the one i want and hit enter

and it will copy it to the root drive 

and the script exits.

 

if the inject.bin does not exist where the script is located at, then it will compile it.

A lot of the top vars can be changed if you need to.  I mostly created it based on how i run and manage the scripts.

 

menu.sh  or ducky_menu.sh (call it whatever you want )

 

 

#!/bin/bash
#ducky_menu.sh
#Version: 1.0.5
#by JM
MainFile="inject.bin";  #the compiled file for the rubber ducky
CurrentPath=$PWD;        #The path of were the menu.sh was ran, this can be hardcoded if needed
ScriptsPath="$CurrentPath/scripts";     #path of where the scripts are at, usually a sub folder of the current
EncoderPath="$CurrentPath/Encoder/encoder.jar"; #location of the encoder
MakeDirMoveFiles=true;    #if you have the code in the scripts director and what it to be in it's own directory
ScriptExt="txt";        #the extenstion of the script
PathName="";            #global var, leave blank
choices="";                #global var, leave blank

MakeDirFromFiles()
{
    cd $ScriptsPath
    for file in *.$ScriptExt; 
        do 
            mkdir -- "${file%.$ScriptExt}"; mv -- "$file" "${file%.$ScriptExt}"; 
        done
    cd $CurrentPath
}
DoCopy()
{
    cpFrom="$ScriptsPath/${PathName[@]}/$MainFile"
    cpTo="$CurrentPath/$MainFile"
    #echo "copy from $cpFrom $cpTo"
    #rm $MainFile
    cp "$cpFrom" "$cpTo"
    dialog --title 'File Copied' --msgbox "$cpFrom was copied to $enTo" 6 60
}
RunEncoder()
{
    enFrom="$ScriptsPath/${PathName[@]}/${PathName[@]}.$ScriptExt"
    enTo="$CurrentPath/$MainFile"
    java -jar $EncoderPath -i "$enFrom" -o $enTo
    dialog --title 'File Compiled' --msgbox "$cpFrom was comiled to $enTo" 8 60
}
DoMenu()
{
    i=0
    x=1
    while read line
    do
        array[ $i ]="$line" 
        #options="${options} ${x} \"$line\" off"$'\n'
        if [[ -n "$options" ]]; then
            options=("${options[@]}" "$x" "\"$line\"" "off")
        else
            options=("$x" "\"$line\"" "off")
        fi
        #options=("${options[@]}" "$x" "$line")
        (( i++ ))
        (( x++ ))
    done < <(ls $ScriptsPath)
    cmd=(dialog --separate-output --checklist "Select options:" 22 76 16)
    choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
    if [ -z "$choices"] ; then
        choices=0
    fi
    if (($choices > 0)) ; then
        arrayID=`expr $choices - 1`
        PathName="${array[$arrayID]}"
        if [ -f "$ScriptsPath/$PathName/$MainFile" ]; then
            DoCopy $PathName
        else
            RunEncoder $PathName
        fi
        clear
        echo "Good Bye Happy Ducking!"
    else
        clear
        echo "No Options selected..Good Bye!"
    fi
}
if $MakeDirMoveFiles ; then
    MakeDirFromFiles;
fi
DoMenu;

 

Share this post


Link to post
Share on other sites

Sorry the pictures didn't come through. and I can't edit

 

Currently my SD card contains the following directory structure:

dirStructure.png

As you can see, some of these scripts are from the repository.  The Directories are the same name as the script, each directory has the script and the compiled version of the script ready for the duck.

 

When i put in the SD card, i run the menu.sh to bring up the “script manager”

what is does is just read the contents of the directory structure and puts it in a menu.

 

menu.png

 

I find the one i want and hit enter

 

menu1.png

 

and it will copy it to the root drive

 

file_copied.png

 

and the script exits.

 

if the inject.bin does not exist where the script is located at, then it will compile it.

A lot of the top vars can be changed if you need to.  I mostly created it based on how i run and manage the scripts.

Share this post


Link to post
Share on other sites

Hey!

Thanks for reminding me about this thread :rolleyes:

 

As an update, I had no option but to drop this project, due to lack of time. The repo have been pulled from GitHub (well, made private) and I still have the code as it was, in case someone else wants to continue it or take it as inspiration.

 

As for your script, I think you'd be better off putting it in a separate thread for maximum views, so people can follow it's development and use it :)

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...