Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support other DuckyScript commands in Syntax Highlighting #2

Open
i-am-shodan opened this issue Nov 13, 2024 · 7 comments
Open

Support other DuckyScript commands in Syntax Highlighting #2

i-am-shodan opened this issue Nov 13, 2024 · 7 comments
Assignees
Labels
contribute Even an idea is fine

Comments

@i-am-shodan
Copy link

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.

@i-am-shodan i-am-shodan added the contribute Even an idea is fine label Nov 13, 2024
@aleff-github
Copy link
Owner

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.

@aleff-github aleff-github changed the title FEATURE: Support extensions to the DuckScript 3 language Support other DuckyScript commands in Syntax Highlighting Nov 13, 2024
@aleff-github aleff-github pinned this issue Nov 13, 2024
@i-am-shodan
Copy link
Author

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.

@aleff-github
Copy link
Owner

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.

@i-am-shodan
Copy link
Author

Thanks,

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

@aleff-github
Copy link
Owner

aleff-github commented Nov 20, 2024

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

@i-am-shodan
Copy link
Author

Cool, can I just update via VSCode?

@aleff-github
Copy link
Owner

Cool, can I just update via VSCode?

Yes you can, say me if it works 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribute Even an idea is fine
Projects
None yet
Development

No branches or pull requests

2 participants