CLI Example

Example use with BASH/CLI

Provided by @Doc
#!/bin/bash
if [ "$1" == "" ]
then
  echo -e "\n\nUsage:"
  echo -e "console <command>"
  echo -e "\n\n"
  exit 1
fi
 
HTTPCONSOLE_URL="http://127.0.0.1:8765"
 
function console_command
{
        curl -sS --data-urlencode "command=$*" $HTTPCONSOLE_URL/console
}
 
console_command $*
Alternative Provided by @LukeHandle
HTTPCONSOLE_URL="http://127.0.0.1:8765"

function console_command
{
w3m -dump_source $HTTPCONSOLE_URL/console?command=${*// /%20}
}

console_command "say Hello World"

Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes