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

Method setHostname

cSploit/src/org/csploit/android/net/Target.java:604–618  ·  view source on GitHub ↗
(String hostname, int port)

Source from the content-addressed store, hash-verified

602 }
603
604 public void setHostname(String hostname, int port){
605 mHostname = hostname;
606 mPort = port;
607 mType = Type.REMOTE;
608
609 try{
610 // This is needed to avoid NetworkOnMainThreadException
611 StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
612 StrictMode.setThreadPolicy(policy);
613
614 mAddress = InetAddress.getByName(mHostname);
615 } catch(Exception e){
616 Logger.debug(e.toString());
617 }
618 }
619
620 public void setConneced(boolean conneced) {
621 mConnected = conneced;

Callers 1

TargetMethod · 0.95

Calls 2

debugMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected