Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new feature to Lotus that allows users to pass custom input data to their Lua scripts via the parse_input function. The parse_input function is expected to return a Lua table that contains the input data. If the function returns data, the input types for URLs, hosts, and paths will be ignored.
To use this feature in your script, set the SCAN_TYPE variable to 4. Lotus will then choose your script for custom input and pass the input data to your script via the INPUT_DATA global variable. The INPUT_DATA variable is a Lua table that contains the input data.
Here is an example parse_input function:
And here is an example main function that uses the input data:
To run your script with custom input, use the --input-handler option and pass the path to your parse_input function. For example:
This will run your script with the custom input and print the output, which will include the custom input data.