|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Activity com.wjholden.nmap.NmapMain
public class NmapMain
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/).
Field Summary | |
---|---|
static boolean |
debug
This variable is set by the user with the context menu. |
private boolean |
deletePreferences
After reinstalling binaries, wipe the preferences. |
static Handler |
handler
handler for inter-thread communication |
static boolean |
hasRunOneScan
tells us whether one or more scans have been executed |
private |
installTask
verify installation thread |
static boolean |
installVerified
if "VerifyInstallation()" method has run this should be set to true |
private EditText |
mArguments
Input area where command-line arguments (other than target IP) |
private Spinner |
mCommandSpinner
Command spinner switches between Nmap, Nping, and Ncat |
private Button |
mHelp
Help button, shows result of [command] --help |
private Spinner |
mOutputSpinner
Switches between Nmap, XML, and Grepable Nmap output |
private TextView |
mResults
Text area where results are shown. TODO: looks like Intent ACTION_VIEW has a neat feature to view a URL - would it be possible to create a URL based on a String, then view this value in fullscreen? |
private Button |
mShare
Share button, launches Compose Email activity with message body of any data in mResults |
private Button |
mStart
Start button initiates scan |
private Button |
mSubnet
Launch NmapSubnet activity. |
private EditText |
mTarget
Input area where user supplies scan target |
private java.lang.String |
outputGrep
Instead of keeping old output on the filesystem, read it in and out as a String kept in memory. |
private java.lang.String |
outputNmap
Instead of keeping old output on the filesystem, read it in and out as a String kept in memory. |
private java.lang.String |
outputXml
Instead of keeping old output on the filesystem, read it in and out as a String kept in memory. |
static ProgressDialog |
progressDialog
Static so that the other classes can turn it off after it runs. |
private |
scanTask
scanning engine thread |
static int |
scanType
tells the scanning engine what command is to be executed (nmap, nping, ncat) |
private SharedPreferences |
settings
Store both user and application settings in here. |
private NmapWifi |
wifi
Instance of thread where NmapWifi executes. |
Fields inherited from interface com.wjholden.nmap.NmapConstants |
---|
BUFFER_SIZE, FORCE_RESTART, INSTALL_ERROR, INSTALL_FILENAMES, INSTALL_GOOD, INSTALL_NO_ROOT, INSTALL_RESOURCES, MG_DEBUG, MG_DEFAULT, MG_SUBNET, MI_BIN, MI_DEBUG_EMAIL, MI_DEBUG_ENABLE, MI_DEC, MI_EMAIL_SUBNET, MI_EXIT, MI_HEX, MI_MORE_HELP, MI_REINSTALL, MI_SUBNET, MI_SURVEY, RUN_COMPLETE, RUN_ERROR, RUN_SUCCESS_NO_FILE, SCANTYPE_NCAT, SCANTYPE_NDIFF, SCANTYPE_NMAP_5_30, SCANTYPE_NMAP_5_50, SCANTYPE_NPING, SET_TITLE, SUBNET_CONNECTED, SUBNET_DISCONNECTED, SUBNET_POLL_INTERVAL, TAG, THREAD_ERROR |
Constructor Summary | |
---|---|
NmapMain()
|
Method Summary | |
---|---|
private void |
forceRestart()
Added 0.4.7. |
private void |
initButtons()
AFTER initScreen() has been called, assign callbacks to buttons. |
private void |
initHandler()
Initializes the handler. |
private void |
initScreen()
Maps the buttons, text areas, and spinners to program variables. |
private void |
initSpinners()
Initializes the spinners. |
private void |
initVariables()
Use the Settings object to grab program variables from XML and set them appropriately. |
void |
onCreate(Bundle bundle)
|
protected void |
onDestroy()
|
boolean |
onMenuItemSelected(int featureId,
MenuItem item)
|
protected void |
onPause(Bundle outState)
|
boolean |
onPrepareOptionsMenu(Menu menu)
|
protected void |
onResume(Bundle bundle)
|
protected void |
onStop()
|
private void |
saveUserEntry()
Saves user preferences using the SharedPreferences.Editor object. |
private void |
showApkInfo()
Print program version and SDK version to log. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean debug
private boolean deletePreferences
public static Handler handler
public static boolean hasRunOneScan
private transientinstallTask
public static boolean installVerified
private transient EditText mArguments
private transient Spinner mCommandSpinner
private transient Button mHelp
private transient Spinner mOutputSpinner
private transient TextView mResults
private transient Button mShare
private transient Button mStart
private transient Button mSubnet
private transient EditText mTarget
private transient java.lang.String outputGrep
private transient java.lang.String outputNmap
private transient java.lang.String outputXml
public static ProgressDialog progressDialog
private transientscanTask
public static int scanType
private transient SharedPreferences settings
private transient NmapWifi wifi
Constructor Detail |
---|
public NmapMain()
Method Detail |
---|
private void forceRestart()
private void initButtons()
private void initHandler()
private void initScreen()
private void initSpinners()
private void initVariables()
public void onCreate(Bundle bundle)
protected void onDestroy()
public boolean onMenuItemSelected(int featureId, MenuItem item)
protected void onPause(Bundle outState)
public boolean onPrepareOptionsMenu(Menu menu)
protected void onResume(Bundle bundle)
protected void onStop()
private void saveUserEntry()
private void showApkInfo()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |