-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
RustScan Scripting Engine
No scripts will be run with this option.
Effectively this runs RustScan without custom scripts or nmap.
rustscan --scripts none
You don't need to enable this.
By default, RustScan runs Nmap as its script.
rustscan --scripts default
You can do this, but it's not needed.
Custom scripts execute after the program has run. You write (or use) a script, and RustScan executes it.
RustScan supports these languages for scripts:
- Python
- Shell
- Perl
To execute a custom script, we need a rustscan_scripts.toml
file located at $HOME/.rustscan_scripts.toml
.
This file should look like:
tags = ["core_approved", "example"]
ports = ["80"]
developer = ["example"]
Let's walk through this.
Firstly, for reference, this is a basic Python script.
```python
#!/usr/bin/python3
#tags = ["core_approved", "example",]
#developer = [ "example", "https://example.org" ]
#trigger_port = "80"
#call_format = "python3 {{script}} {{ip}} {{port}}"
# Sriptfile parser stops at the first blank line with parsing.
# This script will run itself as an argument with the system installed python interpreter, only scanning port 80.
# Unused filed: ports_separator = ","
import sys
print('Python script ran with arguments', str(sys.argv))
Scripts contain
Firstly, you'll need a rustscan_scripts.toml
file located at $HOME/.rustscan_scripts.toml
.
Scripts are expected to be stored in $HOME/.rustscan_scripts
. Make the directory!
To use custom scripts, use --scripts custom
.