-
Notifications
You must be signed in to change notification settings - Fork 16
/
simple_conf
105 lines (70 loc) · 5.79 KB
/
simple_conf
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Required. The URL address for each target.
config.urls = ["https://akamai.test.com/", "https://fastly.test.com/"]
# Required. The 'Host' header value for each target.
config.host_headers = ["akamai.test.com", "fastly.test.com"]
# Required. The input grammar.
config.grammar = {
'<start>': ['<sequence>'],
'<sequence>': ['<headers-frame-base-1>', '<headers-frame-base-1><data-frame-base-1>'],
#-----------------------------------------------------------------------------------------------------------------------------------------
'<headers-frame-base-1>': ['<headers-frame-base-1-header-block><headers-frame-base-1-flags><headers-frame-base-1-stream-id>'],
'<headers-frame-base-1-header-block>': ['<headers-frame-base-1-method-header><headers-frame-base-1-scheme-header><headers-frame-base-1-path-header><headers-frame-base-1-authority-header>'],
'<headers-frame-base-1-flags>': ['NONE', 'EH', 'ES', 'ES;EH'],
'<headers-frame-base-1-stream-id>': ['1'],
'<headers-frame-base-1-method-header>': ['<headers-frame-base-1-method-header-name><headers-frame-base-1-method-header-value>'],
'<headers-frame-base-1-method-header-name>': [':method'],
'<headers-frame-base-1-method-header-value>': ['(POST, opts(prob=0.75))', '(GET, opts(prob=0.15))', 'HEAD'],
'<headers-frame-base-1-scheme-header>': ['<headers-frame-base-1-scheme-header-name><headers-frame-base-1-scheme-header-value>'],
'<headers-frame-base-1-scheme-header-name>': [':scheme'],
'<headers-frame-base-1-scheme-header-value>': ['https'],
'<headers-frame-base-1-path-header>': ['<headers-frame-base-1-path-header-name><headers-frame-base-1-path-header-value>'],
'<headers-frame-base-1-path-header-name>': [':path'],
'<headers-frame-base-1-path-header-value>': ['/reqid=_REQID_'],
'<headers-frame-base-1-authority-header>': ['<headers-frame-base-1-authority-header-name><headers-frame-base-1-authority-header-value>'],
'<headers-frame-base-1-authority-header-name>': [':authority'],
'<headers-frame-base-1-authority-header-value>': ['_HOST_'],
#-----------------------------------------------------------------------------------------------------------------------------------------
'<continuation-frame-base-1>': ['<continuation-frame-base-1-header-block><continuation-frame-base-1-flags><continuation-frame-base-1-stream-id>'],
'<continuation-frame-base-1-header-block>': ['<continuation-frame-base-1-some-header>'],
'<continuation-frame-base-1-flags>': ['EH'],
'<continuation-frame-base-1-stream-id>': ['1'],
'<continuation-frame-base-1-some-header>': ['<continuation-frame-base-1-some-header-name><continuation-frame-base-1-some-header-value>'],
'<continuation-frame-base-1-some-header-name>': ['some-header'],
'<continuation-frame-base-1-some-header-value>': ['some-value'],
#-----------------------------------------------------------------------------------------------------------------------------------------
'<data-frame-base-1>': ['<data-frame-base-1-data><data-frame-base-1-flags><data-frame-base-1-stream-id>'],
'<data-frame-base-1-data>': ['5\r\nBBBBB\r\n0\r\n\r\n', '5\r\nBBBBB\r\n0\r\n\r\nBBBBB', '5\r\nBBBBB\r\n', '0\r\n\r\n'],
'<data-frame-base-1-flags>': ['ES'],
'<data-frame-base-1-stream-id>': ['1'],
#-----------------------------------------------------------------------------------------------------------------------------------------
'<goaway-frame-pool-1>': ['<goaway-frame-pool-1-last-id><goaway-frame-pool-1-error><goaway-frame-pool-1-additional-data><goaway-frame-pool-1-flags><goaway-frame-pool-1-stream-id>'],
'<goaway-frame-pool-1-last-id>': ['1','(0, opts(prob=0.01))','(-1, opts(prob=0.01))'],
'<goaway-frame-pool-1-error>': ['0', '1', '2', '3', '4', '5', '6', '7', '8'],
'<goaway-frame-pool-1-additional-data>': ['5\r\nBBBBB\r\n', '0\r\n\r\n'],
'<goaway-frame-pool-1-flags>': ['NONE'],
'<goaway-frame-pool-1-stream-id>': ['0', '(1, opts(prob=0.01))'],
#-----------------------------------------------------------------------------------------------------------------------------------------
'<window-update-frame-pool-1>': ['<window-update-frame-pool-1-size><window-update-frame-pool-1-flags><window-update-frame-pool-1-stream-id>'],
'<window-update-frame-pool-1-size>': ['123456', '(0, opts(prob=0.01))'],
'<window-update-frame-pool-1-flags>': ['NONE'],
'<window-update-frame-pool-1-stream-id>': ['1'],
#-----------------------------------------------------------------------------------------------------------------------------------------
}
# Required. Minimum number of tree mutations to be done
config.min_num_tree_mutations = 1
# Required. Maximum number of tree mutations to be done
config.max_num_tree_mutations = 2
# Required. Minimum number of string mutations to be done
config.min_num_string_mutations = 1
# Required. Maximum number of string mutations to be done
config.max_num_string_mutations = 2
# Required. The mutation type for each symbol to be mutated. Two mutation types are supported: tree (0) and string (1).
config.symbol_mutation_types = {'<sequence>': 0, '<headers-frame-base-1-method-header-value>': 1}
# Required if string mutations are used. The character pool to choose from for insert_random_char and replace_random_char operations.
config.char_pool = [chr(i) for i in list(range(48))+list(range(58,65))+list(range(91,97))+list(range(123,128))]
# Required if tree mutations are used. The symbol pool to choose from for insert_random_subtree and replace_random_subtree operations.
config.symbol_pool = ['<goaway-frame-pool-1>', '(<window-update-frame-pool-1>, opts(prob=0.9))']
# Required if string mutations are used.
config.string_mutators = ['insert_random_character', 'replace_random_character', 'remove_random_character']
# Required if tree mutations are used.
config.tree_mutators = ['(insert_random_subtree, opts(prob=0.3))', 'replace_random_subtree', 'remove_random_subtree']