| 35 | public class NMap extends Tool { |
| 36 | |
| 37 | public static abstract class TraceReceiver extends Child.EventReceiver |
| 38 | { |
| 39 | public void onEnd( int exitCode ) { |
| 40 | if( exitCode != 0 ) |
| 41 | Logger.error("nmap exited with code " + exitCode ); |
| 42 | } |
| 43 | |
| 44 | public void onDeath( int signal ) { |
| 45 | Logger.error("nmap killed by signal " + signal); |
| 46 | } |
| 47 | |
| 48 | public void onEvent(Event e) { |
| 49 | if(e instanceof Hop) { |
| 50 | Hop hop = (Hop)e; |
| 51 | onHop(hop.hop, hop.usec, hop.node.getHostAddress(), hop.name); |
| 52 | } else { |
| 53 | Logger.error("unknown event: " + e); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | public abstract void onHop( int hop, long usec, String address, String name ); |
| 58 | } |
| 59 | |
| 60 | public static abstract class SynScanReceiver extends Child.EventReceiver |
| 61 | { |
nothing calls this directly
no outgoing calls
no test coverage detected