i perl script that reads the network traffic and prints out payloads of packets of specific length back onto the terminal. and for this to happen, the script should be initiated by root or else the packets will not be read.
i am using pcap in perl for that purpose.
now i have a webpage on my webserver. can i execute that perl script from my webpage and get the output that is being printed on the terminal into my webpage?
i am trying to use javascript to serve this purpose but i dont know how its done.
i tried googling it and all i got was ssh user@remote "perl pathto/perlfile.pl"
can someone help me out with this please?