[Android Apps and Games] 6d21otb:
OK I could narrow the problem down a bit. I installed eclipse with the ADT plugin and set up the project and added some debugging logcat outputs.

In Tool.java I changed:

public Thread async( String args, OutputReceiver receiver ) {
String cmd = null;

if( mAppContext != null )
if( mCustomLibs )
cmd = "LD_LIBRARY_PATH=" + mLibPath + ":$LD_LIBRARY_PATH && cd " + mDirName + " && ./" + mName + " " + args;
else
cmd = "cd " + mDirName + " && ./" + mName + " " + args;
else
cmd = mName + " " + args;

return Shell.async( cmd, receiver );
}

to

public Thread async( String args, OutputReceiver receiver ) {
String cmd = null;

if( mAppContext != null ) {
if( mCustomLibs ) {
cmd = "LD_LIBRARY_PATH=" + mLibPath + ":$LD_LIBRARY_PATH && cd " + mDirName + " && ./" + mName + " " + args;
Log.d(TAG + " cmd:", cmd);
} else {
cmd = "cd " + mDirName + " && ./" + mName + " " + args;
Log.d(TAG + " cmd:", cmd);
}
} else {
cmd = mName + " " + args;
Log.d(TAG + " cmd:", cmd);
}

return Shell.async( cmd, receiver );
}

..and in NMap.java I changed this:

