Hi All,
This question might have been asked and answered in different ways, but I still cannot get what I need.
We have a script that ssh to a server to run 'fw sam' commands to block IPs.
The scripts looks like this:
spawn ssh -o "StrictHostKeyChecking no" $USERNAME@$FIREWALL
expect "*assword: "
send "$PASSWORD\r"
expect $multiPrompt
send "mdsenv PROD_FW\r"
expect $multiPrompt
send "fw sam -t $TIME -e name=\"NOT_IN Block\" -e comment=\"$FLAG\" -J src $ATTACKER\r"
exit
exit
What I would like to know is if it is possible to convert that script to Web Services API calls
with something like web_api/login, web_api/sam_command, web_api/logout or something similar.
The other answers for /put-file and /run-script dont tell me much if it will work the same as the above code.
Thanks in advance.