Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@coal-rock
Copy link
Owner

This PR scaffolds the preliminary requirements for later implementing proper script support.

What we have so far:

  • Over-the-wire serialization + execution
  • Scripts stored in state
  • Custom metadata format for exposing arguments to callers

What we need:

  • Proper CLI argument parsing
    • This likely involves a full rewrite of the command parse
  • Support for dynamically adding scripts at runtime
  • Parameter injection

Example script:

---
name = "scanports" 
description = "scans network on given port ranges" 
  
[[params]]
name = "ip"
arg_name = "ip_addr"
description = "the ip address to scan"
type = "string"
placeholder = '"192.168.1.2"'

[[params]]
name = "ports"
arg_name = "ports"
description = "list of ports to scan"
type = "array"
placeholder = '[25565, 1337]'

[[params]]
name = "aggressive"
arg_name = "aggressive"
description = "dictates speed of scan"
type = "bool"
placeholder = "true"
---

print("this is some rhai code!!")
print(PARAMS["ports"])
print(PARAMS["agressive"])
print(PARAMS["ip"])

@coal-rock coal-rock added talaria Pantheons shared library scripting Embedded scripting for Pantheon labels May 2, 2025
@coal-rock coal-rock requested a review from engelhartrueben May 2, 2025 14:55
Copy link
Collaborator

@engelhartrueben engelhartrueben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! 🚀

@coal-rock coal-rock merged commit 8838cf9 into main May 2, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scripting Embedded scripting for Pantheon talaria Pantheons shared library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants