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

Implement intelligent command fuzzing #15

Open
madmaxoft opened this issue Oct 16, 2016 · 2 comments
Open

Implement intelligent command fuzzing #15

madmaxoft opened this issue Oct 16, 2016 · 2 comments

Comments

@madmaxoft
Copy link
Member

madmaxoft commented Oct 16, 2016

Command fuzzing could be made much more intelligently:

  1. Execute a command with (unique) random parameters
  2. If the handler just outputs a message to the player, try to see if it contains the command name, if so, try to parse usage (number of parameters) from it, otherwise just retry a few times with a different count of parameters
  3. If the command handler accesses special APIs, take note which parameter is used for the API call and use a proper value for the next retry.
    • cRoot:GetWorld() -> the param is a world name
    • cWorld:GetPlayer(), cWorld:DoWithPlayer() -> the param is a player name
    • tonumber -> a number is expected for this param
  4. Retry a few times with params adjusted based on the heuristics in step 3.
@NiLSPACE
Copy link
Member

Perhaps we can improve the Info.lua file to include the parameter combinations?

@madmaxoft
Copy link
Member Author

That is a possibility, but that would be already a bit too "chatty" for a description file. If we can auto-detect the param usage, that should be enough.

It's still possible to test individual commands using the Scenario file's playerCommand action, after all.

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

No branches or pull requests

2 participants