-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathCreateBaseDir.py
More file actions
executable file
·53 lines (37 loc) · 1.34 KB
/
CreateBaseDir.py
File metadata and controls
executable file
·53 lines (37 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env python3
'''
DICE - script to create a working base folder for fuzzing
------------------------------------------------------
Copyright (C) 2019-2020 RiS3 Lab
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
'''
import subprocess,sys,os,json,logging,shutil,signal,time
import configparser
import argparse
from argparse import Namespace
from CreateSeedInput import Create
dirs =["GPSReceiver",
"GuitarPedal",
"MIDISynthetizer",
"Modbus",
"ModbusRedZones",
"Oscilloscope",
"SolderingStation",
"StepperMotor"]
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Helper script to launch fuzzer")
parser.add_argument("-R","--run-num", dest="run", default="1.0",
help="fuzzing run number")
parser.add_argument("-B", "--base", dest="base", default="FuzzDir",
help="base dir for fuzzing ")
args = parser.parse_args()
base = args.base
run_num = args.run
os.chdir(os.getenv("HOME"))
for d in dirs:
os.makedirs(base + "/" + d + "/" + run_num + "/inputs")
os.makedirs(base + "/" + d + "/" + run_num + "/outputs")
Create(base + "/" + d + "/" + run_num + "/inputs/input.data")