Skip to content

Commit

Permalink
* MDF [vul test] update vul test dataset and move all data to a clean…
Browse files Browse the repository at this point in the history
… directory

Signed-off-by: wayne <yukang.wei@emqx.io>
  • Loading branch information
OdyWayne committed May 21, 2024
1 parent 236c9c5 commit db680a3
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/fuzzy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import socket
import os

data_path = ".github/scripts/fuzzy_test.txt"
data_path = ".github/scripts/vlu_dataset/fuzzy_test.txt"
addr = '127.0.0.1'
port = 1883

Expand Down
File renamed without changes.
File renamed without changes.
Binary file added .github/scripts/vul_dataset/vul_data2.raw
Binary file not shown.
Binary file added .github/scripts/vul_dataset/vul_data3.raw
Binary file not shown.
Binary file added .github/scripts/vul_dataset/vul_data4.raw
Binary file not shown.
Binary file added .github/scripts/vul_dataset/vul_data5.raw
Binary file not shown.
Binary file added .github/scripts/vul_dataset/vul_data6.raw
Binary file not shown.
Binary file added .github/scripts/vul_dataset/vul_data7.raw
Binary file not shown.
Binary file added .github/scripts/vul_dataset/vul_data8.raw
Binary file not shown.
11 changes: 7 additions & 4 deletions .github/scripts/vulnerability_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@

port = "1883"
addr = "127.0.0.1"
data_path = ".github/scripts/vul_data.raw"
data_path = ".github/scripts/vul_dataset/"
datafiles = ['vul_data1.raw', 'vul_data2.raw', 'vul_data3.raw', 'vul_data4.raw',
'vul_data5.raw', 'vul_data6.raw', 'vul_data7.raw', 'vul_data8.raw']

def vul_test():
vul_cmd = "nc " + addr +" "+ port + " < " + data_path
vul_test_cmd = shlex.split(vul_cmd)
process = subprocess.Popen(vul_test_cmd,
for file in datafiles:
vul_cmd = "nc " + addr +" "+ port + " < " + data_path + file
vul_test_cmd = shlex.split(vul_cmd)
process = subprocess.Popen(vul_test_cmd,
stdout=subprocess.PIPE,
universal_newlines=True)
time.sleep(1)
Expand Down

0 comments on commit db680a3

Please sign in to comment.