-
Notifications
You must be signed in to change notification settings - Fork 8
/
bbantispam.php
133 lines (133 loc) · 8.05 KB
/
bbantispam.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
// Advanced Textual Confirmation, v.1.0.3
// (c) 2007 bbAntiSpam, info@ http://bbantispam.com/atc/
if ($_SERVER['REQUEST_METHOD'] != 'POST') { return; }
$bbas_code = <<<CODE
JGJiYXNfVjFlMDYwNDc5ID0gZGlybmFtZShfX0ZJTEVfXykgLiAnL2JiYXNfY29u
ZmlnLnBocCc7IGluY2x1ZGUgJGJiYXNfVjFlMDYwNDc5OyBmb3JlYWNoIChhcnJh
eSgnb29uZl9ueWpubGZfcGJhc3ZlenJxJywgJ2RocmZndmJhZicsICd5bmF0Jywg
J3l2cHJhZnJfeHJsJywgJ3BiYXN2ZXpuZ3ZiYV9jbnRyJykgYXMgJGJiYXNfVjdm
YWMwMjE4KSB7CiAkYmJhc19WN2ZhYzAyMTggPSBzdHJfcm90MTMoJGJiYXNfVjdm
YWMwMjE4KTsgJGJiYXNfVmI1NGZiMDRjID0gJ2JiYXNfVicgLiBzdWJzdHIobWQ1
KCRiYmFzX1Y3ZmFjMDIxOCksIDAsIDgpOwokR0xPQkFMU1skYmJhc19WYjU0ZmIw
NGNdID0gJiQkYmJhc19WN2ZhYzAyMTg7IH0gZ2xvYmFsICRiYmFzX1Y0Nzg2Njlj
NywgJGJiYXNfVjc1NzI1NTljLCAkYmJhc19WYmM5Yzc5ODMsICRiYmFzX1Y0ZTYz
MDEyYjsKZ2xvY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