public void onNewLine( String line ) {
Matcher matcher;

if( ( matcher = IP_PATTERN.matcher( line ) ) != null && matcher.find() )
...

to

public void onNewLine( String line ) {
Matcher matcher;

Log.d(TAG, line);

if( ( matcher = IP_PATTERN.matcher( line ) ) != null && matcher.find() )
...

And what I now get in logcat is this:

D/Tool cmd:(13064): LD_LIBRARY_PATH=/data/data/it.evilsocket.dsploit/files/tools/libs:$LD_LIBRARY_PATH && cd /data/data/it.evilsocket.dsploit/files/tools/nmap && ./nmap --max-retries 1 --max-rtt-timeout 250ms -sn -n -T4 --system-dns 192.168.0.232/29
E/su (13345): sudb - Opening database
I/ActivityManager( 153): Process com.codingcaveman.SoloTrial (pid 13081) has died.
E/su (13345): sudb - Database opened
E/su (13345): sudb - Database closed
D/su (13345): 10058 it.evilsocket.dsploit executing 0 /system/bin/sh using shell /system/bin/sh : sh
D/NMAP (13064): link_image[1966]: 13347 could not load needed library 'libpcap.so' for './nmap' (load_library[1108]: Library 'libpcap.so' not found)CANNOT LINK EXECUTABLE
D/NMAP (13064): À€
D/Tool cmd:(13064): LD_LIBRARY_PATH=/data/data/it.evilsocket.dsploit/files/tools/libs:$LD_LIBRARY_PATH && cd /data/data/it.evilsocket.dsploit/files/tools/nmap && ./nmap --max-retries 1 --max-rtt-timeout 250ms -sn -n -T4 --system-dns 192.168.0.232/29
E/su (13349): sudb - Opening database
E/su (13349): sudb - Database opened
E/su (13349): sudb - Database closed
D/su (13349): 10058 it.evilsocket.dsploit executing 0 /system/bin/sh using shell /system/bin/sh : sh
D/NMAP (13064): link_image[1966]: 13351 could not load needed library 'libpcap.so' for './nmap' (load_library[1108]: Library 'libpcap.so' not found)CANNOT LINK EXECUTABLE
D/NMAP (13064): À€
D/Tool cmd:(13064): LD_LIBRARY_PATH=/data/data/it.evilsocket.dsploit/files/tools/libs:$LD_LIBRARY_PATH && cd /data/data/it.evilsocket.dsploit/files/tools/nmap && ./nmap --max-retries 1 --max-rtt-timeout 250ms -sn -n -T4 --system-dns 192.168.0.232/29
E/su (13353): sudb - Opening database
E/su (13353): sudb - Database opened
E/su (13353): sudb - Database closed
D/su (13353): 10058 it.evilsocket.dsploit executing 0 /system/bin/sh using shell /system/bin/sh : sh
D/NMAP (13064): link_image[1966]: 13355 could not load needed library 'libpcap.so' for './nmap' (load_library[1108]: Library 'libpcap.so' not found)CANNOT LINK EXECUTABLE
D/NMAP (13064): À€
D/Tool cmd:(13064): LD_LIBRARY_PATH=/data/data/it.evilsocket.dsploit/files/tools/libs:$LD_LIBRARY_PATH && cd /data/data/it.evilsocket.dsploit/files/tools/nmap && ./nmap --max-retries 1 --max-rtt-timeout 250ms -sn -n -T4 --system-dns 192.168.0.232/29
D/UPDATESERVICE(13064): Service stopped.
E/su (13357): sudb - Opening database
E/su (13357): sudb - Database opened
E/su (13357): sudb - Database closed
D/su (13357): 10058 it.evilsocket.dsploit executing 0 /system/bin/sh using shell /system/bin/sh : sh
D/NMAP (13064): link_image[1966]: 13359 could not load needed library 'libpcap.so' for './nmap' (load_library[1108]: Library 'libpcap.so' not found)CANNOT LINK EXECUTABLE
D/NMAP (13064): À€
D/Tool cmd:(13064): LD_LIBRARY_PATH=/data/data/it.evilsocket.dsploit/files/tools/libs:$LD_LIBRARY_PATH && cd /data/data/it.evilsocket.dsploit/files/tools/nmap && ./nmap --max-retries 1 --max-rtt-timeout 250ms -sn -n -T4 --system-dns 192.168.0.232/29
E/su (13361): sudb - Opening database
E/su (13361): sudb - Database opened
E/su (13361): sudb - Database closed
D/su (13361): 10058 it.evilsocket.dsploit executing 0 /system/bin/sh using shell /system/bin/sh : sh
D/NMAP (13064): link_image[1966]: 13363 could not load needed library 'libpcap.so' for './nmap' (load_library[1108]: Library 'libpcap.so' not found)CANNOT LINK EXECUTABLE
D/NMAP (13064): À€
D/Tool cmd:(13064): LD_LIBRARY_PATH=/data/data/it.evilsocket.dsploit/files/tools/libs:$LD_LIBRARY_PATH && cd /data/data/it.evilsocket.dsploit/files/tools/nmap && ./nmap --max-retries 1 --max-rtt-timeout 250ms -sn -n -T4 --system-dns 192.168.0.232/29
E/su (13365): sudb - Opening database
E/su (13365): sudb - Database opened
E/su (13365): sudb - Database closed
D/su (13365): 10058 it.evilsocket.dsploit executing 0 /system/bin/sh using shell /system/bin/sh : sh
D/NMAP (13064): link_image[1966]: 13367 could not load needed library 'libpcap.so' for './nmap' (load_library[1108]: Library 'libpcap.so' not found)CANNOT LINK EXECUTABLE
D/NMAP (13064): À€
D/Tool cmd:(13064): LD_LIBRARY_PATH=/data/data/it.evilsocket.dsploit/files/tools/libs:$LD_LIBRARY_PATH && cd /data/data/it.evilsocket.dsploit/files/tools/nmap && ./nmap --max-retries 1 --max-rtt-timeout 250ms -sn -n -T4 --system-dns 192.168.0.232/29
E/su (13369): sudb - Opening database
E/su (13369): sudb - Database opened
E/su (13369): sudb - Database closed
D/su (13369): 10058 it.evilsocket.dsploit executing 0 /system/bin/sh using shell /system/bin/sh : sh
D/NMAP (13064): link_image[1966]: 13371 could not load needed library 'libpcap.so' for './nmap' (load_library[1108]: Library 'libpcap.so' not found)CANNOT LINK EXECUTABLE
D/NMAP (13064): À€
D/Tool cmd:(13064): LD_LIBRARY_PATH=/data/data/it.evilsocket.dsploit/files/tools/libs:$LD_LIBRARY_PATH && cd /data/data/it.evilsocket.dsploit/files/tools/nmap && ./nmap --max-retries 1 --max-rtt-timeout 250ms -sn -n -T4 --system-dns 192.168.0.232/29
E/su (13373): sudb - Opening database
E/su (13373): sudb - Database opened
E/su (13373): sudb - Database closed
D/su (13373): 10058 it.evilsocket.dsploit executing 0 /system/bin/sh using shell /system/bin/sh : sh
D/NMAP (13064): link_image[1966]: 13375 could not load needed library 'libpcap.so' for './nmap' (load_library[1108]: Library 'libpcap.so' not found)CANNOT LINK EXECUTABLE
D/NMAP (13064): À€
D/Tool cmd:(13064): LD_LIBRARY_PATH=/data/data/it.evilsocket.dsploit/files/tools/libs:$LD_LIBRARY_PATH && cd /data/data/it.evilsocket.dsploit/files/tools/nmap && ./nmap --max-retries 1 --max-rtt-timeout 250ms -sn -n -T4 --system-dns 192.168.0.232/29
E/su (13377): sudb - Opening database
E/su (13377): sudb - Database opened
E/su (13377): sudb - Database closed
D/su (13377): 10058 it.evilsocket.dsploit executing 0 /system/bin/sh using shell /system/bin/sh : sh
D/NMAP (13064): link_image[1966]: 13379 could not load needed library 'libpcap.so' for './nmap' (load_library[1108]: Library 'libpcap.so' not found)CANNOT LINK EXECUTABLE
D/NMAP (13064): À€
...

The weird thing is that when I run the exact same cmd:

LD_LIBRARY_PATH=/data/data/it.evilsocket.dsploit/files/tools/libs:$LD_LIBRARY_PATH && cd /data/data/it.evilsocket.dsploit/files/tools/nmap && ./nmap --max-retries 1 --max-rtt-timeout 250ms -sn -n -T4 --system-dns 192.168.0.232/29

manually in the adb shell then I get the correct nmap output with 4 discovered hosts as posted above...! :eek:

You have any idea why it possibly cannot load the needed lib correctly from the app?

thx