Nmap Development mailing list archives

Re: Nmap On Android


From: William John Holden <wjholden () gmail com>
Date: Sun, 06 Feb 2011 19:30:53 -1000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


- develop official Nmap Android frontend to Nmap binary. In this case
Android GUI would execute Nmap binary and parse results. Maybe John
Holden is willing to donate some of his interface code?

Absolutely: http://nmap.wjholden.com/source.php
Take all, take none - it's all GPL.


Key lessons learned:

 - I never attempted JNI because root is difficult to obtain in Android.

 - Traditional setuid techniques are not reliable.  The easiest, albeit
error-prone, method of obtaining root access is to call 'su' through
Runtime.getRuntime().exec("su").

 - If you decide to bundle binaries with your Android app be aware that
Android (Java?) restricts files in R.res.raw to 1MB. I had to implement
a split-like algorithm to reassemble larger files.

 - I used android.os.AsyncTask for thread management.  Sometimes I
regret that decision and wish I'd stuck with java.lang.Thread.

 - android.os.Handler is surprisingly efficient and easy to use for
inter-thread communication.

 - com.wjholden.nmap supports Android 1.5 and above, but it appears this
is a waste of time as <11% of Android users use API level <4.  See
http://developer.android.com/resources/dashboard/platform-versions.html
and http://nmap.wjholden.com/data.php.  I'm planning to end support for
API <7 in com.wjholden.nmap version 0.5.0.

I was interested in what Jon Svede said about Nmap4J parsing XML.  Don't
have the time or motivation to implement such an interface right now but
it sounds extremely robust.

I'm thrilled to donate code, time, and feedback if there is interest in
an official Nmap.Org Android application.  For months I've made a real
effort to clean up my code, follow best practices, and write effective
JavaDoc.

- -- 
  William John Holden
  http://wjholden.com
  828-919-9576
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNT4ONAAoJEDZSLmOJuTdtTYMH/0x/qX5JwaEwrBlMHcKrN0/G
Rwjg/Bvw34GO1XuT7jh6sbuOM8sPJv7vIa5ULK4f67/j/IxM07RMjCKRRCb/Kz9T
c+paO5HkU1jE4xmSMm7Y3gHY2bzfe4v4gnRyDu/wQK+gXOVlGjOqN5zErwi7cEqn
W7y5q3uGaQ242XbXyhQr+SM6K4Jd/FeOQbGlkplkv8pmwWXKl7McDer2FVHGZHAw
an4iNKuC8FLagUOlvC38hbnvJlHbgdj6KgyfrJxIp9ez9kh72+eXxCGqVVbfyQzW
NhzVwEiamcG+liUSsg/HqE7MpH8Nm/pb2+KWtfWJeeyCXdHmzfy20lVWF06cA7Y=
=jwe7
-----END PGP SIGNATURE-----
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: