acherstyx / ddos-deeplearning-approach Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
你好!我是小菜鸟,最近在学习您的项目对流量进行处理,我想通过udp.csv从不同的pcap文件里取两个攻击集,您的源码如下:
attack_label_dict = load_label("dataset/CIC_DDoS_2019/CSV/03-11/UDP.csv", CACHE_ROOT + "label_from_csv_cache")
attack_feature_list = list(load_feature(files,
pkt_in_each_flow_limit=CNN_SHAPE[0],
label_dict=attack_label_dict,
sample_limit_dict={"BENIGN": 0, "MSSQL": 0, "UDP": SAMPLE_NUMBER}))
attack_label_dict = parsing_label(attack_label_dict)
但发现第二次构成的attack_feature_list长度为0,
我修改的代码:
#训练集
attack_label_dict = load_label("./dataset/CICDDoS2019/CSV/UDP.csv", CACHE_ROOT + "label_from_csv_cache")
#attack_label_dict2 = attack_label_dict
attack_feature_list = list(load_feature(files,
pkt_in_each_flow_limit=FEATURE_SHAPE[0],
label_dict=attack_label_dict,
sample_limit_dict={"BENIGN": 0, "MSSQL": 0, "UDP": 0.8*SAMPLE_NUMBER}))
attack_label_dict = parsing_label(attack_label_dict)
#测试集
attack_label_dict2 = load_label("./dataset/CICDDoS2019/CSV/UDP.csv", CACHE_ROOT + "label_from_csv_test_cache")
attack_feature_test_list = list(load_feature(test_files, #这里选择的file和前面的不同
pkt_in_each_flow_limit=FEATURE_SHAPE[0],
label_dict=attack_label_dict2,
sample_limit_dict={"BENIGN": 0, "MSSQL": 0,
"UDP": 0.2 * SAMPLE_NUMBER}))
attack_label_dict2 = parsing_label(attack_label_dict2)
logger.debug("loaded attack_test_list_num : %s", len(attack_feature_test_list))
显示DEBUG:main:loaded attack_list_test_num : 0
不知道是我哪里做错了,是什么原因呢?向您请教,希望得到回复
(也不知道这样使用对不对)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.