You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
馃挕 [REQUEST] - Generic environment variables in page yaml聽#29
In my current configuration, the CLI is running in docker, so when referencing the ${cwd} magic variable it references the path in the container. Examining the code it showed where this substitution takes place:
It would be great if a secondary processing took place to check for environment variables and substitute those as well.
Basic Example
Using a modified version of the GoBuster page to use a specific wordlist from a directory on the host at ~/project/robopages/data
description: > Gobuster is a tool used for brute-force discovery of URIs (directories and files) in web sites, DNS subdomains (with wildcard support), Virtual Host names on target web servers, Open Amazon S3 buckets, Open Google Cloud buckets, TFTP serversfunctions:
gobuster_directory_brute_force:
description: Perform a web server directory brute force to find hidden files and foldersparameters:
target:
type: stringdescription: The URL against which to perform brute force scan.examples:
- http://www.example.com
- https://supersight.totallyawesome.comcontainer:
force: trueplatform: linux/amd64image: ghcr.io/oj/gobuster:latestargs:
- --net=hostvolumes:
- $WORKINGDIR/data:/datacmdline:
- gobuster
- dir
- -t
- '20'
- --no-color
- --quiet
- --no-progress
- -w
- /data/wordlists/web/quickhits.txt
- -z
- --no-color
- -b
- '404,403'
- -u
- ${target}
The ideal behavior would be when launching the server in docker to pass in the option -e WORKINGDIR=$PWD to pass the PWD as the WORKINGDIR environment variable to then be used when spinning up the GoBuster container to correctly reference the wordlist.
Drawbacks
I don't know Rust or I'd do it myself. Please don't hate me. We can still be friends.
thanks for raising @blaisebits ! will take a look soon as i can here, i currently have robopages built from source and did a quick test, replacing:
volumes:
- $WORKINGDIR/data:/data
for:
volumes:
- ${cwd}:/data
.. inyour robopage seems to currently work as intended
robopages run --function gobuster_directory_brute_force
>> enter value for argument 'target': http://localhost:8080
[2025-05-27T19:22:34Z WARN ] executing: /usr/local/bin/docker run --rm -v/Users/ads/.robopages/robopages-main/cybersecurity/offensive/information-gathering:/data --net=host ghcr.io/oj/gobuster:latest dir -t 20 --no-color --quiet --no-progress -w /data/wordlists/web/quickhits.txt -z --no-color -b 404,403 -u http://localhost:8080
>> enter 'y' to proceed or any other key to cancel: y
lemme test a docker environment, to confirm are you using the latest build from ~25 days ago, not the prior? tyia!
I did also pull the latest container as the previous test was on an older version. I tested again with the robopages run through a wrapper to execute everything in docker:
The command run showed the variable wasn't subbed in and returns an error about the volume name
$ ./robopages-cli.sh -V
robopages 0.4.0
$ ./robopages-cli.sh run --function gobuster_directory_brute_force
>> enter value for argument 'target': http://localhost:8080
[2025-06-01T02:27:21Z WARN ] executing: /usr/bin/docker run --rm -v$WORKINGDIR/data:/data --net=host ghcr.io/oj/gobuster:latest dir -t 20 --no-color --quiet --no-progress -w /data/wordlists/web/quickhits.txt -z --no-color -b 404,403 -u http://localhost:8080
>> enter 'y' to proceed or any other key to cancel: y
[2025-06-01T02:27:24Z WARN ] command failed with exit code: exit status: 125
[2025-06-01T02:27:24Z ERROR] command stderr (failure): docker: Error response from daemon: create $WORKINGDIR/data: "$WORKINGDIR/data" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path
Activity
GangGreenTemperTatum commentedon May 27, 2025
thanks for raising @blaisebits ! will take a look soon as i can here, i currently have robopages built from source and did a quick test, replacing:
volumes: - $WORKINGDIR/data:/datafor:
volumes: - ${cwd}:/data.. inyour robopage seems to currently work as intended
lemme test a docker environment, to confirm are you using the latest build from ~25 days ago, not the prior? tyia!
blaisebits commentedon Jun 1, 2025
Thanks for the check @GangGreenTemperTatum
I did also pull the latest container as the previous test was on an older version. I tested again with the
robopages runthrough a wrapper to execute everything in docker:The command run showed the variable wasn't subbed in and returns an error about the volume name