Will the following successfully render an alert message, then write the IP Address in $TARGET to the /etc/hosts.deny file? Platform Linux Ubuntu, 12.04. All variables will be passed as arguments.
Code:
Code:
#!/bin/bash
dialog --ascii-lines --infobox "PortSentry Alert: Port Scan Detected.\nPort: ",$PORT,"; Mode: ",$MODE,"; from IP Address ",$TARGET,"\nThe attacker's IP Address has been automatically logged and blacklisted.\n" 5 90
echo $TARGET >> /etc/hosts.deny