How to execute Bro using Java Runtime

130 Views Asked by At

On Ubuntu 14.04:

I would like to execute Bro using the Jave Runtime as follows:

String[] command = {"gksudo", "bro -r ../../pcaps/test1.pcap"};
process = Runtime.getRuntime().exec(c);

Where the bro commands are correct and the path to the pcap is relative from the source of my java project.

I used gksudo to have sudo privileges, but nothing happens. There are no log-files created.

Other commands (like mkdir) work and provides me of the right results, however with Bro it does not.

It appears that gksudo cannot initiate Bro because it is not actually a root user.

How can I bypass this?

0

There are 0 best solutions below