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

Lua Values for reporting #104

Merged
merged 2 commits into from
Mar 24, 2023
Merged

Lua Values for reporting #104

merged 2 commits into from
Mar 24, 2023

Conversation

MindPatch
Copy link
Contributor

for #100

Change Log

  • The reporting functions have been removed.
  • The new implementation uses Lua values, allowing for greater flexibility. You can now use Lua tables or just strings and numbers to add reports. To add a report, use the Reports:add function

like so:

-- Adding a report with a Lua table
Reports:add{ name = "XSS", param = "name", payload = "<img src=x onerror=alert()>"}

-- Adding a report with other Lua values
Reports:add("Got Response from the target :D")
Reports:add(false)

The resulting JSON output would be:

[
  {
    "name": "XSS",
    "param": "name",
    "payload": "<img src=x onerror=alert()>"
  },
  "Got Response from the target :D",
  false
]

@MindPatch MindPatch added the core-changes make changes for Lotus Core in Rust label Mar 24, 2023
@MindPatch MindPatch added this to the 0.0.5-beta milestone Mar 24, 2023
@MindPatch
Copy link
Contributor Author

Also you don't have to call any print function to print the report, when you call Reports:add lotus will print the report for you

    local report = {age=18,data={bruh=2,dd={22,44},data={"fff"}},name = "Mike"}
    Reports:add(report)

in CLI would be

{
  [#] age: 18

  [📂 data:
    | → bruh: 2
    | → data: ["fff"]
    | → dd: [22,44]
  ]<|

  [#] name: "Mike"
}

@MindPatch MindPatch merged commit 5d7b925 into 0.5-beta Mar 24, 2023
@MindPatch MindPatch deleted the table_report branch March 24, 2023 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-changes make changes for Lotus Core in Rust
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant