i'm trying to create an app android to run nmap commands from terminal and shows the result in the app
I am trying to run this line of code:
try {
Process p = Runtime.getRuntime().exec("nmap ");
BufferedReader inputStream = new BufferedReader(new InputStreamReader(p.getInputStream()));
String s;
// reading output stream of the command
while ((s = inputStream.readLine()) != null) {
Log.d("res", s);
}
} catch (Exception e) {
e.printStackTrace();
}
W/System.err: java.io.IOException: Cannot run program "nmap": error=13, Permission denied