From c9eb2c0a8aab8d614f90b86681b30dc6762ca11b Mon Sep 17 00:00:00 2001 From: houjinchuan Date: Thu, 21 Nov 2019 13:36:04 +0800 Subject: 首次提交 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 104 ++ src/main/java/cn/ac/iie/bean/CommonLog.java | 1142 ++++++++++++++++++++ .../bean/tsg_log/COLLECT_PROTOCOL_RECORD_LOG.java | 6 + .../ac/iie/bean/tsg_log/CONNECTION_RECORD_LOG.java | 6 + .../cn/ac/iie/bean/tsg_log/PROXY_EVENT_LOG.java | 7 + .../cn/ac/iie/bean/tsg_log/RADIUS_RECORD_LOG.java | 6 + .../cn/ac/iie/bean/tsg_log/SECURITY_EVENT_LOG.java | 7 + .../java/cn/ac/iie/common/RealtimeCountConfig.java | 27 + src/main/java/cn/ac/iie/producer/TSGProducer.java | 78 ++ src/main/java/cn/ac/iie/utils/GetLogData.java | 412 +++++++ .../java/cn/ac/iie/utils/GetLogFieldDataUtil.java | 208 ++++ .../ac/iie/utils/RealtimeCountConfigurations.java | 49 + src/main/resources/log4j.properties | 26 + .../resources/realtime_count_config.properties | 44 + 14 files changed, 2122 insertions(+) create mode 100644 pom.xml create mode 100644 src/main/java/cn/ac/iie/bean/CommonLog.java create mode 100644 src/main/java/cn/ac/iie/bean/tsg_log/COLLECT_PROTOCOL_RECORD_LOG.java create mode 100644 src/main/java/cn/ac/iie/bean/tsg_log/CONNECTION_RECORD_LOG.java create mode 100644 src/main/java/cn/ac/iie/bean/tsg_log/PROXY_EVENT_LOG.java create mode 100644 src/main/java/cn/ac/iie/bean/tsg_log/RADIUS_RECORD_LOG.java create mode 100644 src/main/java/cn/ac/iie/bean/tsg_log/SECURITY_EVENT_LOG.java create mode 100644 src/main/java/cn/ac/iie/common/RealtimeCountConfig.java create mode 100644 src/main/java/cn/ac/iie/producer/TSGProducer.java create mode 100644 src/main/java/cn/ac/iie/utils/GetLogData.java create mode 100644 src/main/java/cn/ac/iie/utils/GetLogFieldDataUtil.java create mode 100644 src/main/java/cn/ac/iie/utils/RealtimeCountConfigurations.java create mode 100644 src/main/resources/log4j.properties create mode 100644 src/main/resources/realtime_count_config.properties diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..c9dda5d --- /dev/null +++ b/pom.xml @@ -0,0 +1,104 @@ + + + 4.0.0 + + cn.iie.ac + tsg_galaxy_producer-V3.0.20191115 + 1.0-SNAPSHOT + jar + + + + + org.apache.maven.plugins + maven-shade-plugin + 2.4.1 + + + package + + shade + + + + + + cn.ac.iie.producer.TSGProducer + + + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + + exec + + + + + java + true + false + compile + cn.ac.iie.producer.TSGProducer + + + + org.apache.maven.plugins + maven-compiler-plugin + + 8 + 8 + + + + + + + + org.apache.kafka + kafka_2.11 + 1.0.0 + + + org.clojure + clojure + 1.7.0 + + + com.google.guava + guava + 18.0 + + + redis.clients + jedis + 2.8.1 + + + org.apache.httpcomponents + httpclient + 4.5.2 + + + junit + junit + 3.8.1 + test + + + com.alibaba + fastjson + 1.2.41 + + + + \ No newline at end of file diff --git a/src/main/java/cn/ac/iie/bean/CommonLog.java b/src/main/java/cn/ac/iie/bean/CommonLog.java new file mode 100644 index 0000000..1e8a097 --- /dev/null +++ b/src/main/java/cn/ac/iie/bean/CommonLog.java @@ -0,0 +1,1142 @@ +package cn.ac.iie.bean; + +public class CommonLog { + //private Long common_log_id; + private int common_service; + //private int common_recv_time; + private int common_direction; + private String common_l4_protocol; + private int common_address_type; + private String common_schema_type; + private int common_policy_id; + private String common_user_tags; + private int common_action; + private String common_user_region; + private String common_client_ip; + private int common_client_port; + private int common_entrance_id; + private String common_device_id; + private int common_link_id; + private String common_isp; + private int common_encapsulation; + private String common_sled_ip; +// private String common_client_location; +// private String common_client_asn; +// private String common_subscriber_id; + private String common_server_ip; + private int common_server_port; +// private String common_server_location; +// private String common_server_asn; + private String common_app_label; + //private int common_app_id; + //private int common_protocol_id; + private int common_c2s_pkt_num; + private int common_s2c_pkt_num; + private int common_c2s_byte_num; + private int common_s2c_byte_num; + private int common_start_time; + private int common_end_time; + private int common_con_duration_ms; + private int common_stream_dir; + private String common_address_list; + private int common_has_dup_traffic; + private String common_stream_error; + private long common_stream_trace_id; + + private String http_url; + private String http_host; +// private String http_domain; + private String http_request_line; + private String http_response_line; + private String http_request_header; + private String http_response_header; + private String http_request_body; + private String http_response_body; + private String http_request_body_key; + private String http_response_body_key; + private int http_proxy_flag; + private int http_sequence; + private String http_snapshot; + private String http_cookie; + private String http_referer; + private String http_user_agent; + private String http_content_length; + private String http_content_type; + private String http_set_cookie; + private String http_version; + + private String mail_protocol_type; + private String mail_sender; + private String mail_receiver; + private String mail_subject; + private String mail_content; + private String mail_attachment_name; + private String mail_attachment_content; + private String mail_eml_file; + private String mail_snapshot; + + private int dns_message_id; + private int dns_qr; + private int dns_opcode; + private int dns_aa; + private int dns_tc; + private int dns_rd; + private int dns_ra; + private int dns_rcode; + private int dns_qdcount; + private int dns_ancount; + private int dns_nscount; + private int dns_arcount; + private String dns_qname; + private int dns_qtype; + private int dns_qclass; + private String dns_cname; + private int dns_sub; + private String dns_rr; + + private String ssl_version; + private String ssl_sni; + private String ssl_san; + private String ssl_cn; + private int ssl_pinningst; + private int ssl_intercept_state; + private int ssl_server_side_latency; + private int ssl_client_side_latency; + private String ssl_server_side_version; + private String ssl_client_side_version; + private int ssl_cert_verify; + private String ssl_error; + private int ssl_con_latency_ms; + + private String ftp_url; + private String ftp_content; + + private int bgp_type; + private String bgp_as_num; + private String bgp_route; + + private String voip_calling_account; + private String voip_called_account; + private String voip_calling_number; + private String voip_called_number; + + private int radius_packet_type; + private String radius_nas_ip; + private String radius_framed_ip; + private String radius_account; + private int radius_session_timeout; + private int radius_idle_timeout; + private int radius_acct_status_type; + private int radius_acct_terminate_cause; + + private String streaming_media_url; + private String streaming_media_protocol; + + public CommonLog() { + } + + public String getCommon_schema_type() { + return common_schema_type; + } + + public void setCommon_schema_type(String common_schema_type) { + this.common_schema_type = common_schema_type; + } + + public int getCommon_service() { + return common_service; + } + + public void setCommon_service(int common_service) { + this.common_service = common_service; + } + + public int getCommon_direction() { + return common_direction; + } + + public void setCommon_direction(int common_direction) { + this.common_direction = common_direction; + } + + public String getCommon_l4_protocol() { + return common_l4_protocol; + } + + public void setCommon_l4_protocol(String common_l4_protocol) { + this.common_l4_protocol = common_l4_protocol; + } + + public int getCommon_address_type() { + return common_address_type; + } + + public void setCommon_address_type(int common_address_type) { + this.common_address_type = common_address_type; + } + + public int getCommon_policy_id() { + return common_policy_id; + } + + public void setCommon_policy_id(int common_policy_id) { + this.common_policy_id = common_policy_id; + } + + public String getCommon_user_tags() { + return common_user_tags; + } + + public void setCommon_user_tags(String common_user_tags) { + this.common_user_tags = common_user_tags; + } + + public int getCommon_action() { + return common_action; + } + + public void setCommon_action(int common_action) { + this.common_action = common_action; + } + + public String getCommon_user_region() { + return common_user_region; + } + + public void setCommon_user_region(String common_user_region) { + this.common_user_region = common_user_region; + } + + public String getCommon_client_ip() { + return common_client_ip; + } + + public void setCommon_client_ip(String common_client_ip) { + this.common_client_ip = common_client_ip; + } + + public int getCommon_client_port() { + return common_client_port; + } + + public void setCommon_client_port(int common_client_port) { + this.common_client_port = common_client_port; + } + + public int getCommon_entrance_id() { + return common_entrance_id; + } + + public void setCommon_entrance_id(int common_entrance_id) { + this.common_entrance_id = common_entrance_id; + } + + public String getCommon_device_id() { + return common_device_id; + } + + public void setCommon_device_id(String common_device_id) { + this.common_device_id = common_device_id; + } + + public int getCommon_link_id() { + return common_link_id; + } + + public void setCommon_link_id(int common_link_id) { + this.common_link_id = common_link_id; + } + + public String getCommon_isp() { + return common_isp; + } + + public void setCommon_isp(String common_isp) { + this.common_isp = common_isp; + } + + public int getCommon_encapsulation() { + return common_encapsulation; + } + + public void setCommon_encapsulation(int common_encapsulation) { + this.common_encapsulation = common_encapsulation; + } + + public String getCommon_sled_ip() { + return common_sled_ip; + } + + public void setCommon_sled_ip(String common_sled_ip) { + this.common_sled_ip = common_sled_ip; + } + + public String getCommon_server_ip() { + return common_server_ip; + } + + public void setCommon_server_ip(String common_server_ip) { + this.common_server_ip = common_server_ip; + } + + public int getCommon_server_port() { + return common_server_port; + } + + public void setCommon_server_port(int common_server_port) { + this.common_server_port = common_server_port; + } + + public String getCommon_app_label() { + return common_app_label; + } + + public void setCommon_app_label(String common_app_label) { + this.common_app_label = common_app_label; + } + + public int getCommon_c2s_pkt_num() { + return common_c2s_pkt_num; + } + + public void setCommon_c2s_pkt_num(int common_c2s_pkt_num) { + this.common_c2s_pkt_num = common_c2s_pkt_num; + } + + public int getCommon_s2c_pkt_num() { + return common_s2c_pkt_num; + } + + public void setCommon_s2c_pkt_num(int common_s2c_pkt_num) { + this.common_s2c_pkt_num = common_s2c_pkt_num; + } + + public int getCommon_c2s_byte_num() { + return common_c2s_byte_num; + } + + public void setCommon_c2s_byte_num(int common_c2s_byte_num) { + this.common_c2s_byte_num = common_c2s_byte_num; + } + + public int getCommon_s2c_byte_num() { + return common_s2c_byte_num; + } + + public void setCommon_s2c_byte_num(int common_s2c_byte_num) { + this.common_s2c_byte_num = common_s2c_byte_num; + } + + public int getCommon_start_time() { + return common_start_time; + } + + public void setCommon_start_time(int common_start_time) { + this.common_start_time = common_start_time; + } + + public int getCommon_end_time() { + return common_end_time; + } + + public void setCommon_end_time(int common_end_time) { + this.common_end_time = common_end_time; + } + + public int getCommon_con_duration_ms() { + return common_con_duration_ms; + } + + public void setCommon_con_duration_ms(int common_con_duration_ms) { + this.common_con_duration_ms = common_con_duration_ms; + } + + public int getCommon_stream_dir() { + return common_stream_dir; + } + + public void setCommon_stream_dir(int common_stream_dir) { + this.common_stream_dir = common_stream_dir; + } + + public String getCommon_address_list() { + return common_address_list; + } + + public void setCommon_address_list(String common_address_list) { + this.common_address_list = common_address_list; + } + + public int getCommon_has_dup_traffic() { + return common_has_dup_traffic; + } + + public void setCommon_has_dup_traffic(int common_has_dup_traffic) { + this.common_has_dup_traffic = common_has_dup_traffic; + } + + public String getCommon_stream_error() { + return common_stream_error; + } + + public void setCommon_stream_error(String common_stream_error) { + this.common_stream_error = common_stream_error; + } + + public long getCommon_stream_trace_id() { + return common_stream_trace_id; + } + + public void setCommon_stream_trace_id(long common_stream_trace_id) { + this.common_stream_trace_id = common_stream_trace_id; + } + + public String getHttp_url() { + return http_url; + } + + public void setHttp_url(String http_url) { + this.http_url = http_url; + } + + public String getHttp_host() { + return http_host; + } + + public void setHttp_host(String http_host) { + this.http_host = http_host; + } + + public String getHttp_request_line() { + return http_request_line; + } + + public void setHttp_request_line(String http_request_line) { + this.http_request_line = http_request_line; + } + + public String getHttp_response_line() { + return http_response_line; + } + + public void setHttp_response_line(String http_response_line) { + this.http_response_line = http_response_line; + } + + public String getHttp_request_header() { + return http_request_header; + } + + public void setHttp_request_header(String http_request_header) { + this.http_request_header = http_request_header; + } + + public String getHttp_response_header() { + return http_response_header; + } + + public void setHttp_response_header(String http_response_header) { + this.http_response_header = http_response_header; + } + + public String getHttp_request_body() { + return http_request_body; + } + + public void setHttp_request_body(String http_request_body) { + this.http_request_body = http_request_body; + } + + public String getHttp_response_body() { + return http_response_body; + } + + public void setHttp_response_body(String http_response_body) { + this.http_response_body = http_response_body; + } + + public String getHttp_request_body_key() { + return http_request_body_key; + } + + public void setHttp_request_body_key(String http_request_body_key) { + this.http_request_body_key = http_request_body_key; + } + + public String getHttp_response_body_key() { + return http_response_body_key; + } + + public void setHttp_response_body_key(String http_response_body_key) { + this.http_response_body_key = http_response_body_key; + } + + public int getHttp_proxy_flag() { + return http_proxy_flag; + } + + public void setHttp_proxy_flag(int http_proxy_flag) { + this.http_proxy_flag = http_proxy_flag; + } + + public int getHttp_sequence() { + return http_sequence; + } + + public void setHttp_sequence(int http_sequence) { + this.http_sequence = http_sequence; + } + + public String getHttp_snapshot() { + return http_snapshot; + } + + public void setHttp_snapshot(String http_snapshot) { + this.http_snapshot = http_snapshot; + } + + public String getHttp_cookie() { + return http_cookie; + } + + public void setHttp_cookie(String http_cookie) { + this.http_cookie = http_cookie; + } + + public String getHttp_referer() { + return http_referer; + } + + public void setHttp_referer(String http_referer) { + this.http_referer = http_referer; + } + + public String getHttp_user_agent() { + return http_user_agent; + } + + public void setHttp_user_agent(String http_user_agent) { + this.http_user_agent = http_user_agent; + } + + public String getHttp_content_length() { + return http_content_length; + } + + public void setHttp_content_length(String http_content_length) { + this.http_content_length = http_content_length; + } + + public String getHttp_content_type() { + return http_content_type; + } + + public void setHttp_content_type(String http_content_type) { + this.http_content_type = http_content_type; + } + + public String getHttp_set_cookie() { + return http_set_cookie; + } + + public void setHttp_set_cookie(String http_set_cookie) { + this.http_set_cookie = http_set_cookie; + } + + public String getHttp_version() { + return http_version; + } + + public void setHttp_version(String http_version) { + this.http_version = http_version; + } + + public String getMail_protocol_type() { + return mail_protocol_type; + } + + public void setMail_protocol_type(String mail_protocol_type) { + this.mail_protocol_type = mail_protocol_type; + } + + public String getMail_sender() { + return mail_sender; + } + + public void setMail_sender(String mail_sender) { + this.mail_sender = mail_sender; + } + + public String getMail_receiver() { + return mail_receiver; + } + + public void setMail_receiver(String mail_receiver) { + this.mail_receiver = mail_receiver; + } + + public String getMail_subject() { + return mail_subject; + } + + public void setMail_subject(String mail_subject) { + this.mail_subject = mail_subject; + } + + public String getMail_content() { + return mail_content; + } + + public void setMail_content(String mail_content) { + this.mail_content = mail_content; + } + + public String getMail_attachment_name() { + return mail_attachment_name; + } + + public void setMail_attachment_name(String mail_attachment_name) { + this.mail_attachment_name = mail_attachment_name; + } + + public String getMail_attachment_content() { + return mail_attachment_content; + } + + public void setMail_attachment_content(String mail_attachment_content) { + this.mail_attachment_content = mail_attachment_content; + } + + public String getMail_eml_file() { + return mail_eml_file; + } + + public void setMail_eml_file(String mail_eml_file) { + this.mail_eml_file = mail_eml_file; + } + + public String getMail_snapshot() { + return mail_snapshot; + } + + public void setMail_snapshot(String mail_snapshot) { + this.mail_snapshot = mail_snapshot; + } + + public int getDns_message_id() { + return dns_message_id; + } + + public void setDns_message_id(int dns_message_id) { + this.dns_message_id = dns_message_id; + } + + public int getDns_qr() { + return dns_qr; + } + + public void setDns_qr(int dns_qr) { + this.dns_qr = dns_qr; + } + + public int getDns_opcode() { + return dns_opcode; + } + + public void setDns_opcode(int dns_opcode) { + this.dns_opcode = dns_opcode; + } + + public int getDns_aa() { + return dns_aa; + } + + public void setDns_aa(int dns_aa) { + this.dns_aa = dns_aa; + } + + public int getDns_tc() { + return dns_tc; + } + + public void setDns_tc(int dns_tc) { + this.dns_tc = dns_tc; + } + + public int getDns_rd() { + return dns_rd; + } + + public void setDns_rd(int dns_rd) { + this.dns_rd = dns_rd; + } + + public int getDns_ra() { + return dns_ra; + } + + public void setDns_ra(int dns_ra) { + this.dns_ra = dns_ra; + } + + public int getDns_rcode() { + return dns_rcode; + } + + public void setDns_rcode(int dns_rcode) { + this.dns_rcode = dns_rcode; + } + + public int getDns_qdcount() { + return dns_qdcount; + } + + public void setDns_qdcount(int dns_qdcount) { + this.dns_qdcount = dns_qdcount; + } + + public int getDns_ancount() { + return dns_ancount; + } + + public void setDns_ancount(int dns_ancount) { + this.dns_ancount = dns_ancount; + } + + public int getDns_nscount() { + return dns_nscount; + } + + public void setDns_nscount(int dns_nscount) { + this.dns_nscount = dns_nscount; + } + + public int getDns_arcount() { + return dns_arcount; + } + + public void setDns_arcount(int dns_arcount) { + this.dns_arcount = dns_arcount; + } + + public String getDns_qname() { + return dns_qname; + } + + public void setDns_qname(String dns_qname) { + this.dns_qname = dns_qname; + } + + public int getDns_qtype() { + return dns_qtype; + } + + public void setDns_qtype(int dns_qtype) { + this.dns_qtype = dns_qtype; + } + + public int getDns_qclass() { + return dns_qclass; + } + + public void setDns_qclass(int dns_qclass) { + this.dns_qclass = dns_qclass; + } + + public String getDns_cname() { + return dns_cname; + } + + public void setDns_cname(String dns_cname) { + this.dns_cname = dns_cname; + } + + public int getDns_sub() { + return dns_sub; + } + + public void setDns_sub(int dns_sub) { + this.dns_sub = dns_sub; + } + + public String getDns_rr() { + return dns_rr; + } + + public void setDns_rr(String dns_rr) { + this.dns_rr = dns_rr; + } + + public String getSsl_version() { + return ssl_version; + } + + public void setSsl_version(String ssl_version) { + this.ssl_version = ssl_version; + } + + public String getSsl_sni() { + return ssl_sni; + } + + public void setSsl_sni(String ssl_sni) { + this.ssl_sni = ssl_sni; + } + + public String getSsl_san() { + return ssl_san; + } + + public void setSsl_san(String ssl_san) { + this.ssl_san = ssl_san; + } + + public String getSsl_cn() { + return ssl_cn; + } + + public void setSsl_cn(String ssl_cn) { + this.ssl_cn = ssl_cn; + } + + public int getSsl_pinningst() { + return ssl_pinningst; + } + + public void setSsl_pinningst(int ssl_pinningst) { + this.ssl_pinningst = ssl_pinningst; + } + + public int getSsl_intercept_state() { + return ssl_intercept_state; + } + + public void setSsl_intercept_state(int ssl_intercept_state) { + this.ssl_intercept_state = ssl_intercept_state; + } + + public int getSsl_server_side_latency() { + return ssl_server_side_latency; + } + + public void setSsl_server_side_latency(int ssl_server_side_latency) { + this.ssl_server_side_latency = ssl_server_side_latency; + } + + public int getSsl_client_side_latency() { + return ssl_client_side_latency; + } + + public void setSsl_client_side_latency(int ssl_client_side_latency) { + this.ssl_client_side_latency = ssl_client_side_latency; + } + + public String getSsl_server_side_version() { + return ssl_server_side_version; + } + + public void setSsl_server_side_version(String ssl_server_side_version) { + this.ssl_server_side_version = ssl_server_side_version; + } + + public String getSsl_client_side_version() { + return ssl_client_side_version; + } + + public void setSsl_client_side_version(String ssl_client_side_version) { + this.ssl_client_side_version = ssl_client_side_version; + } + + public int getSsl_cert_verify() { + return ssl_cert_verify; + } + + public void setSsl_cert_verify(int ssl_cert_verify) { + this.ssl_cert_verify = ssl_cert_verify; + } + + public String getSsl_error() { + return ssl_error; + } + + public void setSsl_error(String ssl_error) { + this.ssl_error = ssl_error; + } + + public int getSsl_con_latency_ms() { + return ssl_con_latency_ms; + } + + public void setSsl_con_latency_ms(int ssl_con_latency_ms) { + this.ssl_con_latency_ms = ssl_con_latency_ms; + } + + public String getFtp_url() { + return ftp_url; + } + + public void setFtp_url(String ftp_url) { + this.ftp_url = ftp_url; + } + + public String getFtp_content() { + return ftp_content; + } + + public void setFtp_content(String ftp_content) { + this.ftp_content = ftp_content; + } + + public int getBgp_type() { + return bgp_type; + } + + public void setBgp_type(int bgp_type) { + this.bgp_type = bgp_type; + } + + public String getBgp_as_num() { + return bgp_as_num; + } + + public void setBgp_as_num(String bgp_as_num) { + this.bgp_as_num = bgp_as_num; + } + + public String getBgp_route() { + return bgp_route; + } + + public void setBgp_route(String bgp_route) { + this.bgp_route = bgp_route; + } + + public String getVoip_calling_account() { + return voip_calling_account; + } + + public void setVoip_calling_account(String voip_calling_account) { + this.voip_calling_account = voip_calling_account; + } + + public String getVoip_called_account() { + return voip_called_account; + } + + public void setVoip_called_account(String voip_called_account) { + this.voip_called_account = voip_called_account; + } + + public String getVoip_calling_number() { + return voip_calling_number; + } + + public void setVoip_calling_number(String voip_calling_number) { + this.voip_calling_number = voip_calling_number; + } + + public String getVoip_called_number() { + return voip_called_number; + } + + public void setVoip_called_number(String voip_called_number) { + this.voip_called_number = voip_called_number; + } + + public int getRadius_packet_type() { + return radius_packet_type; + } + + public void setRadius_packet_type(int radius_packet_type) { + this.radius_packet_type = radius_packet_type; + } + + public String getRadius_nas_ip() { + return radius_nas_ip; + } + + public void setRadius_nas_ip(String radius_nas_ip) { + this.radius_nas_ip = radius_nas_ip; + } + + public String getRadius_framed_ip() { + return radius_framed_ip; + } + + public void setRadius_framed_ip(String radius_framed_ip) { + this.radius_framed_ip = radius_framed_ip; + } + + public String getRadius_account() { + return radius_account; + } + + public void setRadius_account(String radius_account) { + this.radius_account = radius_account; + } + + public int getRadius_session_timeout() { + return radius_session_timeout; + } + + public void setRadius_session_timeout(int radius_session_timeout) { + this.radius_session_timeout = radius_session_timeout; + } + + public int getRadius_idle_timeout() { + return radius_idle_timeout; + } + + public void setRadius_idle_timeout(int radius_idle_timeout) { + this.radius_idle_timeout = radius_idle_timeout; + } + + public int getRadius_acct_status_type() { + return radius_acct_status_type; + } + + public void setRadius_acct_status_type(int radius_acct_status_type) { + this.radius_acct_status_type = radius_acct_status_type; + } + + public int getRadius_acct_terminate_cause() { + return radius_acct_terminate_cause; + } + + public void setRadius_acct_terminate_cause(int radius_acct_terminate_cause) { + this.radius_acct_terminate_cause = radius_acct_terminate_cause; + } + + public String getStreaming_media_url() { + return streaming_media_url; + } + + public void setStreaming_media_url(String streaming_media_url) { + this.streaming_media_url = streaming_media_url; + } + + public String getStreaming_media_protocol() { + return streaming_media_protocol; + } + + public void setStreaming_media_protocol(String streaming_media_protocol) { + this.streaming_media_protocol = streaming_media_protocol; + } + + @Override + public String toString() { + return "CommonLog{" + + "common_service=" + common_service + + ", common_direction=" + common_direction + + ", common_l4_protocol='" + common_l4_protocol + '\'' + + ", common_address_type=" + common_address_type + + ", common_schema_type='" + common_schema_type + '\'' + + ", common_policy_id=" + common_policy_id + + ", common_user_tags='" + common_user_tags + '\'' + + ", common_action=" + common_action + + ", common_user_region='" + common_user_region + '\'' + + ", common_client_ip='" + common_client_ip + '\'' + + ", common_client_port=" + common_client_port + + ", common_entrance_id=" + common_entrance_id + + ", common_device_id='" + common_device_id + '\'' + + ", common_link_id=" + common_link_id + + ", common_isp='" + common_isp + '\'' + + ", common_encapsulation=" + common_encapsulation + + ", common_sled_ip='" + common_sled_ip + '\'' + + ", common_server_ip='" + common_server_ip + '\'' + + ", common_server_port=" + common_server_port + + ", common_app_label='" + common_app_label + '\'' + + ", common_c2s_pkt_num=" + common_c2s_pkt_num + + ", common_s2c_pkt_num=" + common_s2c_pkt_num + + ", common_c2s_byte_num=" + common_c2s_byte_num + + ", common_s2c_byte_num=" + common_s2c_byte_num + + ", common_start_time=" + common_start_time + + ", common_end_time=" + common_end_time + + ", common_con_duration_ms=" + common_con_duration_ms + + ", common_stream_dir=" + common_stream_dir + + ", common_address_list='" + common_address_list + '\'' + + ", common_has_dup_traffic=" + common_has_dup_traffic + + ", common_stream_error='" + common_stream_error + '\'' + + ", common_stream_trace_id='" + common_stream_trace_id + '\'' + + ", http_url='" + http_url + '\'' + + ", http_host='" + http_host + '\'' + + ", http_request_line='" + http_request_line + '\'' + + ", http_response_line='" + http_response_line + '\'' + + ", http_request_header='" + http_request_header + '\'' + + ", http_response_header='" + http_response_header + '\'' + + ", http_request_body='" + http_request_body + '\'' + + ", http_response_body='" + http_response_body + '\'' + + ", http_request_body_key='" + http_request_body_key + '\'' + + ", http_response_body_key='" + http_response_body_key + '\'' + + ", http_proxy_flag=" + http_proxy_flag + + ", http_sequence=" + http_sequence + + ", http_snapshot='" + http_snapshot + '\'' + + ", http_cookie='" + http_cookie + '\'' + + ", http_referer='" + http_referer + '\'' + + ", http_user_agent='" + http_user_agent + '\'' + + ", http_content_length='" + http_content_length + '\'' + + ", http_content_type='" + http_content_type + '\'' + + ", http_set_cookie='" + http_set_cookie + '\'' + + ", http_version='" + http_version + '\'' + + ", mail_protocol_type='" + mail_protocol_type + '\'' + + ", mail_sender='" + mail_sender + '\'' + + ", mail_receiver='" + mail_receiver + '\'' + + ", mail_subject='" + mail_subject + '\'' + + ", mail_content='" + mail_content + '\'' + + ", mail_attachment_name='" + mail_attachment_name + '\'' + + ", mail_attachment_content='" + mail_attachment_content + '\'' + + ", mail_eml_file='" + mail_eml_file + '\'' + + ", mail_snapshot='" + mail_snapshot + '\'' + + ", dns_message_id=" + dns_message_id + + ", dns_qr=" + dns_qr + + ", dns_opcode=" + dns_opcode + + ", dns_aa=" + dns_aa + + ", dns_tc=" + dns_tc + + ", dns_rd=" + dns_rd + + ", dns_ra=" + dns_ra + + ", dns_rcode=" + dns_rcode + + ", dns_qdcount=" + dns_qdcount + + ", dns_ancount=" + dns_ancount + + ", dns_nscount=" + dns_nscount + + ", dns_arcount=" + dns_arcount + + ", dns_qname='" + dns_qname + '\'' + + ", dns_qtype=" + dns_qtype + + ", dns_qclass=" + dns_qclass + + ", dns_cname='" + dns_cname + '\'' + + ", dns_sub=" + dns_sub + + ", dns_rr='" + dns_rr + '\'' + + ", ssl_version='" + ssl_version + '\'' + + ", ssl_sni='" + ssl_sni + '\'' + + ", ssl_san='" + ssl_san + '\'' + + ", ssl_cn='" + ssl_cn + '\'' + + ", ssl_pinningst=" + ssl_pinningst + + ", ssl_intercept_state=" + ssl_intercept_state + + ", ssl_server_side_latency=" + ssl_server_side_latency + + ", ssl_client_side_latency=" + ssl_client_side_latency + + ", ssl_server_side_version='" + ssl_server_side_version + '\'' + + ", ssl_client_side_version='" + ssl_client_side_version + '\'' + + ", ssl_cert_verify=" + ssl_cert_verify + + ", ssl_error='" + ssl_error + '\'' + + ", ssl_con_latency_ms=" + ssl_con_latency_ms + + ", ftp_url='" + ftp_url + '\'' + + ", ftp_content='" + ftp_content + '\'' + + ", bgp_type=" + bgp_type + + ", bgp_as_num='" + bgp_as_num + '\'' + + ", bgp_route='" + bgp_route + '\'' + + ", voip_calling_account='" + voip_calling_account + '\'' + + ", voip_called_account='" + voip_called_account + '\'' + + ", voip_calling_number='" + voip_calling_number + '\'' + + ", voip_called_number='" + voip_called_number + '\'' + + ", radius_packet_type=" + radius_packet_type + + ", radius_nas_ip='" + radius_nas_ip + '\'' + + ", radius_framed_ip='" + radius_framed_ip + '\'' + + ", radius_account='" + radius_account + '\'' + + ", radius_session_timeout=" + radius_session_timeout + + ", radius_idle_timeout=" + radius_idle_timeout + + ", radius_acct_status_type=" + radius_acct_status_type + + ", radius_acct_terminate_cause=" + radius_acct_terminate_cause + + ", streaming_media_url='" + streaming_media_url + '\'' + + ", streaming_media_protocol='" + streaming_media_protocol + '\'' + + '}'; + } +} diff --git a/src/main/java/cn/ac/iie/bean/tsg_log/COLLECT_PROTOCOL_RECORD_LOG.java b/src/main/java/cn/ac/iie/bean/tsg_log/COLLECT_PROTOCOL_RECORD_LOG.java new file mode 100644 index 0000000..65310bd --- /dev/null +++ b/src/main/java/cn/ac/iie/bean/tsg_log/COLLECT_PROTOCOL_RECORD_LOG.java @@ -0,0 +1,6 @@ +package cn.ac.iie.bean.tsg_log; + +import cn.ac.iie.bean.CommonLog; + +public class COLLECT_PROTOCOL_RECORD_LOG extends CommonLog { +} diff --git a/src/main/java/cn/ac/iie/bean/tsg_log/CONNECTION_RECORD_LOG.java b/src/main/java/cn/ac/iie/bean/tsg_log/CONNECTION_RECORD_LOG.java new file mode 100644 index 0000000..b05a299 --- /dev/null +++ b/src/main/java/cn/ac/iie/bean/tsg_log/CONNECTION_RECORD_LOG.java @@ -0,0 +1,6 @@ +package cn.ac.iie.bean.tsg_log; + +import cn.ac.iie.bean.CommonLog; + +public class CONNECTION_RECORD_LOG extends CommonLog { +} diff --git a/src/main/java/cn/ac/iie/bean/tsg_log/PROXY_EVENT_LOG.java b/src/main/java/cn/ac/iie/bean/tsg_log/PROXY_EVENT_LOG.java new file mode 100644 index 0000000..6fd25ae --- /dev/null +++ b/src/main/java/cn/ac/iie/bean/tsg_log/PROXY_EVENT_LOG.java @@ -0,0 +1,7 @@ +package cn.ac.iie.bean.tsg_log; + +import cn.ac.iie.bean.CommonLog; + +public class PROXY_EVENT_LOG extends CommonLog { + +} diff --git a/src/main/java/cn/ac/iie/bean/tsg_log/RADIUS_RECORD_LOG.java b/src/main/java/cn/ac/iie/bean/tsg_log/RADIUS_RECORD_LOG.java new file mode 100644 index 0000000..9c393aa --- /dev/null +++ b/src/main/java/cn/ac/iie/bean/tsg_log/RADIUS_RECORD_LOG.java @@ -0,0 +1,6 @@ +package cn.ac.iie.bean.tsg_log; + +import cn.ac.iie.bean.CommonLog; + +public class RADIUS_RECORD_LOG extends CommonLog { +} diff --git a/src/main/java/cn/ac/iie/bean/tsg_log/SECURITY_EVENT_LOG.java b/src/main/java/cn/ac/iie/bean/tsg_log/SECURITY_EVENT_LOG.java new file mode 100644 index 0000000..efbfe3c --- /dev/null +++ b/src/main/java/cn/ac/iie/bean/tsg_log/SECURITY_EVENT_LOG.java @@ -0,0 +1,7 @@ +package cn.ac.iie.bean.tsg_log; + +import cn.ac.iie.bean.CommonLog; + +public class SECURITY_EVENT_LOG extends CommonLog { + +} diff --git a/src/main/java/cn/ac/iie/common/RealtimeCountConfig.java b/src/main/java/cn/ac/iie/common/RealtimeCountConfig.java new file mode 100644 index 0000000..2230804 --- /dev/null +++ b/src/main/java/cn/ac/iie/common/RealtimeCountConfig.java @@ -0,0 +1,27 @@ +package cn.ac.iie.common; + +import cn.ac.iie.utils.RealtimeCountConfigurations; + +import java.io.Serializable; + +public class RealtimeCountConfig implements Serializable { + private static final long serialVersionUID = 1641809911536544588L; + + public static final String BOOTSTRAP_SERVERS = RealtimeCountConfigurations.getStringProperty(0, "bootstrap.servers"); + public static final String CUSTOM_COMPRESSION_TYPE = RealtimeCountConfigurations.getStringProperty(0, "custom.compression.type"); + + public static final String KAFKA_RRL_TOPIC = RealtimeCountConfigurations.getStringProperty(0, "kafka.rrl.topic"); + public static final String KAFKA_SEL_TOPIC = RealtimeCountConfigurations.getStringProperty(0, "kafka.sel.topic"); + public static final String KAFKA_PEL_TOPIC = RealtimeCountConfigurations.getStringProperty(0, "kafka.pel.topic"); + public static final String KAFKA_CRL_TOPIC = RealtimeCountConfigurations.getStringProperty(0, "kafka.crl.topic"); + + public static final Integer SPEED_NUM = RealtimeCountConfigurations.getIntProperty(0, "speed.num"); + public static final Integer SLEEP_NUM = RealtimeCountConfigurations.getIntProperty(0, "sleep.num"); + public static final Integer INSERT_NUM = RealtimeCountConfigurations.getIntProperty(0, "insert.num"); + public static final String AUTO_OFFSET_RESET = RealtimeCountConfigurations.getStringProperty(0, "auto.offset.reset"); + + public static final String COMMON_POLICY_ID = RealtimeCountConfigurations.getStringProperty(0, "common.policy.id"); + public static final String IPV4_DATAS= RealtimeCountConfigurations.getStringProperty(0, "IPV4Datas"); + public static final String IPV6_DATAS= RealtimeCountConfigurations.getStringProperty(0, "IPV6Datas"); + public static final String URL_DATAS= RealtimeCountConfigurations.getStringProperty(0, "urlDatas"); +} diff --git a/src/main/java/cn/ac/iie/producer/TSGProducer.java b/src/main/java/cn/ac/iie/producer/TSGProducer.java new file mode 100644 index 0000000..25ecd0e --- /dev/null +++ b/src/main/java/cn/ac/iie/producer/TSGProducer.java @@ -0,0 +1,78 @@ +package cn.ac.iie.producer; + +import cn.ac.iie.bean.tsg_log.CONNECTION_RECORD_LOG; +import cn.ac.iie.bean.tsg_log.PROXY_EVENT_LOG; +import cn.ac.iie.bean.tsg_log.RADIUS_RECORD_LOG; +import cn.ac.iie.bean.tsg_log.SECURITY_EVENT_LOG; +import cn.ac.iie.common.RealtimeCountConfig; +import cn.ac.iie.utils.GetLogData; +import com.alibaba.fastjson.JSONObject; +import org.apache.kafka.clients.producer.KafkaProducer; +import org.apache.kafka.clients.producer.ProducerRecord; +import org.apache.log4j.Logger; + +import java.util.Properties; + +public class TSGProducer { + private static final Logger logger = Logger.getLogger(TSGProducer.class); + public static void main(String[] args) { + Properties props = new Properties(); + //kafka地址 + props.put("bootstrap.servers", RealtimeCountConfig.BOOTSTRAP_SERVERS); + props.put("acks", "all"); + props.put("retries", 0); + props.put("linger.ms", 1); + props.put("buffer.memory", 67108864); + props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer"); + props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer"); + +// props.put("batch.size",102400);//批量提交字节 +// props.put("request.timeout.ms", 15000); +// props.put("producer.type", "sync"); +// props.put("batch.num.messages", 50000); +// props.put("acks", "0"); +// props.put("compression.type", RealtimeCountConfig.CUSTOM_COMPRESSION_TYPE);//测试压缩用20190710 + + //创建KafkaProducer + KafkaProducer kafkaProducer = new KafkaProducer(props); + + Long commonId=0l; + int messageid=0; + Long bbb = 0L; + while (true) { + commonId++; + messageid++; + try { + RADIUS_RECORD_LOG radius_record_log = GetLogData.getRadiusRecordLog(commonId); + PROXY_EVENT_LOG proxy_event_log = GetLogData.getProxyEventLog(commonId); + SECURITY_EVENT_LOG security_event_log = GetLogData.getSecurityEventLog(messageid,commonId); + CONNECTION_RECORD_LOG connection_record_log = GetLogData.getConnectionRecordLog(messageid,commonId); + + if (!(RealtimeCountConfig.KAFKA_RRL_TOPIC.equals("no"))) { + kafkaProducer.send(new ProducerRecord(RealtimeCountConfig.KAFKA_RRL_TOPIC, JSONObject.toJSONString(radius_record_log))); + } + if (!(RealtimeCountConfig.KAFKA_SEL_TOPIC.equals("no"))) { + kafkaProducer.send(new ProducerRecord(RealtimeCountConfig.KAFKA_SEL_TOPIC, JSONObject.toJSONString(security_event_log))); + } + if (!(RealtimeCountConfig.KAFKA_PEL_TOPIC.equals("no"))) { + kafkaProducer.send(new ProducerRecord(RealtimeCountConfig.KAFKA_PEL_TOPIC, JSONObject.toJSONString(proxy_event_log))); + } + if (!(RealtimeCountConfig.KAFKA_CRL_TOPIC.equals("no"))) { + kafkaProducer.send(new ProducerRecord(RealtimeCountConfig.KAFKA_CRL_TOPIC, JSONObject.toJSONString(connection_record_log))); + } + + bbb++; + //控制速度 + if (bbb % RealtimeCountConfig.SPEED_NUM == 0) { + Thread.sleep(RealtimeCountConfig.SLEEP_NUM); + } + //控制生产条数 +// if(bbb == 10000000){ +// break; +// } + } catch (Exception e) { + logger.error("TSGProducer is error----->" + e + "<-----"); + } + } + } +} diff --git a/src/main/java/cn/ac/iie/utils/GetLogData.java b/src/main/java/cn/ac/iie/utils/GetLogData.java new file mode 100644 index 0000000..369f7be --- /dev/null +++ b/src/main/java/cn/ac/iie/utils/GetLogData.java @@ -0,0 +1,412 @@ +package cn.ac.iie.utils; + +import cn.ac.iie.bean.CommonLog; +import cn.ac.iie.bean.tsg_log.CONNECTION_RECORD_LOG; +import cn.ac.iie.bean.tsg_log.PROXY_EVENT_LOG; +import cn.ac.iie.bean.tsg_log.RADIUS_RECORD_LOG; +import cn.ac.iie.bean.tsg_log.SECURITY_EVENT_LOG; +import cn.ac.iie.common.RealtimeCountConfig; + +import java.util.Random; + +public class GetLogData { + //协议类型 + private static String[] commonL4Protocols = {"IPv4_TCP","IPv4_UDP","IPv6_TCP","IPv6_UDP","VLAN","MAC", + "GRE","MPLS","L2TP","IPv4","IPv6","PPTP","OpenVPN"}; + //协议类型 + private static String[] commonSchemaTypes ={"HTTP","MAIL","DNS","SSL","FTP","BGP","VOIP"}; + //动作 0:无动作 1:检测 2:拦截 4:丢弃 16:阻断 48:操控(重定向、限速、替换、Hijack、Inject) 128:白名单 + private static int[] commonActions = {0,1,2,4,16,48,128}; + private static String isps[] = {"CMCC","China Telecom","China Unicom"}; + //原始二层封装格式 0:以太网 8:PPP 12:Cisco HDLC + private static int[] common_encapsulations = {0,8,12}; + //常用server port + private static int[] serverPorts={20,21,22,80,53,443,8080,23,25,110,3128,8081,9098,1080,443,69,9080,9090,3389,1521,2100,1433,1434,3306}; + //http协议属性 + private static String[] httpVersion = {"http1","http2"}; + private static String[] httpContentType={"text/html","text/xml","image/gif","application/x-jpg","text/plain","application/pdf","application/x-javascript","image/jpeg"}; + private static String[] cookies={"BIDUPSID=BD88B6AFA354C9974BA5DC656D1DCAFA; PSTM=1565062095; BD_UPN=12314753; MCITY=-131%3A; BDUSS=Eh5S2xZMllWaVVYLWFhMDFvUUg3Y3JGSkIzWk5PZml5RmdIYX55WmVVbH5MWmhkRVFBQUFBJCQAAAAAAAAAAAEAAAA-KHd4wuTEu-zh5M4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH-gcF1~oHBdV; BAIDUID=1563418C6EA616597E5578248A246C87:FG=1; BDSFRCVID=HuIOJeC6291gSorwGuZUMuC8OHbSMIRTH6aoVZ_9r344OArTY7JbEG0Pjx8g0KubVI2-ogKK0mOTHv0F_2uxOjjg8UtVJeC6EG0Ptf8g0M5; H_BDCLCKID_SF=tJke_C_MfC-3fP36qR6B2--fMmT22-us3T4L2hcH0bT_jJnchUC55nLI3tOu-xtOBKTihIn_Lfb1MRnoDh6ZyxPJbho8-U5p-e50Wq5TtUJreCnTDMRh-xCIjajyKMnitIj9-pnKtpQrh459XP68bTkA5bjZKxtq3mkjbPbDfn028DKuD6K-j5c3jHDs-bbfHD5J3bjbbTrjDCvvefR5y4LdLp7xJ-TbamOfLK3xLl4VJ4K42qQrDq4iXUnO-44eWJLHVI-5JDPWMIvuht8_hDCyMl6b5JtXKKOLVh620l7keq8CD6Jr24DI0qtqtRb0B6TmVp7dM4jzqK52y5jHhUFOet8ttj5TJanjWpbD3bcpsIJMyh_WbT8U5f5jhtoCaKviaKJEBMb1fCJDBT5h2M4qMxtOLR3pWDTm_q5TtUJMeCnTDMFhe6j0DGujt5_jfK6b36rtKRTffjrnhPF3Q4tzXP6-35KHaIrU-Do8bKLhfpQE5f-WXnJB-U7H2h37JD6yXxn5yqQoOpTKhljK0xLRWtoxJpO7BRbMopvaKtcGEC3vbURvD-ug3-7qJU5dtjTO2bc_5KnlfMQ_bf--QfbQ0hOhqP-jBRIEoD0hJI_aMItrKPnt5KCehxv02tQba5vXsJrHbIvljInOy4oThfvB3lJyQfTfJD7hKp6a0KnceqvoD-Jc3MkjhhjRbpT2Ba6hBhA-XMQkeq8CQft20b0EeMtjBbQa3HnTbJ7jWhk2ep72y5jvQlRX5q79atTMfNTJ-qcH0KQpsIJM5-DWbT8IjHCDt5FftnFDVCvJanTjjTrph-rB5t6H-UnLqMvtWmOZ0l8KtDIaeUOvKRJn5qIAXqomqUR7KH7uaxomWIQHDUQLBTrKDT33XPQHLpFfWDr4KKJx2tPWeIJo5t54yjjDhUJiB5OLBan7LDJIXKohJh7FM4tW3J0ZyxomtfQxtNRJ0DnjtpChbRO4-TFMe5oBDx5; H_PS_PSSID=1462_21088_18559_29904_29568_29699_29220_22159; BDORZ=B490B5EBF6F3CD402E515D22BCDA1598; delPer=0; BD_CK_SAM=1; PSINO=2; ZD_ENTRY=empty; BD_HOME=1; pgv_pvi=3102172160; pgv_si=s565442560; session_name=www.baidu.com; BDRCVFR[dG2JNJb_ajR]=mk3SLVN4HKm; BDRCVFR[-pGxjrCMryR]=mk3SLVN4HKm; BDRCVFR[tox4WRQ4-Km]=mk3SLVN4HKm; session_id=1573034181083; COOKIE_SESSION=9_0_8_8_39_45_0_4_8_6_0_2_0_0_0_0_1573034181_0_1573038053%7C9%23700684_12_1571733999%7C7; H_PS_645EC=4ea7PargYL1P8htf5ZDY74Nv%2B6ZgkHCUSEqOkjgTWTCUe%2FqyTtjpww1EyZ0", + "__jdu=1630551275; shshshfpa=814b298a-3d8c-3f76-63d0-71137908b859-1568880807; shshshfpb=n4JY%2F9ujr8EMn0FQa4zsQaA%3D%3D; unpl=V2_ZzNtbRYERkd2W0dWK05UDGIEEVsSVxMRJQ5EBH5OXgxgABJeclRCFX0URlVnGl0UZwQZX0VcQRBFCEdkeR1ZAmYBEV1yZ3MWdThGVUsZWwdmBxZdQVFHJUUPRl1LKRdQO21UHABnQxVyDENWcxtVBFcCIl1KV0AQcw5GUHspF2tmThJaQFZHEXULQFBLGGwG; __jdv=76161171|direct|-|none|-|1573029676399; areaId=1; o2State={%22webp%22:true%2C%22lastvisit%22:1573029677912}; __jdc=122270672; __jda=122270672.1630551275.1566544188.1573029676.1573036049.5; 3AB9D23F7A4B3C9B=U7KYCE5CEGK6VG3LYP4IIPJB55WGVY3GD3XCAZY4SE4TA43IYEB2CQV6BL4OGMKWN72W4ZZ3IUKVZ7DY3LCL5HEQAI; shshshfp=4954f08681eeb6cdbee4832c94a2b4e7; shshshsID=cbfb6beb3b1f178b832eb6221e96fc9d_1_1573036154888; __jdb=122270672.6.1630551275|5.1573036049; ipLoc-djd=1-72-2799-0", + "BIDUPSID=BD88B6AFA354C9974BA5DC656D1DCAFA; PSTM=1565062095; BD_UPN=12314753; MCITY=-131%3A; BDUSS=Eh5S2xZMllWaVVYLWFhMDFvUUg3Y3JGSkIzWk5PZml5RmdIYX55WmVVbH5MWmhkRVFBQUFBJCQAAAAAAAAAAAEAAAA-KHd4wuTEu-zh5M4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH-gcF1~oHBdV; BAIDUID=1563418C6EA616597E5578248A246C87:FG=1; BDSFRCVID=HuIOJeC6291gSorwGuZUMuC8OHbSMIRTH6aoVZ_9r344OArTY7JbEG0Pjx8g0KubVI2-ogKK0mOTHv0F_2uxOjjg8UtVJeC6EG0Ptf8g0M5; H_BDCLCKID_SF=tJke_C_MfC-3fP36qR6B2--fMmT22-us3T4L2hcH0bT_jJnchUC55nLI3tOu-xtOBKTihIn_Lfb1MRnoDh6ZyxPJbho8-U5p-e50Wq5TtUJreCnTDMRh-xCIjajyKMnitIj9-pnKtpQrh459XP68bTkA5bjZKxtq3mkjbPbDfn028DKuD6K-j5c3jHDs-bbfHD5J3bjbbTrjDCvvefR5y4LdLp7xJ-TbamOfLK3xLl4VJ4K42qQrDq4iXUnO-44eWJLHVI-5JDPWMIvuht8_hDCyMl6b5JtXKKOLVh620l7keq8CD6Jr24DI0qtqtRb0B6TmVp7dM4jzqK52y5jHhUFOet8ttj5TJanjWpbD3bcpsIJMyh_WbT8U5f5jhtoCaKviaKJEBMb1fCJDBT5h2M4qMxtOLR3pWDTm_q5TtUJMeCnTDMFhe6j0DGujt5_jfK6b36rtKRTffjrnhPF3Q4tzXP6-35KHaIrU-Do8bKLhfpQE5f-WXnJB-U7H2h37JD6yXxn5yqQoOpTKhljK0xLRWtoxJpO7BRbMopvaKtcGEC3vbURvD-ug3-7qJU5dtjTO2bc_5KnlfMQ_bf--QfbQ0hOhqP-jBRIEoD0hJI_aMItrKPnt5KCehxv02tQba5vXsJrHbIvljInOy4oThfvB3lJyQfTfJD7hKp6a0KnceqvoD-Jc3MkjhhjRbpT2Ba6hBhA-XMQkeq8CQft20b0EeMtjBbQa3HnTbJ7jWhk2ep72y5jvQlRX5q79atTMfNTJ-qcH0KQpsIJM5-DWbT8IjHCDt5FftnFDVCvJanTjjTrph-rB5t6H-UnLqMvtWmOZ0l8KtDIaeUOvKRJn5qIAXqomqUR7KH7uaxomWIQHDUQLBTrKDT33XPQHLpFfWDr4KKJx2tPWeIJo5t54yjjDhUJiB5OLBan7LDJIXKohJh7FM4tW3J0ZyxomtfQxtNRJ0DnjtpChbRO4-TFMe5oBDx5; H_PS_PSSID=1462_21088_18559_29904_29568_29699_29220_22159; BDORZ=B490B5EBF6F3CD402E515D22BCDA1598; delPer=0; BD_CK_SAM=1; PSINO=2; ZD_ENTRY=empty; BD_HOME=1; pgv_pvi=3102172160; pgv_si=s565442560; session_name=www.baidu.com; BDRCVFR[dG2JNJb_ajR]=mk3SLVN4HKm; BDRCVFR[-pGxjrCMryR]=mk3SLVN4HKm; BDRCVFR[tox4WRQ4-Km]=mk3SLVN4HKm; COOKIE_SESSION=54_0_8_8_38_44_0_4_8_6_2_2_88343_0_6_0_1573034181_0_1573034175%7C9%23700684_12_1571733999%7C7; session_id=1573034181083; H_PS_645EC=659aDFnCu5FT8ndJl92Iu2lbcb4KEndp4Aa0JsT%2BXPNcLObYYzchyEF%2FSys", + "BIDUPSID=BD88B6AFA354C9974BA5DC656D1DCAFA; PSTM=1565062095; BD_UPN=12314753; MCITY=-131%3A; BDUSS=Eh5S2xZMllWaVVYLWFhMDFvUUg3Y3JGSkIzWk5PZml5RmdIYX55WmVVbH5MWmhkRVFBQUFBJCQAAAAAAAAAAAEAAAA-KHd4wuTEu-zh5M4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH-gcF1~oHBdV; BAIDUID=1563418C6EA616597E5578248A246C87:FG=1; BDSFRCVID=HuIOJeC6291gSorwGuZUMuC8OHbSMIRTH6aoVZ_9r344OArTY7JbEG0Pjx8g0KubVI2-ogKK0mOTHv0F_2uxOjjg8UtVJeC6EG0Ptf8g0M5; H_BDCLCKID_SF=tJke_C_MfC-3fP36qR6B2--fMmT22-us3T4L2hcH0bT_jJnchUC55nLI3tOu-xtOBKTihIn_Lfb1MRnoDh6ZyxPJbho8-U5p-e50Wq5TtUJreCnTDMRh-xCIjajyKMnitIj9-pnKtpQrh459XP68bTkA5bjZKxtq3mkjbPbDfn028DKuD6K-j5c3jHDs-bbfHD5J3bjbbTrjDCvvefR5y4LdLp7xJ-TbamOfLK3xLl4VJ4K42qQrDq4iXUnO-44eWJLHVI-5JDPWMIvuht8_hDCyMl6b5JtXKKOLVh620l7keq8CD6Jr24DI0qtqtRb0B6TmVp7dM4jzqK52y5jHhUFOet8ttj5TJanjWpbD3bcpsIJMyh_WbT8U5f5jhtoCaKviaKJEBMb1fCJDBT5h2M4qMxtOLR3pWDTm_q5TtUJMeCnTDMFhe6j0DGujt5_jfK6b36rtKRTffjrnhPF3Q4tzXP6-35KHaIrU-Do8bKLhfpQE5f-WXnJB-U7H2h37JD6yXxn5yqQoOpTKhljK0xLRWtoxJpO7BRbMopvaKtcGEC3vbURvD-ug3-7qJU5dtjTO2bc_5KnlfMQ_bf--QfbQ0hOhqP-jBRIEoD0hJI_aMItrKPnt5KCehxv02tQba5vXsJrHbIvljInOy4oThfvB3lJyQfTfJD7hKp6a0KnceqvoD-Jc3MkjhhjRbpT2Ba6hBhA-XMQkeq8CQft20b0EeMtjBbQa3HnTbJ7jWhk2ep72y5jvQlRX5q79atTMfNTJ-qcH0KQpsIJM5-DWbT8IjHCDt5FftnFDVCvJanTjjTrph-rB5t6H-UnLqMvtWmOZ0l8KtDIaeUOvKRJn5qIAXqomqUR7KH7uaxomWIQHDUQLBTrKDT33XPQHLpFfWDr4KKJx2tPWeIJo5t54yjjDhUJiB5OLBan7LDJIXKohJh7FM4tW3J0ZyxomtfQxtNRJ0DnjtpChbRO4-TFMe5oBDx5; H_PS_PSSID=1462_21088_18559_29904_29568_29699_29220_22159; BDORZ=B490B5EBF6F3CD402E515D22BCDA1598; pgv_pvi=3837043712; pgv_si=s3271133184; BDSVRTM=0; ZD_ENTRY=baidu" + ,"BAIDU_SSP_lcr=https://www.baidu.com/link?url=W8vjkcYqUvzPkb4tmze6jzWZZeICvTPlcfMuFKpY0JE98rdIxhOjForhLDTVmkuy9jppGvev_OY_vuEUb9KBiK&wd=&eqid=ad773ef600542a6f000000035dc37425; _javaeye_cookie_id_=1565317219441374; _ga=GA1.2.1795365517.1565317221; _javaeye3_session_=BAh7BjoPc2Vzc2lvbl9pZCIlODI1NzNlMzZkMjBhNzRjYzFmYWJiODk5OGM2NWUyY2E%3D--506fe15f912363452e1d0fba427b6bd2b8572acb; dc_tos=q0ksnp; _gid=GA1.2.1456666687.1573090837; _gat_gtag_UA_127895514_6=1; Hm_lvt_e19a8b00cf63f716d774540875007664=1570503756,1570672140,1570772420,1573090838; Hm_lpvt_e19a8b00cf63f716d774540875007664=1573090838"}; + //邮件协议类型 + private static String[] mailProtocolTypes ={"SMTP","POP3","IMAP4"}; + private static String[] mailSubject={"关于TSG项目的需求分析","关于TSG项目的修改方案","关于TSG项目的增加功能提议","关于TSG项目的部署方案","关于TSG项目的优化方案","TSG项目总结","关于TSG项目的问题解决方案","关于TSG项目的完善"}; + //SSL版本信息 + private static String [] sslVersions = {"V1","V2","V3"}; + //ssl版本 + private static String [] sslSideVersions = {"SSLv3","TLSv1","TLSv1.1","TLSv1.2","TLSv1.3","unknown"}; + //自治系统号 + private static String[] bgpAsNums ={"100","200"}; + //报文类型 + private static int[] RadiusPacketTypes ={1,2,3,4,5,11}; + //请求类型数组 0:标准查询 1:反向查询 2:DNS状态请求 5:DNS域更新请求 + private static int[] dnsOpcodes={0,1,2,5}; + //传输协议 + private static String[] streamingMediaProtocols={"RTP","RTCP","SRTP","SRTCP","RTSP","SDP","RTMP/RTMPS","HLS","MMS"}; + + public static SECURITY_EVENT_LOG getSecurityEventLog(int messageId, Long commonLogId){ + //基础属性 + SECURITY_EVENT_LOG security_EVENT_log = (SECURITY_EVENT_LOG)getCommonData(new SECURITY_EVENT_LOG(), commonLogId); + //http协议属性 + security_EVENT_log = (SECURITY_EVENT_LOG) getHttpData(security_EVENT_log); + //mail协议属性 + security_EVENT_log = (SECURITY_EVENT_LOG) getMailData(security_EVENT_log); + //DNS协议属性 + security_EVENT_log =(SECURITY_EVENT_LOG) getDnsData(security_EVENT_log,messageId); + //SSL协议属性 + security_EVENT_log = (SECURITY_EVENT_LOG) getSslData(security_EVENT_log); + //FTP协议属性 + security_EVENT_log = (SECURITY_EVENT_LOG) getFtpData(security_EVENT_log); + //BGP协议属性 + security_EVENT_log = (SECURITY_EVENT_LOG) getBgpData(security_EVENT_log); + //VOIP协议属性 + security_EVENT_log = (SECURITY_EVENT_LOG) getVoipData(security_EVENT_log); + //STREAMING_MEDIA协议属性 + security_EVENT_log = (SECURITY_EVENT_LOG) getStreamingMediaData(security_EVENT_log); + return security_EVENT_log; + } + public static CONNECTION_RECORD_LOG getConnectionRecordLog(int messageId, Long commonLogId){ + //基础属性 + CONNECTION_RECORD_LOG connection_record_log = (CONNECTION_RECORD_LOG)getCommonData(new CONNECTION_RECORD_LOG(), commonLogId); + //http协议属性 + connection_record_log = (CONNECTION_RECORD_LOG) getHttpData(connection_record_log); + //mail协议属性 + connection_record_log = (CONNECTION_RECORD_LOG) getMailData(connection_record_log); + //DNS协议属性 + connection_record_log =(CONNECTION_RECORD_LOG) getDnsData(connection_record_log,messageId); + //SSL协议属性 + connection_record_log = (CONNECTION_RECORD_LOG) getSslData(connection_record_log); + //FTP协议属性 + connection_record_log = (CONNECTION_RECORD_LOG) getFtpData(connection_record_log); + //BGP协议属性 + connection_record_log = (CONNECTION_RECORD_LOG) getBgpData(connection_record_log); + //VOIP协议属性 + connection_record_log = (CONNECTION_RECORD_LOG) getVoipData(connection_record_log); + //STREAMING_MEDIA协议属性 + connection_record_log = (CONNECTION_RECORD_LOG) getStreamingMediaData(connection_record_log); + return connection_record_log; + } + public static PROXY_EVENT_LOG getProxyEventLog(Long commonLogId){ + PROXY_EVENT_LOG proxy_EVENT_log = (PROXY_EVENT_LOG)getCommonData(new PROXY_EVENT_LOG(), commonLogId); + proxy_EVENT_log = (PROXY_EVENT_LOG) getHttpData(proxy_EVENT_log); + return proxy_EVENT_log; + } + public static RADIUS_RECORD_LOG getRadiusRecordLog(Long commonLogId){ + RADIUS_RECORD_LOG _radius_record_log = (RADIUS_RECORD_LOG)getCommonData(new RADIUS_RECORD_LOG(), commonLogId); + _radius_record_log = (RADIUS_RECORD_LOG)getRadiusData(_radius_record_log); + return _radius_record_log; + } + + + public static CommonLog getStreamingMediaData(CommonLog commonLog){ + //节目访问地址 + commonLog.setStreaming_media_url(GetLogFieldDataUtil.makeUrlData()); + //传输协议 + commonLog.setStreaming_media_protocol(streamingMediaProtocols[new Random().nextInt(streamingMediaProtocols.length)]); + return commonLog; + } + public static CommonLog getDnsData(CommonLog commonLog, int messageId){ + //消息ID标示 + commonLog.setDns_message_id(messageId); + //查询/响应标志 0:查询,1:响应 + commonLog.setDns_qr(new Random().nextInt(2)); + //请求类型 + commonLog.setDns_opcode(dnsOpcodes[new Random().nextInt(dnsOpcodes.length)]); + //标示响应该消息的域名服务器是该域中的权威域名服务器 + commonLog.setDns_aa(new Random().nextInt(2)); + //是否因为长度超过UDP数据包的标准长度512字节 + commonLog.setDns_tc(new Random().nextInt(2)); + //是否递归查询 + commonLog.setDns_rd(new Random().nextInt(2)); + //DNS域名服务器是否支持递归查询 + commonLog.setDns_ra(new Random().nextInt(2)); + //响应消息的类型 + commonLog.setDns_rcode(new Random().nextInt(10)); + //问题记录数 + commonLog.setDns_qdcount(new Random().nextInt(100)); + //回答记录数 + commonLog.setDns_ancount(new Random().nextInt(100)); + //授权记录数 + commonLog.setDns_nscount(new Random().nextInt(100)); + //附加记录数 + commonLog.setDns_arcount(new Random().nextInt(100)); + //查询内容 + commonLog.setDns_qname(GetLogFieldDataUtil.makeDomain(GetLogFieldDataUtil.makeUrlData())); + //查询类型 + commonLog.setDns_qtype(new Random().nextInt(10)); + //查询类 + commonLog.setDns_qclass(new Random().nextInt(10)); + //真实名称记录 + commonLog.setDns_cname(GetLogFieldDataUtil.makeRandomString(50)+10); + //是否域名系统安全扩展 1:dns;2:dnssec + commonLog.setDns_sub(new Random().nextInt(3)); + //应答资源记录集合 json + commonLog.setDns_rr(GetLogFieldDataUtil.makeDnsRr()); + return commonLog; + } + public static CommonLog getFtpData(CommonLog commonLog){ + //FTP链接 + commonLog.setFtp_url("ftp://test:test@"+ GetLogFieldDataUtil.makeIPv4RandomClient()+"/soft/list.txt"); + //FTP内容 + commonLog.setFtp_content(""); + return commonLog; + } + public static CommonLog getVoipData(CommonLog commonLog){ + //主叫VOIP账号 + commonLog.setVoip_calling_account(GetLogFieldDataUtil.makeVoipCallAccount()); + //被叫VOIP账号 + commonLog.setVoip_called_account(GetLogFieldDataUtil.makeVoipCallAccount()); + //VOIP主叫电信号码 + commonLog.setVoip_calling_number(GetLogFieldDataUtil.makeVoipCallNumber()); + //VOIP被叫电信号码 + commonLog.setVoip_called_number(GetLogFieldDataUtil.makeVoipCallNumber()); + return commonLog; + } + public static CommonLog getHttpData(CommonLog commonLog){ + //访问url + commonLog.setHttp_url(GetLogFieldDataUtil.makeUrlData()); + //主机地址 + commonLog.setHttp_host(GetLogFieldDataUtil.makeHost(commonLog.getHttp_url())); + //域名 补全 + //commonLog.setHttp_domain(GetLogFieldDataUtil.makeHost(proxy_policy_log.getHttp_url())); + //请求行 + commonLog.setHttp_request_line(""); + //应答行 + commonLog.setHttp_response_line(""); + //原始请求头 + commonLog.setHttp_request_header(""); + //原始应答头 + commonLog.setHttp_response_header(""); + //原始请求体 + commonLog.setHttp_request_body(""); + //原始应答体 + commonLog.setHttp_response_body(""); + //请求体转储文件KEY + commonLog.setHttp_request_body_key(""); + //应答体转储文件KEY + commonLog.setHttp_response_body_key(""); + //HTTP代理标识 + commonLog.setHttp_proxy_flag(new Random().nextInt(10)); + //HTTP会话序列号 + commonLog.setHttp_sequence(new Random().nextInt(10)); + //现场片段快照 + commonLog.setHttp_snapshot(""); + //Cookie值 + commonLog.setHttp_cookie(cookies[new Random().nextInt(cookies.length)]); + //Referer值 + commonLog.setHttp_referer(""); + //用户代理 + commonLog.setHttp_user_agent(""); + //HTTP内容长度 + commonLog.setHttp_content_length(String.valueOf(new Random().nextInt(39000)+10000)); + //HTTP内容类型 + commonLog.setHttp_content_type(httpContentType[new Random().nextInt(httpContentType.length)]); + //Set-Cookie值 + commonLog.setHttp_set_cookie(""); + //应用协议类型 + commonLog.setHttp_version(httpVersion[new Random().nextInt(httpVersion.length)]); + return commonLog; + } + public static CommonLog getSslData(CommonLog commonLog){ + //SSL版本信息 + commonLog.setSsl_version(sslVersions[new Random().nextInt(sslVersions.length)]); + //服务器名称指示 + commonLog.setSsl_sni(GetLogFieldDataUtil.makeDomain(GetLogFieldDataUtil.makeUrlData())); + //SSL多域名(SAN) + commonLog.setSsl_san(""); + //SSL通用名称 + commonLog.setSsl_cn(""); + //pinning状态 0-not pinning,1-pinning,2-maybe pinning + commonLog.setSsl_pinningst(new Random().nextInt(3)); + //拦截状态 0-passthrough, 1-intercept, 2-shutdown + commonLog.setSsl_intercept_state(new Random().nextInt(3)); + //服务器侧ssl建立延迟 + commonLog.setSsl_server_side_latency(new Random().nextInt(10000)+100); + //客户端侧ssl建立延迟 + commonLog.setSsl_client_side_latency(new Random().nextInt(10000)+100); + //服务器侧ssl版本 + commonLog.setSsl_server_side_version(sslSideVersions[new Random().nextInt(sslSideVersions.length)]); + //客户端侧ssl版本 + commonLog.setSsl_client_side_version(sslSideVersions[new Random().nextInt(sslSideVersions.length)]); + //证书校验结果 0-校验不通过,1-校验通过 + commonLog.setSsl_cert_verify(new Random().nextInt(2)); + //ssl错误信息 + commonLog.setSsl_error(""); + //握手延迟 + commonLog.setSsl_con_latency_ms(new Random().nextInt(50)); + return commonLog; + } + public static CommonLog getMailData(CommonLog commonLog){ + //邮件协议类型 + commonLog.setMail_protocol_type(mailProtocolTypes[new Random().nextInt(mailProtocolTypes.length)]); + //发件人邮箱 + commonLog.setMail_sender(GetLogFieldDataUtil.makeMail()); + //收件人邮箱 + commonLog.setMail_receiver(GetLogFieldDataUtil.makeMail()); + //邮件主题 + commonLog.setMail_subject(mailSubject[new Random().nextInt(mailSubject.length)]); + //邮件正文 + commonLog.setMail_content(""); + //邮件附件名 + commonLog.setMail_attachment_name(""); + //邮件附件内容 + commonLog.setMail_attachment_content(""); + //邮件EML文件 + commonLog.setMail_eml_file(""); + //现场片段快照 + commonLog.setMail_snapshot(""); + return commonLog; + } + public static CommonLog getBgpData(CommonLog commonLog){ + //消息类型 1:open(打开消息) 2:keepalive(存活消息) 3:update(更新消息) 4:notification(报错消息) + commonLog.setBgp_type(new Random().nextInt(4)+1); + //自治系统号 + commonLog.setBgp_as_num(bgpAsNums[new Random().nextInt(bgpAsNums.length)]); + //路由信息 + commonLog.setBgp_route("192.168."+(new Random().nextInt(253)+1)+".0"+"/24"); + return commonLog; + } + public static CommonLog getRadiusData(CommonLog commonLog){ + //报文类型 + commonLog.setRadius_packet_type(new Random().nextInt(RadiusPacketTypes.length)); + //ISN接入的IP + commonLog.setRadius_nas_ip(GetLogFieldDataUtil.makeIPv4Data()); + //服务器下发的用户地址 + commonLog.setRadius_framed_ip(GetLogFieldDataUtil.makeIPv4Data()); + //用户名 + commonLog.setRadius_account(GetLogFieldDataUtil.makeRandomString(5)); + //用户提供服务的剩余时间 + commonLog.setRadius_session_timeout(new Random().nextInt(120000)+180000); + //用户持续空闲的最大时间 + commonLog.setRadius_idle_timeout(new Random().nextInt(1800000)+600000); + //计费请求报文类型 + commonLog.setRadius_acct_status_type(new Random().nextInt(5)+1); + //用户连接中断的原因 + commonLog.setRadius_acct_terminate_cause(new Random().nextInt(5)+1); + return commonLog; + } + public static CommonLog getCommonData(CommonLog commonLog, Long commonLogId){ + //日志id 补全 + //commonLog.setCommon_log_id(commonLogId); + //业务类型 + commonLog.setCommon_service(new Random().nextInt(11) + 1); + //接收时间 补全 +// commonLog.setCommon_recv_time((int) (System.currentTimeMillis() / 1000));//测试 + //传输方向 0或1 + commonLog.setCommon_direction(new Random().nextInt(2)); + //协议类型 + commonLog.setCommon_l4_protocol(commonL4Protocols[new Random().nextInt(commonL4Protocols.length)]); + if (commonLog.getCommon_l4_protocol().equals("IPv6_TCP") + || commonLog.getCommon_l4_protocol().equals("IPv6_UDP") + || commonLog.getCommon_l4_protocol().equals("IPv6")) { + commonLog.setCommon_address_type(6); + commonLog.setCommon_client_ip(GetLogFieldDataUtil.makeIPv6Data()); + commonLog.setCommon_server_ip(GetLogFieldDataUtil.makeIPv6Data()); + if (commonLog.getCommon_server_ip().equals(commonLog.getCommon_client_ip())) { + String[] IPv6Datas = RealtimeCountConfig.IPV6_DATAS.split(","); + for (String iPv6Data : IPv6Datas) { + if (!commonLog.getCommon_server_ip().equals(iPv6Data.trim())) { + commonLog.setCommon_client_ip(iPv6Data.trim()); + } + } + } + }else { + commonLog.setCommon_address_type(4); + commonLog.setCommon_client_ip(GetLogFieldDataUtil.makeIPv4Data()); + commonLog.setCommon_server_ip(GetLogFieldDataUtil.makeIPv4Data()); +// commonLog.setCommon_client_ip(GetLogFieldDataUtil.makeIPv4RandomServer());//用于测试 +// commonLog.setCommon_server_ip(GetLogFieldDataUtil.makeIPv4RandomClient());//用于测试 + if (commonLog.getCommon_server_ip().equals(commonLog.getCommon_client_ip())) { + String[] IPv4Datas = RealtimeCountConfig.IPV4_DATAS.split(","); + for (String iPv4Data : IPv4Datas) { + if (!commonLog.getCommon_server_ip().equals(iPv4Data.trim())) { + commonLog.setCommon_client_ip(iPv4Data.trim()); + } + } + } + } + //协议类型 + commonLog.setCommon_schema_type(commonSchemaTypes[new Random().nextInt(commonSchemaTypes.length)]); + //策略id + commonLog.setCommon_policy_id(new Random().nextInt(10)+1);//测试 + //标签 + commonLog.setCommon_user_tags(GetLogFieldDataUtil.makeRandomString(100)); + //动作 + commonLog.setCommon_action(commonActions[new Random().nextInt(commonActions.length)]); + //用户自定义域 + commonLog.setCommon_user_region(GetLogFieldDataUtil.makeRandomString(100)); + + commonLog.setCommon_client_port(new Random().nextInt(65534) + 1); + commonLog.setCommon_server_port(serverPorts[new Random().nextInt(serverPorts.length)]); + if (commonLog.getCommon_server_port() == commonLog.getCommon_client_port()) { + commonLog.setCommon_client_port(new Random().nextInt(65534) + 1); + if (commonLog.getCommon_server_port() == commonLog.getCommon_client_port()) { + commonLog.setCommon_client_port(new Random().nextInt(65534) + 1); + if (commonLog.getCommon_client_port() == commonLog.getCommon_client_port()) { + commonLog.setCommon_client_port(new Random().nextInt(65534) + 1); + } + } + } + //出入口编号 + commonLog.setCommon_entrance_id(new Random().nextInt(20) + 1); + //设备编号 + commonLog.setCommon_device_id(String.valueOf(new Random().nextInt(5000000)+1));//本字段为默认1,,填入随机百万的数值用于压力测试 + //设备链路 + commonLog.setCommon_link_id(1); + //运营商 + commonLog.setCommon_isp(isps[new Random().nextInt(isps.length)]); + //原始二层封装格式 + commonLog.setCommon_encapsulation(common_encapsulations[new Random().nextInt(common_encapsulations.length)]); + //处理机IP + commonLog.setCommon_sled_ip(192+"."+168+"."+10+"."+(new Random().nextInt(253)+1)); + //客户端地址定位信息 补全 + //commonLog.setCommon_client_location(); + //客户端ASN 补全 + //commonLog.setCommon_client_asn(); + //客户端用户名 补全 + //commonLog.setCommon_subscriber_id(); + //服务端地址定位信息 补全 + //commonLog.setCommon_server_location(); + //服务端ASN 补全 + //commonLog.setCommon_server_asn(); + //特征标签 + commonLog.setCommon_app_label(""); + //app id 补全 + //commonLog.setCommon_app_id(new Random().nextInt(20)+1); + //应用层协议 补全 + //commonLog.setCommon_protocol_id(new Random().nextInt(6) + 1); + commonLog.setCommon_c2s_pkt_num(new Random().nextInt(30)); + if (commonLog.getCommon_c2s_pkt_num() == 0) { + commonLog.setCommon_s2c_pkt_num(new Random().nextInt(30) + 1); + commonLog.setCommon_c2s_byte_num(0); + commonLog.setCommon_s2c_byte_num(new Random().nextInt(10000) + 100); + } else { + commonLog.setCommon_s2c_pkt_num(new Random().nextInt(30)); + commonLog.setCommon_c2s_byte_num((new Random().nextInt(10000) + 100)); + if (commonLog.getCommon_s2c_pkt_num() == 0) { + commonLog.setCommon_s2c_byte_num(0); + } else { + commonLog.setCommon_s2c_byte_num(new Random().nextInt(10000) + 100); + } + } + //会话创建时间 + commonLog.setCommon_start_time(((int) (System.currentTimeMillis() / 1000)) - (new Random().nextInt(60) + 5)); + //会话结束时间 + commonLog.setCommon_end_time((int) (System.currentTimeMillis() / 1000)); + //通信时长 + commonLog.setCommon_con_duration_ms(new Random().nextInt(180000) + 10000); + //流类型 1:c2s 2:s2c 3:double + commonLog.setCommon_stream_dir(new Random().nextInt(3) + 1); + //嵌套地址列表 可空 + commonLog.setCommon_address_list(""); + //是否有重复流量 0:没有 1:有 + commonLog.setCommon_has_dup_traffic(new Random().nextInt(1)+1); + //异常流的种类 + commonLog.setCommon_stream_error(""); + //流的追踪ID + commonLog.setCommon_stream_trace_id(new Random().nextLong()); + return commonLog; + } +} diff --git a/src/main/java/cn/ac/iie/utils/GetLogFieldDataUtil.java b/src/main/java/cn/ac/iie/utils/GetLogFieldDataUtil.java new file mode 100644 index 0000000..6d01c4c --- /dev/null +++ b/src/main/java/cn/ac/iie/utils/GetLogFieldDataUtil.java @@ -0,0 +1,208 @@ +package cn.ac.iie.utils; + +import cn.ac.iie.common.RealtimeCountConfig; +import cn.ac.iie.producer.TSGProducer; +import com.alibaba.fastjson.JSONObject; +import org.apache.log4j.Logger; + +import java.io.UnsupportedEncodingException; +import java.math.BigInteger; +import java.net.Inet4Address; +import java.net.Inet6Address; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.Arrays; +import java.util.Random; + +public class GetLogFieldDataUtil { + private static final Logger logger = Logger.getLogger(TSGProducer.class); + + public static String makeAppLabel() { + Random random = new Random(); + String[] appProtoDatas = {"http1", "http2"}; + String appProtoData = appProtoDatas[random.nextInt(appProtoDatas.length)]; + return appProtoData; + } + /** + * 根据配置文件内容获取policy_id + * @param pzPolicyId + * @return + */ + public static int getPolicyId(String pzPolicyId) { + Random random = new Random(); + if (pzPolicyId.contains(",")){ + String[] policyIds = pzPolicyId.split(","); + int policyIdOne = Integer.parseInt(policyIds[random.nextInt(policyIds.length)]); + return policyIdOne; + }else { + int policyId = Integer.parseInt(pzPolicyId); + return policyId; + } + } + + //随机生成ip + public static String makeIPv4Random() { + Random random = new Random(); + int v4_1 = new Random().nextInt(255) + 1; + int v4_2 = new Random().nextInt(255); + int v4_3 = new Random().nextInt(255); + int v4_4 = new Random().nextInt(255); + return v4_1 + "." + v4_2 + "." + v4_3 + "." + v4_4; + } + + public static String makeIPv6Data() { + Random random = new Random(); + String[] IPv6Datas =RealtimeCountConfig.IPV6_DATAS.split(","); + String IPv6Data = IPv6Datas[random.nextInt(IPv6Datas.length)].trim(); + return IPv6Data; + } + + public static String makeIPv4Data() { + Random random = new Random(); + String[] IPv4Datas = RealtimeCountConfig.IPV4_DATAS.split(","); + String IPv4Data = IPv4Datas[random.nextInt(IPv4Datas.length)].trim(); + return IPv4Data; + } + + //随机制造client_ip + public static String makeIPv4RandomClient() { + Random random = new Random(); +// int v4_1 = new Random().nextInt(255) + 1; +// int v4_2 = new Random().nextInt(255); +// int v4_3 = new Random().nextInt(255); +// int v4_4 = new Random().nextInt(255); + int v4_1 = new Random().nextInt(60) + 70; + int v4_2 = new Random().nextInt(60) + 80; + int v4_3 = new Random().nextInt(60) + 50; + int v4_4 = new Random().nextInt(60) + 150; + return v4_1 + "." + v4_2 + "." + v4_3 + "." + v4_4; + } + + //随机制造Server_ip + public static String makeIPv4RandomServer() { + int v4_1 = 122; + int v4_2 = 101; + int v4_3 = new Random().nextInt(255); + int v4_4 = new Random().nextInt(255); + return v4_1 + "." + v4_2 + "." + v4_3 + "." + v4_4; + } + + public static String makeUrlData() { + Random random = new Random(); + String[] urlDatas = RealtimeCountConfig.URL_DATAS.split(","); + String urlData = urlDatas[random.nextInt(urlDatas.length)].trim() + new Random().nextInt(200000) + 1; + return urlData; + } + + public static String makeHost(String url) { + if (url.contains("http")) { + String[] splitHttp = url.split("//"); + String[] splitWwwWtihCom = splitHttp[1].split("/"); + return splitWwwWtihCom[0] + new Random().nextInt(10000) + 1; + } else { + if(url.contains(":")){ + String[] splitNoHttp = url.split("/"); + String[] splitNoPort = splitNoHttp[0].split(":"); + return splitNoPort[0] + new Random().nextInt(10000) + 1; + }else { + String[] splitNoHttp = url.split("/"); + return splitNoHttp[0] + new Random().nextInt(10000) + 1; + } + } + } + + public static String makeDomain(String url) { + if (url.contains("http")) { + String[] hostArr = url.split("//")[1].split("/")[0].split("\\."); + return hostArr[hostArr.length-2]+"."+hostArr[hostArr.length-1] + new Random().nextInt(5000000) + 1; + } else { + if(url.contains(":")){ + String[] hostArr = url.split("/")[0].split(":")[0].split("\\."); + if(hostArr.length<=2){ + return hostArr[0]+"."+hostArr[1] + new Random().nextInt(5000000) + 1; + }else{ + return hostArr[hostArr.length-2]+"."+hostArr[hostArr.length-1] + new Random().nextInt(5000000) + 1; + } + }else { + String[] hostArr = url.split("/")[0].split("\\."); + if(hostArr.length<=2){ + return hostArr[0]+"."+hostArr[1] + new Random().nextInt(5000000) + 1; + }else{ + return hostArr[hostArr.length-2]+"."+hostArr[hostArr.length-1] + new Random().nextInt(5000000) + 1; + } + } + } + } + + public static String makeMail(){ + String base = "abcdefghijklmnopqrstuvwxyz0123456789"; + String[] email_suffix = "@gmail.com,@yahoo.com,@msn.com,@hotmail.com,@aol.com,@ask.com,@live.com,@qq.com,@0355.net,@163.com,@163.net,@263.net,@3721.net,@yeah.net,@googlemail.com,@126.com,@sina.com,@sohu.com,@yahoo.com.cn".split(","); + int length = new Random().nextInt(11 - 3 + 1)+3; + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < length; i++) { + int number = new Random().nextInt(base.length()); + sb.append(base.charAt(number)); + } + sb.append(email_suffix[(new Random().nextInt(email_suffix.length))]); + return sb.toString(); + } + + public static String makeRandomString(int length){ + String str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + Random random=new Random(); + StringBuffer sb=new StringBuffer(); + for(int i=0;i%n + +# ļ־ +log4j.appender.file=org.apache.log4j.DailyRollingFileAppender +#log4j.appender.file.Threshold=error +log4j.appender.file.Threshold=info +log4j.appender.file.encoding=UTF-8 +log4j.appender.file.Append=true +#··زӦĿ +#log4j.appender.file.file=${nis.root}/log/galaxy-name.log +log4j.appender.file.file=log/tsg-log-process.log +log4j.appender.file.DatePattern='.'yyyy-MM-dd +log4j.appender.file.layout=org.apache.log4j.PatternLayout +#log4j.appender.file.layout.ConversionPattern=%d{HH:mm:ss} %X{ip} [%t] %5p %c{1} %m%n +log4j.appender.file.layout.ConversionPattern=[%d{yyyy-MM-dd HH\:mm\:ss}] [%-5p] %X{ip} [Thread\:%t] %l %x - %m%n +#MyBatis ãcom.nis.web.daomybatisӿڰ +log4j.logger.com.nis.web.dao=debug +#bonecpԴ +log4j.category.com.jolbox=debug,console \ No newline at end of file diff --git a/src/main/resources/realtime_count_config.properties b/src/main/resources/realtime_count_config.properties new file mode 100644 index 0000000..a31a173 --- /dev/null +++ b/src/main/resources/realtime_count_config.properties @@ -0,0 +1,44 @@ +#管理kafka地址 +bootstrap.servers=192.168.40.119:9092,192.168.40.122:9092,192.168.40.123:9092 +#bootstrap.servers=192.168.40.152:9092 +#bootstrap.servers=192.168.1.1:9092 +#bootstrap.servers=192.168.40.224:9092 + +#RADIUS采集日志 +kafka.rrl.topic=RADIUS-RECORD-LOG +#通联采集日志 +kafka.crl.topic=CONNECTION-RECORD-LOG +#安全策略日志 +kafka.sel.topic=SECURITY-EVENT-LOG +#代理策略日志 +kafka.pel.topic=PROXY-EVENT-LOG + +speed.num=10 +sleep.num=999 +insert.num=50000 +#kafka压缩形式,none,snappy +custom.compression.type=none +#从kafka哪里开始读:earliest/latest +auto.offset.reset=latest + +common.policy.id=0,1,2,3,4,5,6 +IPV4Datas=220.181.50.55, 31.152.103.244, 182.50.114.226,182.61.180.90, 106.38.3.140, 60.247.81.34, 101.198.192.11,220.243.135.34, 183.198.24.236, 118.144.139.218, 203.119.241.54,220.243.136.111, 223.88.59.165, 133.7.189.183, 119.28.131.235,111.11.11.148, 124.64.199.231, 219.147.52.196, 188.16.104.39,205.204.117.131, 47.88.236.38, 203.119.241.54, 1.197.249.183,111.56.62.235, 47.75.59.121, 123.52.32.3, 47.88.236.39,14.136.107.230, 117.136.106.50, 111.90.185.146, 124.156.108.101,122.49.28.46, 183.202.244.163, 185.176.26.111, 136.228.148.47,211.139.181.218, 223.104.15.34, 120.200.79.71, 223.104.14.148,103.73.167.195, 39.104.140.107, 179.82.236.131, 124.64.199.231,89.33.124.67, 220.181.125.23, 205.204.117.131, 62.210.101.44,220.181.125.23, 223.104.15.101, 221.181.49.180, 223.104.27.191,123.151.77.71, 123.185.128.78, 166.62.10.28, 112.8.62.19,183.227.151.7, 120.208.6.163, 124.127.181.52, 97.74.106.27,60.254.173.204, 198.51.45.71, 223.89.10.214, 223.119.237.58,170.248.227.100, 104.211.166.108, 112.40.217.178, 123.56.223.108,183.84.6.87, 14.1.112.21, 119.28.28.28, 149.20.64.28, 36.110.220.15,19.28.28.28, 118.26.252.147, 183.84.5.92, 17.173.66.180, 36.99.30.142,124.206.192.16, 47.52.28.111, 185.209.85.222, 101.231.201.6,223.202.108.49, 194.145.144.27, 104.236.116.147, 104.211.166.108,183.177.72.202, 120.92.91.106, 161.117.98.151, 125.88.24.34,60.254.173.204, 223.72.47.94, 47.90.104.105, 39.105.128.254,117.187.233.61, 103.71.238.146, 104.75.165.20, 198.97.190.53,104.202.122.108, 103.218.241.181, 47.75.106.69, 219.142.71.3,04.194.66.194, 185.209.85.222, 192.36.144.22, 112.16.205.189,185.209.85.222, 223.119.222.187, 118.26.252.147, 106.120.83.138,121.54.163.107, 39.149.251.60, 14.1.112.22, 23.57.114.211, 47.52.11.194,52.68.132.5, 219.142.91.127, 111.13.141.189, 60.254.173.205, 47.74.239.59,211.138.13.239, 52.164.201.186, 183.84.6.87, 123.183.150.123,111.44.231.125, 172.68.46.51, 222.223.102.3, 203.205.146.46, 183.84.6.87,17.173.66.103, 148.66.49.123, 159.138.33.172, 119.28.28.28,60.254.173.204, 192.36.144.22, 203.205.220.26, 118.26.252.147,192.48.79.30, 154.215.113.110, 47.93.45.229, 182.204.191.75, 223.88.90.55,47.91.215.234, 218.203.160.44, 117.179.192.47, 47.88.236.38, 117.179.240.39,1.199.247.85, 106.120.89.196, 205.204.117.131, 47.52.251.99, 117.136.36.171,124.251.57.93, 39.98.178.103, 117.136.5.50, 58.114.189.58, 64.71.148.171, 223.89.81.99,118.145.2.155, 150.109.107.206, 182.200.22.6, 220.181.108.85, 203.119.241.58, 117.132.197.154,183.198.5.205, 103.255.47.29, 211.138.19.146, 120.242.248.150, 185.31.114.181, 111.43.136.54,105.84.162.5, 111.18.113.221, 103.136.179.74, 112.41.91.22, 144.48.221.76, 106.38.0.69, 111.49.68.55,117.50.94.151, 117.190.50.130, 43.255.114.52, 49.7.45.29, 123.168.4.106, 47.88.236.187, 117.148.137.83,106.39.190.130, 86.132.146.100, 221.120.162.23, 211.139.80.12, 223.104.16.123, 223.220.161.102, 112.5.241.179,111.41.214.44, 47.244.139.125, 183.202.51.133, 103.67.23.47, 106.11.212.14, 205.204.104.207, 1.195.38.130,221.131.47.36, 47.88.236.38, 222.88.224.218, 114.64.253.37, 1.194.234.5, 106.10.133.183, 111.26.36.117,74.125.46.4, 183.199.56.35, 183.202.163.143, 106.2.12.27, 106.13.103.158, 47.88.236.39, 223.104.27.223,223.104.185.76, 117.114.0.143, 120.243.67.245, 182.203.218.51, 47.88.236.38, 60.221.220.85, 223.104.102.213,223.81.192.68, 123.161.116.146, 112.14.98.219, 1.68.72.90, 39.149.10.10, 47.75.28.103, 183.198.134.90,77.247.109.191, 120.198.197.117, 117.157.38.135, 114.116.73.245, 219.147.90.93, 220.243.136.143, 47.88.236.38,212.178.135.62, 117.136.5.30, 202.95.11.99, 117.157.163.54, 183.198.55.142, 120.244.59.131, 42.90.212.107,223.104.178.219, 47.89.41.97, 221.180.218.75, 111.112.238.4, 120.239.197.74, 223.104.190.67, 76.109.88.239,123.55.57.197, 110.164.252.94, 36.96.212.139, 218.203.112.6, 39.98.178.103, 183.198.46.122, 103.194.100.70,207.174.213.34, 111.40.85.138, 45.195.6.110, 123.162.185.54, 223.104.238.63, 123.103.49.178, 220.243.222.27,106.11.217.93, 111.60.236.148, 173.248.224.199, 106.10.133.157, 49.4.6.129, 122.114.191.167, 114.220.110.28,49.51.244.118, 112.6.115.41, 1.180.16.123, 112.39.1.66, 223.116.33.158, 114.116.73.245, 219.232.48.61,101.230.200.173, 117.154.74.94, 111.12.202.62, 106.120.89.212, 154.223.147.100, 221.179.155.116, 185.21.216.135,106.117.109.143, 123.172.16.19, 47.74.129.244, 123.151.76.158, 47.88.236.38, 118.85.128.5, 117.114.0.143,223.104.3.197, 106.120.89.219, 183.220.150.127, 110.16.72.218, 100.50.157.99, 220.181.108.115, 210.128.97.87,106.119.182.202, 60.247.104.198, 111.1.59.63, 123.254.111.42, 179.158.134.156, 120.239.177.226, 112.41.4.254,219.148.204.117, 117.191.13.251, 49.7.3.95, 112.156.160.230, 194.67.211.222, 42.92.35.163, 117.136.0.255,47.218.106.163, 223.104.108.61, 47.88.236.38, 47.88.236.39, 192.253.252.109, 111.20.192.210, 183.203.37.150,192.168.13.90, 159.65.6.85, 47.75.173.189, 111.63.54.103, 106.120.89.204, 203.119.196.187, 211.138.19.148,111.11.11.234, 111.14.104.92, 49.7.3.235, 183.200.166.69, 223.111.139.203, 223.104.254.69, 77.247.109.190,49.7.4.1, 211.138.19.93, 223.88.81.163, 111.12.202.62, 47.88.236.39, 49.7.6.171, 106.120.89.203, 71.6.143.92,183.199.114.142, 47.88.217.235, 49.7.3.237, 47.244.105.253, 106.11.213.19, 203.208.60.95, 106.11.214.228,111.13.32.14, 106.38.0.108, 118.85.128.4, 115.132.161.238, 47.88.236.38, 182.92.16.70, 223.104.3.173,47.88.236.39, 120.221.144.159, 114.118.10.119, 1.83.28.212, 47.88.236.39, 193.200.150.82, 125.39.207.20,183.205.128.164, 220.243.135.133, 111.30.222.252, 183.202.126.236, 218.200.73.67, 203.208.60.102, 111.26.26.162,111.41.53.70, 222.222.202.221, 203.119.193.158, 117.136.36.243, 203.119.196.85, 111.13.124.202,47.88.236.38, 112.28.186.82, 39.129.16.207, 154.223.147.100, 107.150.118.82, 74.125.190.140, 154.8.219.207,106.120.89.196, 47.88.236.38, 211.162.62.61, 47.88.236.39, 171.12.140.175, 111.34.179.156, 43.254.3.202,123.207.141.129, 118.182.188.179, 117.136.44.231, 103.73.165.77, 119.28.193.188, 49.7.3.238, 106.10.133.167,163.158.120.67, 47.88.236.38, 106.38.1.119, 171.223.175.183, 117.136.44.199, 111.202.100.100, 117.136.94.61,124.207.174.197, 47.88.236.39, 154.73.180.123, 203.119.132.228, 2.142.58.94, 47.52.251.99, 185.21.216.132,47.88.236.38, 106.38.0.76, 62.6.52.133, 188.253.231.175, 49.7.4.125, 36.157.146.111, 117.177.169.27,202.36.54.179, 45.195.6.36, 123.151.77.132, 123.207.141.129, 219.142.17.34, 106.120.185.71, 39.107.28.187,47.52.251.99, 112.42.94.31, 223.114.246.140, 74.125.47.135, 116.6.28.13, 203.119.136.6, 59.47.37.182,123.150.182.197, 39.59.52.133, 36.97.185.255, 39.105.242.159, 114.118.4.105, 211.162.62.61, 59.108.61.61,117.136.5.29, 117.164.60.167, 106.120.89.203, 218.203.101.29, 120.243.67.245, 39.186.77.77,140.143.207.44, 123.177.47.252, 211.137.50.53, 218.203.101.39, 162.178.13.127, 223.104.30.27,185.200.118.46, 118.181.175.77, 223.114.245.3, 117.136.2.133, 36.104.109.150, 106.120.89.220,47.88.236.38, 202.58.99.150, 114.116.73.245, 83.140.54.4, 58.41.134.187, 60.247.127.212 +IPV6Datas=2001:470:19:790::24,2001:470:19:790::38,2001:470:20::2,2001:470:19:acb:2::14,2001:4860:4860::8844, 2001:470:19:acb:1::130,2001:4860:4860::8888, 2001:470:19:790::41,2001:470:19:790::7f, 2001:470:19:acb:1::36 +urlDatas=checkip.dyndns.org/,www.diediao.net/Tpl/b/images/lazyload.gif ,tlc3022.com:443/cl/upupFlash.php?19113=22794 ,m.yq6.cc/b_58950/8198258.html ,www.goodpic.cc/nh.asp?sid=4992 ,m.yingshidaquan.com/vod-show-id-2-order-hits.html ,www.138988.com/wxbbs/css/jquery-weui.min.css ,zongbobbs.com/favicon.ico ,www.827w.com/favicon.ico ,zanghuage.cc/static/image/common/fastreply.gif ,www.sehuatang.org/uc_server/images/noavatar_middle.gif ,tlc3022.com:443/cl/upupFlash.php?29520=19916 ,www.2015.xxx/pc/ ,http://tv.sohu.com/20080504/n256652702.shtml ,http://v.sohu.com/20080428/n256554182.shtml ,http://my.tv.sohu.com/u/vw/1882940 ,http://v.ku6.com/show/F8h2_PiJDiEkcztx.html ,http://v.ku6.com/special/show_1737487/4Sh--twBV2Og66na.html ,http://www.meipai.com/media/548729473 ,http://sports.sina.com.cn/g/bn/2007-08-30/01364215.shtml ,http://video.sina.com.cn/ent/y/bn/2007-09-07/175220408.shtml ,http://ent.sina.com.cn/m/c/bn/2007-08-24/095619396.shtml ,http://eladies.sina.com.cn/fa/v/2007/0823/15051876.shtml ,http://blog.sina.com.cn/s/blog_4bba2f0601000bjk.html ,\ +http://www.56.com/u49/v_MTI4NDY2MzA.html ,http://www.56.com/w55/play_album-aid-3497210_vid-OTk2NjMwOA.html ,http://www.56.com/w55/play_album.phtml?aid=3497210&vid=OTk2OTQxNA ,http://news.163.com/08/1030/21/4PHL3SUL00011229.html ,http://ent.163.com/08/1124/10/4RGR98RU00032A6T.html ,\ +http://open.163.com/movie/2011/9/I/7/M7CTDM4AF_M7VLT57I7.html ,http://www.joy.cn/boke/videoBoke?resourceId=60236853 ,http://www.joy.cn/sport/videoSport?resourceId=60236937 ,http://www.joy.cn/special-page.jsp?zt=7 ,\ +http://www.letv.com/ptv/vplay/24607840.html ,http://www.wasu.cn/Play/show/id/7148873 ,http://www.baofeng.com/play/179/play-764679.html ,\ +http://www.baofeng.com/detail/227/detail-787227.html ,http://weibo.com/p/230444275371ca2a5d0b4799dfc23ab3a98d61 ,\ +http://www.miaopai.com/show/t~gB32Ha~0TyT3~Uju8bqQ__.htm ,http://v.xiaokaxiu.com/v/kPzSuadRd2ipEo82jk9~sA__.html ,\ +http://www.kaiyanapp.com/detail.html?vid=25348&utm_source=eyepetizer-homepage&utm_medium=internal&utm_campaign=routine ,\ +http://v.pps.tv/play_323QCL.html ,http://vod.kankan.com/v/90/90606.shtml ,http://www.tangdou.com/html/playlist/3867/3410580.html ,http://news.cntv.cn/china/20091227/101928.shtml ,\ +http://www.cctv.com/video/jingjibanxiaoshi/2008/09/jingjibanxiaoshi_300_20080919_1.shtml ,http://v.cctv.com/html/jingjibanxiaoshi/2008/09/jingjibanxiaoshi_300_20080919_1.shtml ,http://sports.cctv.com/20091104/100762.shtml?column=C22536 ,http://search.cctv.com/playVideo.php?qtext=%E7%9B%B8%E5%A3%B0%E5%A4%A7%E8%B5%9B&pid=p25822&title=%E7%AC%AC%E4%B8%83%E5%B1%8A%E5%85%A8%E5%9B%BD%E7%94%B5%E8%A7%86%E7%9B%B8%E5%A3%B0%E5%A4%A7%E8%B5%9B ,\ +http://v.ifeng.com/news/world/200811/a5a067f8-90d5-4368-a717-d1e70543dee1.shtml ,http://v.ifeng.com/e/200811/fe3dd05c-ed8f-4b76-ad2d-45325f64a068.shtml#3659b715-ec7b-4dbe-9df5-8182fc718f4e ,http://v.ifeng.com/v/s/20081212/2999/index.shtml#ef9216b6-5251-446a-b8cc-fcf99dd22696 ,http://v.ifeng.com/v/s/20081207/2934/index.shtml ,http://v.ifeng.com/special/jiaodianzhiji/maliqiang/index.shtml#8694d4be-0f8e-48fd-ab50-d23944b87d42 ,http://v.ifeng.com/special/weibo/index.shtml ,http://www.jsbc.com/v/c/ws/rj/201001/t20100126_38292.shtml ,http://www.jstv.com/c/cs/wjdh/201009/t20100909_194853.shtml ,\ +http://item.btime.com/news/208ghb52n99222hkgf89ciiqb59 ,http://life.gztv.com/2016/0725/41750.shtml ,http://tv.cztv.com/vplay/42569.html ,http://podcast.tvscn.com/podcast/podcastplay-335459.htm ,http://www.taihaitv.cn/20111118/108849.shtml ,http://www.s1979.com/news/china/lanzhou/201302/1976367319.shtml ,http://www.zjstv.com/dianbo/zy/thevoice/cvideo/2014/07/2014-07-26316231.html ,http://www.cutv.com/yule/2013-12-24/1387846144650.shtml ,http://v.iqilu.com/2012/04/08/3759391.shtml ,http://news.xinhuanet.com/video/2009-11/10/content_12423764.htm ,http://fenxiang.umiwi.com/2010/1216/12181.shtml ,http://i.mtime.com/2012/ ,http://movie.mtime.com/80706/trailer/22259.html ,\ +http://i.mtime.com/movietrailers/blog/2819456/ ,http://tv.v1.cn/mlszy/2011-3-4/1299131550159v.shtml ,http://v.v1.cn/tuijian/2011-3-4/129919792044.shtml ,http://shehui.v1.cn/sh/2011-1-27/1296096563463v.shtml ,http://miniv.v1.cn/mylist/tatopic.action?topicid=147890 ,http://v.v1.cn/vodplayer/content/303392.shtml ,http://v.zol.com.cn/video77303.html ,http://game.zol.com.cn/205/2054753.html ,http://tv.tom.com/App_User_Video.php%3Fvideo_id=2386 ,http://youku.soufun.com/video/VInfoDetail_7526989_0_12342983.htm ,http://www.hualu5.com/t/tyzhn/7120.html ,http://www.boosj.com/437049.html ,\ +http://video.baomihua.com/17223076/16945114 ,http://play.hupo.tv/tv/11130841.html ,http://www.ouou.com/jsp/index_mv.jsp?id=1238 ,http://union.bokecc.com/flash/pocle/player.swf?vid=E44D40C15E65EA30&siteid=CD0C5D3C8614B28B ,http://union.bokecc.com/playvideo.bo?vid=E44D40C15E65EA30&uid=CD0C5D3C8614B28B ,http://dv.ce.cn/video/2010/09/02/346845.html ,http://www.11688.net/programs/view-VLBKKo7GWV91MNCNb8Z0y1.htm ,http://www.cuctv.com/video/player_xMO2b_dBzUw.html ,http://art.china.cn/shipin/2009-06/04/content_2981815.htm ,http://v.zhiyin.cn/watch/295.html ,http://v.zhiyin.cn/Playlist/69/1.html ,http://msn.v1.cn/shehui/sh/2010-12-9/1291856176999v.shtml ,http://www.yiyi.cc/film1/10418/10418_2_1.html ,http://www.acfun.tv/v/ac38250/ ,http://bilibili.kankanews.com/video/av332432/ ,\ +http://world.kankanews.com/focus/2012-06-28/1265955.shtml ,http://www.kumi.cn/donghua/52781_2.html ,http://6pingm.iqiyi.com/v/125028.html ,http://www.pinshan.com/topiclist/instyle6453.html ,http://tv.people.com.cn/GB/372450/review/20140606.html ,http://www.yicai.com/videos/2015/04/4602208.html ,http://v.61.com/comic-play/1224/1.shtml ,http://movie.douban.com/trailer/132915/ ,http://video.chaoxing.com/playvideo-42176.html ,http://v.163.com/movie/2011/7/0/3/M7B9K1R60_M7BAANT03.html ,http://v.163.com/special/sp/positivepsychology.html ,\ +http://www.21edu8.com/highschool/high2/28601/show.html?28601-0-0 ,http://edu.51cto.com/lesson/id-18379.html ,http://edu.51cto.com/course/course_id-915.html ,http://17173.tv.sohu.com/v/1/11261/105/MTA1NDM0OA== ,http://wow.17173.com/videofile/2010-01-21/20100121002509145.shtml ,http://v.game.sohu.com/v/1/10268/65/NjUyODA0 ,http://news.replays.net/page/20090113/1410454.html ,http://www.wfbrood.com/xingji/scvod/xingji_36051.html ,http://v.pcgames.com.cn/video-5273.html ,http://v.pcgames.com.cn/video-51252.html ,http://www.aipai.com/c1/PTk4NiAhbiFoLSc.html ,http://www.plu.cn/sc2/vod/g-star/2150.html ,http://v.4399pk.com/xiaoyouxi/video_230765.htm ,http://www.yinyuetai.com/video/42518 ,\ +http://zhangmen.baidu.com/%BA%DC%BF%A8/374444.html ,http://www.top100.cn/mv/info-kaadycjt8y5ukcbogy.shtml ,http://www.google.cn/music/album?id=B21ced34533202f24 ,http://www.1ting.com/album_30703.html ,http://www.1ting.com/album/34/album_30693.html ,http://www.1ting.com/p_370178_370474_370545_369404.html ,http://www.1ting.com/player/34/player_306335.html ,http://www.xiami.com/album/379235 ,http://www.top100.cn/album/index-skcadgc3tgohdccbogy.shtml ,http://home.sogua.com/lujingai/mv/play.aspx?id=30195689 ,\ +http://download.5721.net/flash/2/10/200611301136.shtml ,http://www.kugou.com/mvweb/html/mv_71606.html ,http://www.wat.tv/video/best-of-sports-extremes-wapala-20vz3_2fh13_.html ,http://tv.esl.eu/de/vod/view/21184 ,http://www.5min.com/Video/How-to-Use-Edible-Flowers-469709634 ,http://www.howcast.com/videos/399311-How-to-Get-Over-an-Addiction-to-Food + -- cgit v1.2.3