From 7754b775cd3dd7dc926c6cf1c6275c2288e15763 Mon Sep 17 00:00:00 2001 From: HuangXin Date: Wed, 23 Sep 2020 14:13:10 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E6=9B=B4=E6=96=B0=E9=9B=86?= =?UTF-8?q?=E4=B8=AD=E6=8A=97D=E6=94=BB=E5=87=BB=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=92=8C=E8=BF=AA=E6=99=AE=E8=AE=BE=E5=A4=87=E6=94=BB=E5=87=BB?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=AF=B9=E5=BA=94=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/dispose/common/DpTechAttackType.java | 31 ++++++------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/dispose/common/DpTechAttackType.java b/src/main/java/com/dispose/common/DpTechAttackType.java index 6490e21e..04ad5839 100644 --- a/src/main/java/com/dispose/common/DpTechAttackType.java +++ b/src/main/java/com/dispose/common/DpTechAttackType.java @@ -104,7 +104,7 @@ public enum DpTechAttackType implements BaseEnum { public static Long formDdosAttackTypeMaks(Long ddosAttackMask) { List dpTechAttackTypes = new ArrayList<>(); - for(DDoSAttackType a : DDoSAttackType.maskToDdosAttackType(ddosAttackMask)) { + for (DDoSAttackType a : DDoSAttackType.maskToDdosAttackType(ddosAttackMask)) { dpTechAttackTypes.addAll(DpTechAttackType.fromDdosAttackTypeValue(a)); } @@ -140,36 +140,29 @@ public enum DpTechAttackType implements BaseEnum { switch (type) { case HOST_TOTAL_TRAFFIC: + case WIN_NUKE: + case SIP_FLOOD: + case DNS_FLOOD: + case IPV4_PROTOCOL0: + case IP_PRIVATE: + case LAND_FLOOD: + case IGMP_FLOOD: attackList.add(HOST_TOTAL_TRAFFIC); break; case RST_FLOOD: - case FIN_FLOOD: - case SIP_FLOOD: - attackList.add(TCP_FIN_FLOOD); - break; - case SYN_FLOOD: - attackList.add(TCP_SYN_FLOOD); - break; - case ACK_FLOOD: - attackList.add(TCP_ACK_FLOOD); - break; - case TCP_NULL: case SYN_ACK_AMPLIFICATION: case TCP_MISUSE: + case FIN_FLOOD: attackList.add(TCP_SYN_ACK_FLOOD); break; case TCP_FRAGMENT: - case WIN_NUKE: case UDP_FRAGMENT: case ICMP_FRAGMENT: - case IPV4_PROTOCOL0: - case IP_PRIVATE: - case LAND_FLOOD: attackList.add(IP_FRAGMENT_FLOOD); break; @@ -178,11 +171,6 @@ public enum DpTechAttackType implements BaseEnum { attackList.add(HTTP_FLOOD); break; - case DNS_FLOOD: - attackList.add(DNS_REPLY_FLOOD); - attackList.add(DNS_QUERY_FLOOD); - break; - case CHARGED_AMPLIFICATION: case L2TP_AMPLIFICATION: case MDNS_AMPLIFICATION: @@ -204,7 +192,6 @@ public enum DpTechAttackType implements BaseEnum { case SENTINEL_AMPLIFICATION: case FRAGGLE_FLOOD: case UDP_FLOOD: - case IGMP_FLOOD: attackList.add(UDP_FLOOD); break;