MCPcopy Index your code
hub / github.com/cSploit/android / getDescription

Method getDescription

cSploit/src/org/csploit/android/net/Target.java:516–537  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

514 }
515
516 public String getDescription(){
517 if(mType == Type.NETWORK)
518 return System.getContext().getString(R.string.network_subnet_mask);
519
520 else if(mType == Type.ENDPOINT){
521 String vendor = System.getMacVendor(mEndpoint.getHardware()),
522 desc = mEndpoint.getHardwareAsString();
523
524 if(vendor != null) desc += " - " + vendor;
525
526 if(mEndpoint.getAddress().equals(System.getNetwork().getGatewayAddress()))
527 desc += "\n" + System.getContext().getString(R.string.gateway_router);
528
529 else if(mEndpoint.getAddress().equals(System.getNetwork().getLocalAddress()))
530 desc += System.getContext().getString(R.string.this_device);
531
532 return desc.trim();
533 } else if(mType == Type.REMOTE)
534 return mAddress.getHostAddress();
535
536 return "";
537 }
538
539 public String getCommandLineRepresentation(){
540 if(mType == Type.NETWORK)

Callers 1

getViewMethod · 0.95

Calls 9

getContextMethod · 0.95
getMacVendorMethod · 0.95
getNetworkMethod · 0.95
getHardwareMethod · 0.80
getHardwareAsStringMethod · 0.80
getLocalAddressMethod · 0.80
equalsMethod · 0.45
getAddressMethod · 0.45
getGatewayAddressMethod · 0.45

Tested by

no test coverage detected