I cloned git repository of testssl.sh on my desktop Using the clone, i want to run below command on Linux platform and save the output to a .json file and read the file and save json data to a database.
./testssl.sh -p -s -f -U -S -P --jsonfile-pretty=mxtest.json https://www.google.com
Below is the piece of code i have tried so far
public void test1() throws IOException {
String sURL = "https://www.google.com";
runScript("/testssl.sh -p -s -f -U -S -P --jsonfile-pretty=mxtxt.json "+ sURL);
}
public void runScript(String command) throws IOException {
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(command);
}
Unable command is unable to execute but when i run it is passing.