etter.conf ファイルの 168 行目のコメントを外したいと思います。コマンドはターミナルでは正常に実行されますが、perl で試しているときにエラーが発生します。
system ("sed -i '168s/.*/redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"/' /etc/etter.conf");
エラーは次のとおりです。
Bareword found where operator expected at ./attack.pl line 135, near
""sed -i '168s'/.*'/redir_command_on = "iptables"
特殊文字とエスケープに関係があると思います。