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

Method dnsSpoof

cSploit/src/org/csploit/android/tools/Ettercap.java:113–140  ·  view source on GitHub ↗
(Target target, OnDNSSpoofedReceiver listener)

Source from the content-addressed store, hash-verified

111 }
112
113 public Child dnsSpoof(Target target, OnDNSSpoofedReceiver listener) throws ChildManager.ChildNotStartedException {
114 StringBuilder sb = new StringBuilder();
115
116 sb.append("-Tq -P dns_spoof -i ");
117
118 try {
119 sb.append(System.getNetwork().getInterface().getDisplayName());
120 } catch (Exception e) {
121 System.errorLogging(e);
122 throw new ChildManager.ChildNotStartedException();
123 }
124
125 // poison the entire network
126 if(target.getType() == Target.Type.NETWORK) {
127 sb.append(" /// ///");
128 // router -> target poison
129 }
130 else {
131 sb.append(" /");
132 sb.append(target.getCommandLineRepresentation());
133 sb.append("// ");
134 sb.append(" ///");
135 }
136
137 //sb.append(" 1>&2 ");
138
139 return super.async(sb.toString(), listener);
140 }
141}

Callers 1

startMethod · 0.80

Calls 8

getNetworkMethod · 0.95
errorLoggingMethod · 0.95
appendMethod · 0.80
getInterfaceMethod · 0.80
getTypeMethod · 0.45
asyncMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected