com.wjholden.nmap
Class Nmap

java.lang.Object
  extended by Activity
      extended by com.wjholden.nmap.Nmap
All Implemented Interfaces:
Nmap_Constants

public class Nmap
extends Activity
implements Nmap_Constants

Version:
0.4.1 Nmap for Android! The original versions used Nmap binaries I got from Robert McCurdy (http://rmccurdy.com/stuff/G1/BINS/NMAP/). Around v0.3 or Vlatko Kosturjak build newer binaries based on Nmap 5.3 (http://ftp.linux.hr/android/nmap/). TODO: Finish Wifi check, (DONE)build options menu to toggle logcat on, and finish JavaDoc. Also, create logic to conditionally execute verifyInstallation() - your users will love you.
Author:
William John Holden (wjholden@gmail.com)

Field Summary
static String bindir
          this is where the nmap/nping/ncat compiled binaries should be (usually /data/local/bin/)
static boolean canGetRoot
          tells us if "su" command is available
static boolean DEBUG
           
static Handler h
          handler for inter-thread communcation
static boolean hasRunOneScan
          tells us whether one or more scans have been executed
static boolean installationVerified
          if "verifyInstallation()" method has run this should be set to true TODO: save this in SharedPreferences and stop reinstalling the binaries every time!
static NmapError ne
           
static String outputArgs
          the command to be executed (nmap, nping, ncat) and optional (and mandatory) command line arguments from mArguments
static ProgressDialog pd
           
static int scanType
          tells the scanning engine what command is to be executed (nmap, nping, ncat)
static String sh
          location of the 'su' command, if present, otherwise 'sh'.
 
Fields inherited from interface com.wjholden.nmap.Nmap_Constants
INSTALL_ERROR, INSTALL_GOOD, INSTALL_NO_ROOT, MENU_GROUP_DEBUG, MENU_ITEM_DEBUG_EMAIL, MENU_ITEM_DEBUG_ENABLE, RUN_COMPLETE, RUN_ERROR, RUN_LINE, SCANTYPE_NCAT, SCANTYPE_NDIFF, SCANTYPE_NMAP, SCANTYPE_NPING, TAG, THREAD_ERROR
 
Constructor Summary
Nmap()
           
 
Method Summary
 void onCreate(Bundle savedInstanceState)
           
protected  void onDestroy()
           
 boolean onMenuItemSelected(int featureId, MenuItem item)
           
protected  void onPause(Bundle outState)
           
 boolean onPrepareOptionsMenu(Menu menu)
           
protected  void onResume(Bundle savedInstanceState)
           
static void setBinDir(String b)
           
static void setSh(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bindir

public static String bindir
this is where the nmap/nping/ncat compiled binaries should be (usually /data/local/bin/)


canGetRoot

public static boolean canGetRoot
tells us if "su" command is available


DEBUG

public static boolean DEBUG

h

public static Handler h
handler for inter-thread communcation


hasRunOneScan

public static boolean hasRunOneScan
tells us whether one or more scans have been executed


installationVerified

public static boolean installationVerified
if "verifyInstallation()" method has run this should be set to true TODO: save this in SharedPreferences and stop reinstalling the binaries every time!


ne

public static NmapError ne

outputArgs

public static String outputArgs
the command to be executed (nmap, nping, ncat) and optional (and mandatory) command line arguments from mArguments


pd

public static ProgressDialog pd

scanType

public static int scanType
tells the scanning engine what command is to be executed (nmap, nping, ncat)


sh

public static String sh
location of the 'su' command, if present, otherwise 'sh'.

Constructor Detail

Nmap

public Nmap()
Method Detail

onCreate

public void onCreate(Bundle savedInstanceState)

onDestroy

protected void onDestroy()

onMenuItemSelected

public boolean onMenuItemSelected(int featureId,
                                  MenuItem item)

onPause

protected void onPause(Bundle outState)

onPrepareOptionsMenu

public boolean onPrepareOptionsMenu(Menu menu)

onResume

protected void onResume(Bundle savedInstanceState)

setBinDir

public static void setBinDir(String b)

setSh

public static void setSh(String s)