-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathasp.php
executable file
·103 lines (83 loc) · 1.97 KB
/
asp.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
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
<?php
function word_filter_callback($m) {
static $vals = array(
'smh' => 'baka',
'SMH' => 'BAKA',
'tbh' => 'desu',
'TBH' => 'DESU',
'fam' => 'senpai',
'FAM' => 'SENPAI',
'Fam' => 'Senpai',
'fams' => 'senpaitachi',
'FAMS' => 'SENPAITACHI',
'FAMs' => 'SENPAITACHI',
'Fams' => 'Senpaitachi'
);
if (!isset($vals[$m[2]])) {
return $m[0];
}
return "{$m[1]}{$vals[$m[2]]}{$m[3]}";
}
function word_filter_callback_soy($m) {
$is_uc = $m[2] === strtoupper($m[2]);
$lc = strtolower($m[4]);
if ($lc === 'uz') {
return $m[0];
}
if ($lc === 'im' || $lc === 'lent') {
$m[4] = '';
}
if (!isset($m[4][1])) {
if ($is_uc) {
$onions = 'ONIONS';
}
else {
if ($m[2][0] === 's') {
$onions = 'onions';
}
else {
$onions = 'Onions';
}
}
return "{$m[1]}{$onions}{$m[4]}";
}
if ($m[2][0] === 's') {
$b = 'b';
}
else {
$b = 'B';
}
$ac = mb_strlen($m[3]);
if ($ac == 1) {
$a = 'a';
}
else {
if ($ac < 35) {
$a = str_repeat('a', $ac);
}
else {
$a = 'a';
}
}
$based = "{$b}{$a}sed";
if ($is_uc) {
$based = strtoupper($based);
}
return $m[1] . $based . $m[4];
}
// $text contents of a field
// $type name of the field
function word_filter($text, $type) {
if ($type !== 'com') {
return $text;
}
// $text = str_replace('Cuck', 'Kek', $text);
// $text = str_replace('cuck', 'kek', $text);
$text = str_replace('CUCK', 'KEK', $text);
$text = str_replace('finna', 'ding-dong diddly', $text);
$text = str_replace('Finna ', 'Ding-Dong Diddly', $text);
$text = str_replace('FINNA', 'DING-DONG DIDDLY', $text);
$text = preg_replace_callback('/(\b)(sjw|sjws|smh|tbh|fams|fam)(\b)/i', 'word_filter_callback', $text);
$text = preg_replace_callback('/(\b)(s([o0οоօჿ]+)[yуΥ])(\b|[[:alpha:]]{2,4})/iu', 'word_filter_callback_soy', $text);
return $text;
}