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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
| <?php
$GLOBALS [ '_1333821052_' ] = Array();
function FUNC_1($i)
{
$a = Array (
'_1028027143_', 'c', 'hdir', 'dirname',
'hea', 'der',
'def', 'i', 'ne',
'fi', 'le_', 'exists',
'file', 'mtime',
't', 'ime', '',
'u', 'nl', 'ink', '',
'fi', 'le_', 'put_conten', 't', 's',
's', 'trpos',
'file_ex', 'i', 's', 'ts',
'file_exists',
'f', 'ilemti', 'me',
'filemti', 'm', 'e', '',
'file',
'f', 'open',
'fwr', 'ite', '',
'fw', 'rite',
'd', 'ate',
'fwr', 'i', 'te',
'fwrite',
'fclose',
'micr', 'oti', 'm', 'e',
'de', 'fine', 'd', '',
'd', 'efine',
'i', 'ni_ge', 't',
'ini_get',
'se', 't_', 't', 'ime_limit',
'str_', 'repla', 'ce',
'str_re', 'p', 'l', 'ace',
'ini_set',
'ini_get',
'i', 'ni_ge', 't',
'se', 't_tim', 'e_l', 'imit', '',
'file_', 'get_c', 'on', 't', 'ent', 's',
'ini_get',
'u', 'nli', 'nk',
'd', 'e', 'fin', 'ed',
'defi', 'ne',
'ini_s', 'et', '',
'i', 'n', 'i_', 'set', '',
'err', 'or', '_rep', 'orting',
'date',
'da', 'te', '',
'e', 'xplod', 'e',
's', 'trpos', '',
'unl', 'ink',
'f', 'ile_put', '_content', 's',
'microti', 'me',
'un', 'lin', 'k', '',
'sleep',
'ex', 'tr', 'act',
'e', 'xplode',
'strpo', 's', '',
'strpos',
'fi', 'l', 'e_ex', 'is', 'ts', '',
'microt', 'im', 'e', '',
'unli', 'nk',
'locker.tmp',
'SERVER_NAME',
'Content-Type: text/html; charset = utf-8',
'dev',
'DEV',
'url',
'nolock',
"ParseMX script already working. Exiting", "",
'parsemx.php',
'platform.php',
'ins_id',
'script',
'.txt',
'.php',
'w',
"<?php \n",
'// *** ParseMX autogenerated script. Do not edit. Generated at ',
"F j, Y, g:i a",
"\n",
'// *** SITE: ',
"\n",
"\n",
'test',
"<br />",
'url',
'WARNING! Someone tried to access ParseMX Admin without sufficient rights',
"ACCESS DENIED. Log in your system as Admin",
'DEV',
'DEV',
'max_execution_time',
'safe_mode',
'url',
'_sxs_',
'/',
'url',
'url',
'_dxd_',
':',
'url',
'NOTICE: Using Test URL - ',
'url',
'SELECT donor_id FROM parsemx_ins WHERE ins_id = ',
'ins_id',
'donor_id',
"DELETE FROM parsemx_links WHERE url = \"",
'url',
"\" and ins_id = ",
'ins_id',
'product',
'ins_id',
'url',
'log_errors',
'On',
'max_execution_time',
'safe_mode', '', '',
'max_execution_time',
"NOTICE: *** License server is down. Exiting ***",
'DEV', 'DEV',
'display_errors',
'On',
'display_startup_errors',
'*** ParseMX demon started',
'i', 'H', ' ',
'host',
'NOTICE: Starting sheduled scan of <b>',
'host',
'</b>',
'donor_id',
'cron_status.tmp',
'noidle',
'url',
"",
"SELECT * FROM parsemx_tasks ORDER BY z_order DESC LIMIT 1",
"SELECT donor_id FROM parsemx_donors WHERE state>0",
'donor_id',
'noidle', 'noidle',
'No tasks, demon stopped.',
"UPDATE parsemx_tasks SET z_order = ",
"task", "",
"task2", "",
"task3", "",
'state', ' ',
"//", "",
'host',
"//",
'_',
'.php',
'scripter.php',
'title',
'_',
"<br />",
'WARNING! No ',
' script for ',
' - ',
'DELETE FROM parsemx_tasks WHERE task_id = ',
'active_tasks',
'done_tasks',
'active_tasks',
'donor_id',
"<a name = 'result'></a>",
"NOTICE: Test OK! Result - <a href = '",
"'>",
"</a>",
"WARNING: No products created!",
'*** ParseMX demon stopped. Working time: ',
' secs taken',
'auto',
"<script type = 'text/javascript'>
window.onload = function () {location = 'go.php?auto = 1';}</script>",
'_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_', '_1028027143_'
);
return $a [ $i ] ;
}
$GLOBALS [ FUNC_1(0) ] = Array (
FUNC_1(1) . FUNC_1(2), //chdir
FUNC_1(3), //dirname
FUNC_1(4) . FUNC_1(5), //header
FUNC_1(6) . FUNC_1(7) . FUNC_1(8), //define
FUNC_1(9) . FUNC_1(10) . FUNC_1(11), //file_exists
FUNC_1(12) . FUNC_1(13), //filemtime
FUNC_1(14) . FUNC_1(15), //time
FUNC_1(16) . FUNC_1(17) . FUNC_1(18) . FUNC_1(19), //unlink
FUNC_1(20) . FUNC_1(21) . FUNC_1(22) . FUNC_1(23) . FUNC_1(24) . FUNC_1(25), //file_put_contents
FUNC_1(26) . FUNC_1(27), //strpos
FUNC_1(28) . FUNC_1(29) . FUNC_1(30) . FUNC_1(31), //file_exists
FUNC_1(32), //file_exists
FUNC_1(33) . FUNC_1(34) . FUNC_1(35), //filemtime
FUNC_1(36) . FUNC_1(37) . FUNC_1(38), //filemtime
FUNC_1(39) . FUNC_1(40), //file
FUNC_1(41) . FUNC_1(42), //fopen
FUNC_1(43) . FUNC_1(44), //fwrite
FUNC_1(45) . FUNC_1(46) . FUNC_1(47), //fwrite
FUNC_1(48) . FUNC_1(49), //date
FUNC_1(50) . FUNC_1(51) . FUNC_1(52), //fwrite
FUNC_1(53), //fwrite
FUNC_1(54), //fclose
FUNC_1(55) . FUNC_1(56) . FUNC_1(57) . FUNC_1(58), //microtime
FUNC_1(59) . FUNC_1(60) . FUNC_1(61), //defined
FUNC_1(62) . FUNC_1(63) . FUNC_1(64), //define
FUNC_1(65) . FUNC_1(66) . FUNC_1(67), //ini_get
FUNC_1(68), //ini_get
FUNC_1(69) . FUNC_1(70) . FUNC_1(71) . FUNC_1(72), //set_time_limit
FUNC_1(73) . FUNC_1(74) . FUNC_1(75), //str_replace
FUNC_1(76) . FUNC_1(77) . FUNC_1(78) . FUNC_1(79), //str_replace
FUNC_1(80), //ini_set
FUNC_1(81), //ini_get
FUNC_1(82) . FUNC_1(83) . FUNC_1(84), //ini_get
FUNC_1(85) . FUNC_1(86) . FUNC_1(87) . FUNC_1(88), //set_time_limit
FUNC_1(89) . FUNC_1(90) . FUNC_1(91) . FUNC_1(92) . FUNC_1(93) . FUNC_1(94) . FUNC_1(95), //file_get_contents
FUNC_1(96), //ini_get
FUNC_1(97) . FUNC_1(98) . FUNC_1(99), //unlink
FUNC_1(100) . FUNC_1(101) . FUNC_1(102) . FUNC_1(103), //defined
FUNC_1(104) . FUNC_1(105), //define
FUNC_1(106) . FUNC_1(107), //ini_set
FUNC_1(108) . FUNC_1(109) . FUNC_1(110) . FUNC_1(111) . FUNC_1(112), //ini_set
FUNC_1(113) . FUNC_1(114) . FUNC_1(115) . FUNC_1(116) . FUNC_1(117), //error_reporting
FUNC_1(118), //date
FUNC_1(119) . FUNC_1(120), //date
FUNC_1(121) . FUNC_1(122) . FUNC_1(123) . FUNC_1(124), //explode
FUNC_1(125) . FUNC_1(126), //strpos
FUNC_1(127) . FUNC_1(128) . FUNC_1(129), //unlink
FUNC_1(130) . FUNC_1(131) . FUNC_1(132) . FUNC_1(133), //file_put_contents
FUNC_1(134) . FUNC_1(135), //microtime
FUNC_1(136) . FUNC_1(137) . FUNC_1(138), //unlink
FUNC_1(139) . FUNC_1(140), //sleep
FUNC_1(141) . FUNC_1(142) . FUNC_1(143), //extract
FUNC_1(144) . FUNC_1(145), //explode
FUNC_1(146) . FUNC_1(147), //strpos
FUNC_1(148) . FUNC_1(149), //strpos
FUNC_1(150) . FUNC_1(151) . FUNC_1(152) . FUNC_1(153) . FUNC_1(154), //file_exists
FUNC_1(155) . FUNC_1(156) . FUNC_1(157) . FUNC_1(158), //microtime
FUNC_1(159) . FUNC_1(160) . FUNC_1(161) //unlink
);
function FUNC_2($VAR_1){
$VAR_2 = Array(
FUNC_1(162), //locker.tmp
FUNC_1(163), //SERVER_NAME
FUNC_1(164), //Content-Type: text/html; charset = utf-8
FUNC_1(165), //dev
FUNC_1(166), //DEV
FUNC_1(167), //url
FUNC_1(168), //nolock
FUNC_1(169), //ParseMX script already working. Exiting
FUNC_1(170), //
FUNC_1(171), //parsemx.php
FUNC_1(172), //platform.php
FUNC_1(173), //ins_id
FUNC_1(174), //script
FUNC_1(175), //.txt
FUNC_1(176), //.php
FUNC_1(177), //w
FUNC_1(178), //<?php
FUNC_1(179), //// *** ParseMX autogenerated script. Do not edit. Generated at
FUNC_1(180), //F j, Y, g:i a
FUNC_1(181), //
FUNC_1(182), //// *** SITE:
FUNC_1(183), //
FUNC_1(184), //
FUNC_1(185), //test
FUNC_1(186), //<br />
FUNC_1(187), //url
FUNC_1(188), //WARNING! Someone tried to access ParseMX Admin without sufficient rights
FUNC_1(189), //ACCESS DENIED. Log in your system as Admin
FUNC_1(190), //DEV
FUNC_1(191), //DEV
FUNC_1(192), //max_execution_time
FUNC_1(193), //safe_mode
FUNC_1(194), //url
FUNC_1(195), //_sxs_
FUNC_1(196), ///
FUNC_1(197), //url
FUNC_1(198), //url
FUNC_1(199), //_dxd_
FUNC_1(200), //:
FUNC_1(201), //url
FUNC_1(202), //NOTICE: Using Test URL -
FUNC_1(203), //url
FUNC_1(204), //SELECT donor_id FROM parsemx_ins WHERE ins_id =
FUNC_1(205), //ins_id
FUNC_1(206), //donor_id
FUNC_1(207), //DELETE FROM parsemx_links WHERE url = "
FUNC_1(208), //url
FUNC_1(209), //" and ins_id =
FUNC_1(210), //ins_id
FUNC_1(211), //product
FUNC_1(212), //ins_id
FUNC_1(213), //url
FUNC_1(214), //log_errors
FUNC_1(215), //On
FUNC_1(216), //max_execution_time
FUNC_1(217), //safe_mode
FUNC_1(218), //
FUNC_1(219), //
FUNC_1(220), //max_execution_time
FUNC_1(221), //NOTICE: *** License server is down. Exiting ***
FUNC_1(222), //DEV
FUNC_1(223), //DEV
FUNC_1(224), //display_errors
FUNC_1(225), //On
FUNC_1(226), //display_startup_errors
FUNC_1(227), //*** ParseMX demon started
FUNC_1(228), //i
FUNC_1(229), //H
FUNC_1(230), //
FUNC_1(231), //host
FUNC_1(232), //NOTICE: Starting sheduled scan of <b>
FUNC_1(233), //host
FUNC_1(234), //</b>
FUNC_1(235), //donor_id
FUNC_1(236), //cron_status.tmp
FUNC_1(237), //noidle
FUNC_1(238), //url
FUNC_1(239), //
FUNC_1(240), //SELECT * FROM parsemx_tasks ORDER BY z_order DESC LIMIT 1
FUNC_1(241), //SELECT donor_id FROM parsemx_donors WHERE state>0
FUNC_1(242), //donor_id
FUNC_1(243), //noidle
FUNC_1(244), //noidle
FUNC_1(245), //No tasks, demon stopped.
FUNC_1(246), //UPDATE parsemx_tasks SET z_order =
FUNC_1(247), //task
FUNC_1(248), //
FUNC_1(249), //task2
FUNC_1(250), //
FUNC_1(251), //task3
FUNC_1(252), //
FUNC_1(253), //state
FUNC_1(254), //
FUNC_1(255), ////
FUNC_1(256), //
FUNC_1(257), //host
FUNC_1(258), ////
FUNC_1(259), //_
FUNC_1(260), //.php
FUNC_1(261), //scripter.php
FUNC_1(262), //title
FUNC_1(263), //_
FUNC_1(264), //<br />
FUNC_1(265), //WARNING! No
FUNC_1(266), // script for
FUNC_1(267), // -
FUNC_1(268), //DELETE FROM parsemx_tasks WHERE task_id =
FUNC_1(269), //active_tasks
FUNC_1(270), //done_tasks
FUNC_1(271), //active_tasks
FUNC_1(272), //donor_id
FUNC_1(273), //<a name = 'result'></a>
FUNC_1(274), //NOTICE: Test OK! Result - <a href = '
FUNC_1(275), //'>
FUNC_1(276), //</a>
FUNC_1(277), //WARNING: No products created!
FUNC_1(278), //*** ParseMX demon stopped. Working time:
FUNC_1(279), // secs taken
FUNC_1(280), //auto
FUNC_1(281), //<script type = 'text/javascript'> window.onload = function () {location = 'go.php?auto = 1';}</script>
);
return $VAR_2 [ $VAR_1 ] ;
}
$GLOBALS [ FUNC_1(282) ] [ 0 ] ($GLOBALS [ FUNC_1(283) ] [ 1 ] (__FILE__));
$locker = FUNC_2(0);
if(@$_SERVER [ FUNC_2(1) ] )
$GLOBALS [ FUNC_1(284) ] [ 2 ] (FUNC_2(2));
if(@$_GET [ FUNC_2(3) ] )
$GLOBALS [ FUNC_1(285) ] [ 3 ] (FUNC_2(4), true);
$VAR_3 = 4.5;
if(empty($max_time))
$max_time = (int)($VAR_3*60);
if(@!$_GET [ FUNC_2(5) ] and@!$_GET [ FUNC_2(6) ] )
{
if($GLOBALS [ FUNC_1(286) ] [ 4 ] ($locker)and($GLOBALS [ FUNC_1(287) ] [ 5 ] ($locker)>$GLOBALS [ FUNC_1(288) ] [ 6 ] ()-$max_time))
{
echo FUNC_2(7);
exit;
}
@$GLOBALS [ FUNC_1(289) ] [ 7 ] ($locker);
$GLOBALS [ FUNC_1(290) ] [ 8 ] ($locker, FUNC_2(8));
$nosession = true;
}
require_once(FUNC_2(9));
require_once(FUNC_2(10));
$url = mhost .$host;
function add_tasks($VAR_4, $VAR_5, $z_order = 0)
{
global $ins, $VAR_6;
$VAR_7 = false;
if(!$VAR_5)
return;
$VAR_5 = urls($VAR_5);
$VAR_8 = array();
foreach($VAR_5 as $VAR_9)
{
$VAR_10 = domain($VAR_9);
$VAR_11 = false;
foreach($VAR_6 as $VAR_12)
if(@$GLOBALS [ FUNC_1(291) ] [ 9 ] ($VAR_10, $VAR_12)! = = false)
{
$VAR_11 = true;
$VAR_8 [ ] = $VAR_9;
break;
}
if(!$VAR_11 and !$VAR_7)
{
xlog("WARNING: Invalid link: - <a href = '$VAR_9' target = '_blank'>$VAR_9</a> (no license)");
$VAR_7 = true;
}
}
AddTasks($VAR_4, $ins [ FUNC_2(11) ] , $VAR_8, $z_order);
}
function PrepareScript($script = '')
{
if(!$script)
$script = g(FUNC_2(12));
$VAR_13 = $script .FUNC_2(13);
$VAR_14 = $script .FUNC_2(14);
if($GLOBALS [ FUNC_1(292) ] [ 10 ] ($VAR_13))
{
if(
!$GLOBALS [ FUNC_1(293) ] [ 11 ] ($VAR_14)or($GLOBALS [ FUNC_1(294) ] [ 12 ] ($VAR_13)>$GLOBALS [ FUNC_1(295) ] [ 13 ] ($VAR_14))
)
{
$VAR_15 = $GLOBALS [ FUNC_1(296) ] [ 14 ] ($VAR_13, FILE_IGNORE_NEW_LINES and FILE_SKIP_EMPTY_LINES);
$VAR_16 = $GLOBALS [ FUNC_1(297) ] [ 15 ] ($VAR_14, FUNC_2(15));
$GLOBALS [ FUNC_1(298) ] [ 16 ] ($VAR_16, FUNC_2(16));
$GLOBALS [ FUNC_1(299) ] [ 17 ] ($VAR_16, FUNC_2(17) .$GLOBALS [ FUNC_1(300) ] [ 18 ] (FUNC_2(18)) .FUNC_2(19));
$GLOBALS [ FUNC_1(301) ] [ 19 ] ($VAR_16, FUNC_2(20) .$host .FUNC_2(21));
foreach($VAR_15 as $VAR_17)
$GLOBALS [ FUNC_1(302) ] [ 20 ] ($VAR_16, MxBasic($VAR_17) .FUNC_2(22));
$GLOBALS [ FUNC_1(303) ] [ 21 ] ($VAR_16);
}
if(g(FUNC_2(23)))
{
echo FUNC_2(24);
xlog("Script <b>$VAR_14</b> start:");
}
return $VAR_14;
}
}
$VAR_18 = $GLOBALS [ FUNC_1(304) ] [ 22 ] (true);
$test = false;
if(@$_GET [ FUNC_2(25) ] )
{
if(!HaveAdminAccess())
{
xlog(FUNC_2(26));
die(FUNC_2(27));
}
if(!$GLOBALS [ FUNC_1(305) ] [ 23 ] (FUNC_2(28)))
$GLOBALS [ FUNC_1(306) ] [ 24 ] (FUNC_2(29), true);
if($GLOBALS [ FUNC_1(307) ] [ 25 ] (FUNC_2(30))<120)
if(!$GLOBALS [ FUNC_1(308) ] [ 26 ] (FUNC_2(31)))
$GLOBALS [ FUNC_1(309) ] [ 27 ] (120);
$_GET [ FUNC_2(32) ] = $GLOBALS [ FUNC_1(310) ] [ 28 ] (FUNC_2(33), FUNC_2(34), $_GET [ FUNC_2(35) ] );
$_GET [ FUNC_2(36) ] = $GLOBALS [ FUNC_1(311) ] [ 29 ] (FUNC_2(37), FUNC_2(38), $_GET [ FUNC_2(39) ] );
xlog( FUNC_2(40) .$_GET [ FUNC_2(41) ] );
$donor_id = query(FUNC_2(42) .$_GET [ FUNC_2(43) ] )->row [ FUNC_2(44) ] ;
LoadDonorMeters($donor_id);
query(FUNC_2(45) .$_GET [ FUNC_2(46) ] .FUNC_2(47) .$_GET [ FUNC_2(48) ] );
AddTasks(FUNC_2(49), $_GET [ FUNC_2(50) ] , array($_GET [ FUNC_2(51) ] ), 1000);
SaveDonorMeters();
$test = true;
}
else
{
$GLOBALS [ FUNC_1(312) ] [ 30 ] (FUNC_2(52), FUNC_2(53));
if($GLOBALS [ FUNC_1(313) ] [ 31 ] (FUNC_2(54))<$max_time+30)
if(!$GLOBALS [ FUNC_1(314) ] [ 32 ] (FUNC_2(55)))
$GLOBALS [ FUNC_1(315) ] [ 33 ] ($max_time+30);
@$VAR_19 = $GLOBALS [ FUNC_1(316) ] [ 34 ] ($url);
if(!$VAR_19)
$VAR_19 = _curl($url, FUNC_2(56), FUNC_2(57), false);
$VAR_20 = $GLOBALS [ FUNC_1(317) ] [ 35 ] (FUNC_2(58));
if($VAR_20<$max_time+30)
xlog("NOTICE! max_execution_time = $VAR_20 sec and can't be altered.");
if(!$VAR_19)
{
xlog(FUNC_2(59));
@$GLOBALS [ FUNC_1(318) ] [ 36 ] ($locker);
exit;
}
}
if(!$GLOBALS [ FUNC_1(319) ] [ 37 ] (FUNC_2(60)))
$GLOBALS [ FUNC_1(320) ] [ 38 ] (FUNC_2(61), false);
if(DEV)
{
$GLOBALS [ FUNC_1(321) ] [ 39 ] (FUNC_2(62), FUNC_2(63));
$GLOBALS [ FUNC_1(322) ] [ 40 ] (FUNC_2(64), TRUE);
$GLOBALS [ FUNC_1(323) ] [ 41 ] (-1^E_STRICT);
}
xlog(FUNC_2(65));
if($GLOBALS [ FUNC_1(324) ] [ 42 ] (FUNC_2(66))<15)
{
$VAR_21 = $GLOBALS [ FUNC_1(325) ] [ 43 ] (FUNC_2(67));
if(!(int)$VAR_21)
$VAR_21 = 24;
$VAR_6 = query("SELECT * FROM parsemx_donors WHERE autorun = $VAR_21 AND state<>2")->rows;
foreach($VAR_6 as $VAR_12)
{
$VAR_22 = false;
foreach($GLOBALS [ FUNC_1(326) ] [ 44 ] (FUNC_2(68), $VAR_19)as $VAR_23)
if($GLOBALS [ FUNC_1(327) ] [ 45 ] ($VAR_12 [ FUNC_2(69) ] , $VAR_23)! = = false)
$VAR_22 = true;
if($VAR_22)
{
xlog(FUNC_2(70) .$VAR_12 [ FUNC_2(71) ] .FUNC_2(72));DonorStart(0, $VAR_12 [ FUNC_2(73) ] );
}
}
}
$VAR_24 = FUNC_2(74);
if(!(@$_GET [ FUNC_2(75) ] ||@$_GET [ FUNC_2(76) ] ))
{
@$GLOBALS [ FUNC_1(328) ] [ 46 ] ($VAR_24);
$GLOBALS [ FUNC_1(329) ] [ 47 ] ($VAR_24, FUNC_2(77));
}
while($GLOBALS [ FUNC_1(330) ] [ 48 ] (true)-$VAR_18<$max_time)
{
$VAR_9 = query(FUNC_2(78))->row;
if(!$VAR_9)
{
$VAR_25 = query(FUNC_2(79))->rows;
if($VAR_25)
foreach($VAR_25 as $VAR_12)
DonorStop($VAR_12 [ FUNC_2(80) ] , true);
if(@$_GET [ FUNC_2(81) ] )
@$GLOBALS [ FUNC_1(331) ] [ 49 ] ($locker);
if(@$_GET [ FUNC_2(82) ] or $test)
{
xlog(FUNC_2(83));
exit;
}
$GLOBALS [ FUNC_1(332) ] [ 50 ] (15);
continue;
}
$GLOBALS [ FUNC_1(333) ] [ 51 ] ($VAR_9, EXTR_OVERWRITE);
query(FUNC_2(84) .($z_order-1000) ." WHERE task_id = $task_id");
if($info)
$info = loadinfo(FUNC_2(85), $info);
else
$info = FUNC_2(86);
if($info2)
$info2 = loadinfo(FUNC_2(87), $info2);
else
$info2 = FUNC_2(88);
if($info3)
$info3 = loadinfo(FUNC_2(89), $info3);
else
$info3 = FUNC_2(90);
LoadInstruction($ins_id);
LoadDonorMeters($donor_id);
$VAR_25 = query("SELECT state FROM parsemx_donors WHERE donor_id = $donor_id")->row;
if(!$VAR_25 [ FUNC_2(91) ] and!$test)
{
DonorStop($donor_id);
continue;
}
@$VAR_6 = $GLOBALS [ FUNC_1(334) ] [ 52 ] (FUNC_2(92), $VAR_19);
BeforeEntityProcessing();
if($GLOBALS [ FUNC_1(335) ] [ 53 ] ($url, FUNC_2(93))! = = false)
$html = get($url);
else
{
$html = FUNC_2(94);
$last_result = 200;
$site = $donor [ FUNC_2(95) ] ;
}
$VAR_26 = $last_result;
if($html or($GLOBALS [ FUNC_1(336) ] [ 54 ] ($url, FUNC_2(96)) = = = false))
{
$VAR_14 = $site .FUNC_2(97) .$entity .FUNC_2(98);
if($GLOBALS [ FUNC_1(337) ] [ 55 ] ($VAR_14))
{
require_once(FUNC_2(99));
$skip = false;
StartCommands($html);
$VAR_27 = translit($ins [ FUNC_2(100) ] );
$script = $site .FUNC_2(101) .$VAR_27;
$image_filename = "$VAR_27/";
if($test)
{
echo FUNC_2(102);
xlog("Script <b>$VAR_14</b> start:");
}
require($VAR_14);
if($test)
xlog("Script <b>$VAR_14</b> end.");
if($VAR_28 = PrepareScript())
include($VAR_28);
if(!$skip)
InsertPlatformEntity($entity);
EndCommands();
}
else
xlog(FUNC_2(103) .$entity .FUNC_2(104) .$site .FUNC_2(105) .$VAR_14);
}
if(($VAR_26 = = 200)or($VAR_26 = = 404)or $test or($z_order<-10))
{
query(FUNC_2(106) .$task_id);
$donor [ FUNC_2(107) ] - = 1;
}
else
{
$z_order--;
query("UPDATE parsemx_tasks SET z_order = $z_order WHERE task_id = $task_id");
xlog("NOTICE: Left to retry faulty $url");
}
if($VAR_26 = = 200)
$donor [ FUNC_2(108) ] + = 1;
SaveDonorMeters();
if(!$donor [ FUNC_2(109) ] &&!$test)
DonorStop($donor [ FUNC_2(110) ] , true);
if($test)
{
echo FUNC_2(111);
if($VAR_6 = LastInsertedEntityURL())
{
xlog(FUNC_2(112) .$VAR_6 .FUNC_2(113) .$VAR_6 .FUNC_2(114));
echo"<a name = 'result'></a><iframe width = '1000' height = '600' src = '$VAR_6'></iframe><br/>";
}
else
xlog(FUNC_2(115));
break;
}
}
xlog( FUNC_2(116) .(int)( $GLOBALS [ FUNC_1(338) ] [ 56 ] (true)-$VAR_18 ) .FUNC_2(117) );
@$GLOBALS [ FUNC_1(339) ] [ 57 ] ($locker);
if(@$_GET [ FUNC_2(118) ] )
echo FUNC_2(119); |