aleff-github/DuckyScriptCookbook

Support other DuckyScript commands in Syntax Highlighting

Opened this issue · 7 comments

Is your feature request related to a problem? Please describe.
I maintain https://github.com/i-am-shodan/USBArmyKnife/. This is an open source Ducky like device that implements most of the Ducky3 language specification. In addition end users can extend the language via Ducky script functions as well as in C++ with new commands. The Flipper Zero team is also a group that has implemented other extensions to Ducky scripting.

I'd like to be able to offer some support for syntax highlighting. The project already has a lot of custom commands documented here. It would be great if I could use this extension but also add my custom commands to the settings.json to enable these to be picked up.

The DuckyScriptCookbook project was created as an independent project, in no way affiliated with Hak5 (the owners of the DuckyScript trademark), as described on the homepage…

While this may alienate the project, in reality, it makes it free from this kind of "extra" inclusion.
However, I would like to understand better how these commands work. Did you create a device that supports the execution of DuckyScript, similar to the Flipper Zero, but unlike the latter, it can also execute DuckyScript3 commands and new commands created entirely by you?

If that's the case, it would be amazing because it would be interesting to have a comprehensive extension that includes all these commands. I was thinking of creating a specific category for each source, that is…

If a command originates from Hak5, and we can consider it native, then the category wouldn’t be comments.inline.duckyscript, but rather something like comments.inline.native.duckyscript or comments.inline.hak5.duckyscript.
On the other hand, if a command originates from the Flipper Zero community or other projects, it could be adjusted according to the specific project, such as commands.flipperzero.duckyscript or commands.usbarmyknife.duckyscript.

I think this would be really cool because it would allow anyone to openly choose (and not necessarily based on my preferences) the color they want to assign to commands, depending on where they come from.

Did you create a device that supports the execution of DuckyScript

Yes, the USB Army Knife project is completely separate from Hak5 and their products. It implements many of the same commands and a ton more.
It almost implements the entire Ducky3 specification.

You can install the USB Army Knife software on a few different COTS debug boards. Often these look very similar to commercial devices.

it could be adjusted according to the specific project

I'd love a few things:

  • USB Army Knife commands to be included in your project.
  • The ability for me to add additional commands to my projects settings.json so that I don't have to wait for you to make changes in this project.

Certainly! If you could provide a complete list of all the new commands created by USB Army Knife (So by not including Hak5's native commands), that would be ideal, as it would make it much easier for me to include them in the project. I plan to dedicate a specific color for these commands to make them stand out.

Don’t worry about the time it might take on my end - I’m genuinely happy to contribute to this project. However, if you’d like to participate actively, feel free to open a pull request to modify the file inside Syntax and the theme file. That said, if there are any issues, I’d be more than happy to handle the integration myself so no problem.

Thanks,

All our new commands are documented here. Under the USB Army Knife commands section.

USB Army Knife now exists https://github.com/aleff-github/DuckyScriptCookbook/releases/tag/1.0.3

Say me if you find bugs or errors about my last work

Cool, can I just update via VSCode?

Cool, can I just update via VSCode?

Yes you can, say me if it works 👍