From d69fe3927831c0a74da6d31f25260efa147e3998 Mon Sep 17 00:00:00 2001 From: snoop Date: Tue, 24 Apr 2018 19:46:39 +0900 Subject: [PATCH] Fixed discovery and targetDiscovery --- .../model/discovery/DiscoverHost.java | 42 +++++++++++++- .../model/discovery/DiscoverPort.java | 48 +++++++++++++++ .../model/discovery/DiscoverService.java | 8 +++ .../model/discovery/DiscoverZone.java | 16 +++++ .../loafle/overflow/model/discovery/Host.java | 58 +++++++++++++++++++ .../loafle/overflow/model/discovery/Port.java | 50 ++++++++++++++++ .../overflow/model/discovery/Service.java | 50 ++++++++++++++++ 7 files changed, 271 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/loafle/overflow/model/discovery/DiscoverHost.java b/src/main/java/com/loafle/overflow/model/discovery/DiscoverHost.java index 3989085..d96e6c7 100644 --- a/src/main/java/com/loafle/overflow/model/discovery/DiscoverHost.java +++ b/src/main/java/com/loafle/overflow/model/discovery/DiscoverHost.java @@ -9,5 +9,45 @@ public class DiscoverHost { private String[] excludeHosts; private String[] includeHosts; - private DiscoverPort discoverPort; + private DiscoverPort discoverPort; + + public String getFirstScanRange() { + return firstScanRange; + } + + public void setFirstScanRange(String firstScanRange) { + this.firstScanRange = firstScanRange; + } + + public String getLastScanRange() { + return lastScanRange; + } + + public void setLastScanRange(String lastScanRange) { + this.lastScanRange = lastScanRange; + } + + public String[] getExcludeHosts() { + return excludeHosts; + } + + public void setExcludeHosts(String[] excludeHosts) { + this.excludeHosts = excludeHosts; + } + + public String[] getIncludeHosts() { + return includeHosts; + } + + public void setIncludeHosts(String[] includeHosts) { + this.includeHosts = includeHosts; + } + + public DiscoverPort getDiscoverPort() { + return discoverPort; + } + + public void setDiscoverPort(DiscoverPort discoverPort) { + this.discoverPort = discoverPort; + } } diff --git a/src/main/java/com/loafle/overflow/model/discovery/DiscoverPort.java b/src/main/java/com/loafle/overflow/model/discovery/DiscoverPort.java index 933fe4d..03f460f 100644 --- a/src/main/java/com/loafle/overflow/model/discovery/DiscoverPort.java +++ b/src/main/java/com/loafle/overflow/model/discovery/DiscoverPort.java @@ -12,4 +12,52 @@ public class DiscoverPort { private boolean includeUDP; private DiscoverService discoverService; + + public int getFirstScanRange() { + return firstScanRange; + } + + public void setFirstScanRange(int firstScanRange) { + this.firstScanRange = firstScanRange; + } + + public int getLastScanRange() { + return lastScanRange; + } + + public void setLastScanRange(int lastScanRange) { + this.lastScanRange = lastScanRange; + } + + public int[] getExcludePorts() { + return excludePorts; + } + + public void setExcludePorts(int[] excludePorts) { + this.excludePorts = excludePorts; + } + + public boolean isIncludeTCP() { + return includeTCP; + } + + public void setIncludeTCP(boolean includeTCP) { + this.includeTCP = includeTCP; + } + + public boolean isIncludeUDP() { + return includeUDP; + } + + public void setIncludeUDP(boolean includeUDP) { + this.includeUDP = includeUDP; + } + + public DiscoverService getDiscoverService() { + return discoverService; + } + + public void setDiscoverService(DiscoverService discoverService) { + this.discoverService = discoverService; + } } \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/model/discovery/DiscoverService.java b/src/main/java/com/loafle/overflow/model/discovery/DiscoverService.java index b20201c..f1886af 100644 --- a/src/main/java/com/loafle/overflow/model/discovery/DiscoverService.java +++ b/src/main/java/com/loafle/overflow/model/discovery/DiscoverService.java @@ -5,4 +5,12 @@ package com.loafle.overflow.model.discovery; */ public class DiscoverService { private String[] includeServices; + + public String[] getIncludeServices() { + return includeServices; + } + + public void setIncludeServices(String[] includeServices) { + this.includeServices = includeServices; + } } \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/model/discovery/DiscoverZone.java b/src/main/java/com/loafle/overflow/model/discovery/DiscoverZone.java index 5fcb755..dc3980e 100644 --- a/src/main/java/com/loafle/overflow/model/discovery/DiscoverZone.java +++ b/src/main/java/com/loafle/overflow/model/discovery/DiscoverZone.java @@ -6,4 +6,20 @@ package com.loafle.overflow.model.discovery; public class DiscoverZone { private String[] excludePatterns; private DiscoverHost discoverHost; + + public String[] getExcludePatterns() { + return excludePatterns; + } + + public void setExcludePatterns(String[] excludePatterns) { + this.excludePatterns = excludePatterns; + } + + public DiscoverHost getDiscoverHost() { + return discoverHost; + } + + public void setDiscoverHost(DiscoverHost discoverHost) { + this.discoverHost = discoverHost; + } } \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/model/discovery/Host.java b/src/main/java/com/loafle/overflow/model/discovery/Host.java index e9574e7..636968d 100644 --- a/src/main/java/com/loafle/overflow/model/discovery/Host.java +++ b/src/main/java/com/loafle/overflow/model/discovery/Host.java @@ -17,4 +17,62 @@ public class Host { private Zone zone; + private boolean target; + + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getMac() { + return mac; + } + + public void setMac(String mac) { + this.mac = mac; + } + + public String getOs() { + return os; + } + + public void setOs(String os) { + this.os = os; + } + + public Date getDiscoveredDate() { + return discoveredDate; + } + + public void setDiscoveredDate(Date discoveredDate) { + this.discoveredDate = discoveredDate; + } + + public Zone getZone() { + return zone; + } + + public void setZone(Zone zone) { + this.zone = zone; + } + + public boolean isTarget() { + return target; + } + + public void setTarget(boolean target) { + this.target = target; + } } diff --git a/src/main/java/com/loafle/overflow/model/discovery/Port.java b/src/main/java/com/loafle/overflow/model/discovery/Port.java index 38808da..92c7813 100644 --- a/src/main/java/com/loafle/overflow/model/discovery/Port.java +++ b/src/main/java/com/loafle/overflow/model/discovery/Port.java @@ -16,4 +16,54 @@ public class Port { private Date discoveredDate; private Host host; + + private boolean target; + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public PortType getPortType() { + return portType; + } + + public void setPortType(PortType portType) { + this.portType = portType; + } + + public int getPortNumber() { + return portNumber; + } + + public void setPortNumber(int portNumber) { + this.portNumber = portNumber; + } + + public Date getDiscoveredDate() { + return discoveredDate; + } + + public void setDiscoveredDate(Date discoveredDate) { + this.discoveredDate = discoveredDate; + } + + public Host getHost() { + return host; + } + + public void setHost(Host host) { + this.host = host; + } + + public boolean isTarget() { + return target; + } + + public void setTarget(boolean target) { + this.target = target; + } } diff --git a/src/main/java/com/loafle/overflow/model/discovery/Service.java b/src/main/java/com/loafle/overflow/model/discovery/Service.java index 673f714..f52445e 100644 --- a/src/main/java/com/loafle/overflow/model/discovery/Service.java +++ b/src/main/java/com/loafle/overflow/model/discovery/Service.java @@ -17,4 +17,54 @@ public class Service { private Date discoveredDate; private Port port; + + private boolean target; + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public CryptoType getCryptoType() { + return cryptoType; + } + + public void setCryptoType(CryptoType cryptoType) { + this.cryptoType = cryptoType; + } + + public String getServiceName() { + return serviceName; + } + + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + + public Date getDiscoveredDate() { + return discoveredDate; + } + + public void setDiscoveredDate(Date discoveredDate) { + this.discoveredDate = discoveredDate; + } + + public Port getPort() { + return port; + } + + public void setPort(Port port) { + this.port = port; + } + + public boolean isTarget() { + return target; + } + + public void setTarget(boolean target) { + this.target = target; + } }