Orange-Cyberdefense / arsenal

Arsenal is just a quick inventory and launcher for hacking programs
GNU General Public License v3.0
3.15k stars 459 forks source link

args uniqueness #90

Open jubeaz opened 3 months ago

jubeaz commented 3 months ago

Hello,

I don't know if this is the proper place to exchange on modification, but as I'm starting to work on adding the concept of option that can be either constant string or a mix on constant and args (see my comments in Issues open on optional args), I realized that there is something that is bothering me in the way args are managed. Right now for me they are more named place holder, because args having the same name can have different values.

As I consider it, a command needs args and an arg can be used in several location of the command representation. example:

$ cp --help
Usage: cp [OPTION]... [-T] SOURCE DEST

Declaring cp <path> <path> it's not declaring the arguments of cp.

Do you agree if we do perform code modification to args and not named place holder. This means that args will be unique and written at different place of the command.

The impact will be on such declaration : example cmd <arg_1|Default_value_1>... <arg_1|Default_value_2>

arg_1 has two default value, So the last one will be the one set (Default_value_2) or the first one. If you agree I could make a first pull request before adding these changes then Ill work on options.

jubeaz commented 3 months ago

here is some example of the results 2024-05-24_05-34 2024-05-24_05-34_1

v1k1ngfr commented 3 months ago

Hey ! we will take a look at this in the next code review thanks