Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d56d3c4

Browse files
author
Daniele Linguaglossa
committed
added string interpolation attack
1 parent 53f14f4 commit d56d3c4

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

pyjfuzz/core/pjf_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ def __init__(self, arguments):
6666
self.parameters = str(self.parameters).split(",")
6767
if self.techniques:
6868
techniques = {
69-
"C": [10, 5],
69+
"C": [10, 5, 13],
7070
"H": [9],
7171
"P": [6, 2, 8],
7272
"T": [11, 12],
73-
"R": [13],
73+
"R": [14],
7474
"S": [3, 1],
7575
"X": [0, 4, 7]
7676
}

pyjfuzz/core/pjf_mutators.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ def __init__(self, configuration):
3737
self.config = configuration
3838
self.json_fuzzer = self.fuzz
3939
self.string_mutator = {
40-
0: lambda x: x[::-1],
40+
0: lambda x: False,
4141
1: lambda x: self.json_fuzzer(self.get_string_polyglot_attack(x)),
4242
2: lambda x: "",
4343
3: lambda x: [x],
44-
4: lambda x: False,
44+
4: lambda x: [{str(x): str(x)}],
4545
5: lambda x: {"param": self.json_fuzzer(self.get_string_polyglot_attack(x))},
4646
6: lambda x: 0,
4747
}
@@ -112,7 +112,8 @@ def __init__(self, configuration):
112112
10: "||cmd.exe&&id||%s",
113113
11: "${7*7}a{{%s}}b",
114114
12: "{{'%s'*7}}",
115-
13: "".join(self.random_chars[random.randint(0, 94)]
115+
13: "#{%%x['%s']}+foo",
116+
14: "".join(self.random_chars[random.randint(0, 94)]
116117
for _ in range(0, random.randint(1, 30))).replace("%", "%%") + "%s"
117118
}
118119

0 commit comments

Comments
 (0)