Nmap Development mailing list archives
Nmap on Android
From: Vlatko Kosturjak <kost () linux hr>
Date: Wed, 30 Jun 2010 16:19:10 +0200
Hello! I've just successfully cross compiled nmap 5.30beta1 for Android as I did not see any version for android newer than 4.0. If you're inpatient, here's the link to the version: http://ftp.linux.hr/android/nmap/nmap-5.30BETA1-android-bin.tar.bz2 Extract tar.bz2 arhchive to /sd-ext/opt/ directory. Note that: * it is for rooted phone (i guess everyone who have android on this list have already done that :) * tested on G1 (cyagenomod) * it is not compiled with openssl * sometimes there's no output due to davlik's stdout/stderr handling, use -oA and --log-errors options ALWAYS when starting scan - and even calling something like --iflist (anyone aware how can this be fixed?) Now, the issues fixed by this patch (against SVN trunk): ======================================================== liblua have localization issue when using Android NDK, so, I have added -DBIONIC #define to get rid of problematic function to get decimal delimiter. newly rewritten traceroute.cc in 5.10BETA uses <bitset> which have problems with Android NDK, so, I have added -DNOBITSET #define which implements similar functionality in very basic and portable way. libdnet-stripped doesn't have AF_LINK wrappers all around, just sporadically. Had to make AF_LINK wrappers everywhere where AF_LINK is used. Issues not fixed by this patch and TODO: ========================================= g++ links without -lstdc++, had to add -lstdc++ to the link command line. when cross compiling and using --with-libpcap=internal and --with-pcap=linux to nmap's ./configure, for some reason pcap doesn't define -Dlinux, so had to add manually after ./configure ./configure --with-liblua have problems with cross compiling as it tries to force version check when cross compiling. I think it should just give warning that it cannot check for LUA version and let the user cross compile it - not throw exit(1). configure which automatically configures for android, i.e. if android is found, do the following(basic example): #define ANDROID #ifdef ANDROID #define NOBITSET /* for traceroute */ #define BIONIC /* for liblua */ #endif compile with openssl I did not dig too much into configure and other mentioned minor stuff as I'm not sure how much there is interest in having this in nmap codebase/repo and I could fix it with just issuing same command with different defines to compiler in order to have it compiled. Let me know your comments... .... or if you like it, feel free to buy me a beer at upcoming BlackHat and/or Defcon ;) Kost
Attachment:
nmap-android-fixes.diff
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Nmap on Android Vlatko Kosturjak (Jun 30)