| 58 | } |
| 59 | |
| 60 | public static abstract class SynScanReceiver extends Child.EventReceiver |
| 61 | { |
| 62 | |
| 63 | public void onEnd( int exitCode ) { |
| 64 | if( exitCode != 0 ) |
| 65 | Logger.error( "nmap exited with code " + exitCode ); |
| 66 | } |
| 67 | |
| 68 | public void onDeath(int signal) { |
| 69 | Logger.error("nmap killed by signal " + signal); |
| 70 | } |
| 71 | |
| 72 | public void onEvent( Event e) { |
| 73 | if(e instanceof Port) { |
| 74 | Port p = (Port)e; |
| 75 | onPortFound(p.port, p.protocol); |
| 76 | } else { |
| 77 | Logger.error("unkown event: " + e); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | public abstract void onPortFound( int port, String protocol ); |
| 82 | } |
| 83 | |
| 84 | public static abstract class InspectionReceiver extends Child.EventReceiver |
| 85 | { |
nothing calls this directly
no outgoing calls
no test coverage detected