Skip to main content
2 of 3
acknowledging Jander's comment about injection
Stephen
  • 155
  • 2

choroba is correct.

Though if this were some sort of riddle, I'd respond with this:

cat << EOF | sh
> echo 'visit:$site'
> EOF

As jander points out this is wide open for an injection attack. It wasn't a serious answer, so if anyone was considering using something like this, don't use it with untrusted input. For example, validate the $site string as being a valid URL before blindly executing the content. Something like this could help (but the expression provided isn't perfect because it still allows injection, but use that sort of mechanic to test it).

Stephen
  • 155
  • 2