-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unable to add arguments to extensions #1493
Comments
This is poorly documented at the moment, but extensions other than BOFs don't support typed arguments. Arguments are passed as a single string to the extension, and it's up to the extension code to parse it. You can check this example for reference. |
Thanks for the quick response. The example given only uses numbers as args. In my extension I am parsing the arg string myself but I noticed that ' and " characters seem to be taken out. If I pass:
What I get on the input argsBuffer is:
This breaks the arguments down from the intended 3 to 8. Is there something I should be aware of when passing a string as arguments? I am using C to code the extension. Thanks in advance. |
I should clarify, I have now removed the arguments from the json file. |
That's because the arguments are first interpreted as a sliver/client/command/extensions/load.go Line 364 in f2a3915
This is one of the shortcomings we have with extensions right now that will be solved in 1.6 once we merge #1424. You could try something like this:
|
Brilliant, thanks for the information. I can work around this now I know. |
Describe the bug
When I add arguments to an extension the client crashes and displays the following error:
panic: missing arg value: arg 'arguments' not registered
To Reproduce
Steps to reproduce the behavior:
Using the following .json file:
Expected behavior
I would expect the extension to be loaded and executed on the target beacon.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: