forked from OOPS-ORG-PHP/mod_screwim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp_screwim.c
647 lines (540 loc) · 16.3 KB
/
php_screwim.c
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
/*
* Copuright (c) 2021 JoungKyun.Kim <http://oops.org>. All rights reserved.
*
* This file is part of mod_screwim
*
* This program is forked from PHP screw who made by Kunimasa Noda in
* PM9.com, Inc. and, his information is follows:
* http://www.pm9.com
* https://sourceforge.net/projects/php-screw/
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "php_ini.h"
#include "ext/standard/file.h"
#include "ext/standard/info.h"
#include "SAPI.h"
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
typedef unsigned long ULong; /* 32 bits or more */
#include "php_screwim.h"
ZEND_DECLARE_MODULE_GLOBALS(screwim)
/* {{{ php function argument info
* proto types
* ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null)
* ZEND_BEGIN_ARG_INFO_EX(name, _unused, return_reference, required_num_args)
* ZEND_ARG_INFO(pass_by_ref, name)
* ZEND_ARG_TYPE_INFO(pass_by_ref, name, type_hint, allow_null)
* ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(pass_by_ref, name, type_hint, allow_null, default_value)
*/
#if PHP_VERSION_ID > 70199
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_screwim_encrypt, 0, 1, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 1)
ZEND_END_ARG_INFO()
#ifdef SCREWIM_DECRYPT
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_screwim_decrypt, 0, 1, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 1)
#if PHP_VERSION_ID > 79999
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, key, IS_STRING, 1, "null")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, header_len, IS_LONG, 0, "-1")
#else
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, header_len, IS_LONG, 0)
#endif
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_screwim_seed, 0, 0, IS_OBJECT, 0)
ZEND_END_ARG_INFO()
#endif /* end of SCREWIM_DECRYPT */
#else
ZEND_BEGIN_ARG_INFO_EX(arginfo_screwim_encrypt, 0, 0, 1)
ZEND_ARG_INFO(0, string)
ZEND_END_ARG_INFO()
#ifdef SCREWIM_DECRYPT
ZEND_BEGIN_ARG_INFO_EX(arginfo_screwim_decrypt, 0, 0, 1)
ZEND_ARG_INFO(0, string)
ZEND_ARG_INFO(0, key)
ZEND_ARG_INFO(0, header_len)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_screwim_seed, 0, 0, 0)
ZEND_END_ARG_INFO()
#endif /* end of SCREWIM_DECRYPT */
#endif /* end of PHP_VERSION_ID > 79999 */
/* }}} */
/* {{{ +-- screwim_functions[]
*
* Every user visible function must have an entry in screwim_functions[].
*/
const zend_function_entry screwim_functions[] = {
PHP_FE(screwim_encrypt, arginfo_screwim_encrypt)
#ifdef SCREWIM_DECRYPT
PHP_FE(screwim_decrypt, arginfo_screwim_decrypt)
PHP_FE(screwim_seed, arginfo_screwim_seed)
#endif
{NULL, NULL, NULL}
};
/* }}} */
typedef struct screw_data {
void * buf;
size_t len;
} SCREWData;
/* {{{ +-- Internal APIs
*/
/* {{{ +-- static void php_screwim_init_globals(zend_screwim_globals *screwim_globals)
*/
static void php_screwim_init_globals(zend_screwim_globals *screwim_globals) {
screwim_globals->enabled = 0;
}
/* }}} */
/* {{{ +-- SCREWData screwdata_init (void)
*/
SCREWData screwdata_init (void) {
SCREWData data;
data.buf = NULL;
data.len = 0;
return data;
}
/* }}} */
/* {{{ +-- SCREWData mcryptkey (char * key)
*/
SCREWData mcryptkey (char * key) {
SCREWData sdata;
short * buf;
int i;
short screwim_mycryptkey[] = {
SCREWIM_ENC_DATA
};
if ( key != NULL && strlen (key) > 0 ) {
sdata.len = strlen (key) / 4;
if ( (strlen (key) % 4) != 0 )
sdata.len++;
buf = generate_key (key, sdata.len);
} else {
sdata.len = sizeof (screwim_mycryptkey) / sizeof (short);
buf = (short *) emalloc (sizeof (screwim_mycryptkey));
for ( i=0; i<sdata.len; i++ )
buf[i] = screwim_mycryptkey[i];
}
sdata.buf = (short *) buf;
return sdata;
}
/* }}} */
/* {{{ +-- SCREWData screwim_ext_buf (char * datap, ULong datalen, char * ukey)
*/
SCREWData screwim_ext_buf (char * datap, ULong datalen, char * ukey) {
SCREWData sdata;
SCREWData key;
int i;
short * keybuf;
key = mcryptkey (ukey);
keybuf = (short *) key.buf;
for( i=0; i<datalen; i++ ) {
datap[i] = (char) keybuf[(datalen - i) % key.len] ^ (~(datap[i]));
}
efree (key.buf);
sdata = screwdata_init ();
sdata.buf = (char *) zdecode (datap, datalen, &sdata.len);
return sdata;
}
/* }}} */
/* {{{ +-- SCREWData screwim_ext_fopen (FILE * fp)
*/
SCREWData screwim_ext_fopen (FILE * fp) {
struct stat stat_buf;
SCREWData sdata;
char * datap = NULL;
ULong datalen;
fstat (fileno (fp), &stat_buf);
datalen = stat_buf.st_size - SCREWIM_LEN;
datap = (char *) emalloc (datalen);
memset (datap, 0, datalen);
fread (datap, datalen, 1, fp);
fclose (fp);
sdata = screwim_ext_buf (datap, datalen, NULL);
efree (datap);
return sdata;
}
/* }}} */
#if PHP_VERSION_ID < 70400
/* {{{ +-- SCREWData screwim_ext_mmap (zend_file_handle * file_handle)
*/
SCREWData screwim_ext_mmap (zend_file_handle * file_handle) {
SCREWData sdata;
char * nbuf;
char * datap = NULL;
ULong datalen;
nbuf = file_handle->handle.stream.mmap.buf + SCREWIM_LEN;
datalen = file_handle->handle.stream.mmap.len - SCREWIM_LEN;
datap = (char *) emalloc (datalen);
memset (datap, 0, datalen);
memcpy (datap, nbuf, datalen);
sdata = screwim_ext_buf (datap, datalen, NULL);
efree (datap);
return sdata;
}
/* }}} */
#endif
ZEND_API zend_op_array *(*org_compile_file)(zend_file_handle * file_handle, int type TSRMLS_DC);
// {{{ +-- ZEND_API zend_op_array * screwim_compile_file (zend_file_handle *, int TSRMLS_DC)
ZEND_API zend_op_array * screwim_compile_file (zend_file_handle * file_handle, int type TSRMLS_DC)
{
FILE * fp;
char buf[SCREWIM_LEN + 1] = { 0, };
char fname[32] = { 0, };
SCREWData sdata, tmp;
if ( ! SCREWIM_G (enabled) )
return org_compile_file (file_handle, type TSRMLS_CC);
#if PHP_VERSION_ID < 70400
// If file_handle->type is ZEND_HANDLE_MAPPED, handle.stream.mmap.buf has already
// contents data. This case is include or require. when file is directly opened,
// handle.stream.mmap.buf has NULL.
if ( file_handle->type == ZEND_HANDLE_MAPPED ) {
if ( file_handle->handle.stream.mmap.len > 0 ) {
memcpy (buf, file_handle->handle.stream.mmap.buf, SCREWIM_LEN);
if ( memcmp (buf, SCREWIM, SCREWIM_LEN) != 0 )
return org_compile_file (file_handle, type TSRMLS_CC);
} else
return org_compile_file (file_handle, type TSRMLS_CC);
}
#endif
if ( zend_is_executing (TSRMLS_C) ) {
if ( get_active_function_name (TSRMLS_C) ) {
strncpy (fname, get_active_function_name (TSRMLS_C), sizeof (fname - 2));
}
}
if ( fname[0] ) {
if ( strcasecmp (fname, "show_source") == 0 || strcasecmp (fname, "highlight_file") == 0) {
return NULL;
}
}
#if PHP_VERSION_ID < 70400
if ( file_handle->type == ZEND_HANDLE_MAPPED ) {
sdata = screwim_ext_mmap (file_handle);
} else {
#endif
// When file is opened directly (type is ZEND_HANDLE_FP), check here.
fp = fopen (file_handle->filename, "rb");
if ( ! fp ) {
return org_compile_file (file_handle, type TSRMLS_CC);
}
fread (buf, sizeof (char), SCREWIM_LEN, fp);
if ( memcmp (buf, SCREWIM, SCREWIM_LEN) != 0 ) {
fclose (fp);
return org_compile_file (file_handle, type TSRMLS_CC);
}
sdata = screwim_ext_fopen (fp);
#if PHP_VERSION_ID < 70400
}
#endif
tmp = screwdata_init ();
if ( sdata.buf == NULL )
return NULL;
if ( zend_stream_fixup (file_handle, (char **) &tmp.buf, &tmp.len TSRMLS_CC) == FAILURE )
return NULL;
#if PHP_VERSION_ID < 70400
file_handle->handle.stream.mmap.buf = sdata.buf;
file_handle->handle.stream.mmap.len = sdata.len;
#else
file_handle->buf = sdata.buf;
file_handle->len = sdata.len;
#endif
file_handle->handle.stream.closer = NULL;
return org_compile_file (file_handle, type TSRMLS_CC);
}
/* }}} */
/* {{{ for PHP 5 APIs
*/
#if PHP_VERSION_ID < 60000
/* {{{ +-- zend_string * zend_string_alloc (size_t len, int persis)
*/
zend_string * zend_string_alloc (size_t len, int persis) {
zend_string * buf;
buf = (zend_string *) emalloc (sizeof (zend_string));
buf->val = (char *) emalloc (sizeof (char) * len + 1);
memset (buf->val, 0, sizeof (char) * len + 1);
buf->len = len;
return buf;
}
/* }}} */
/* {{{ +-- void zend_string_free (zend_string * buf)
*/
void zend_string_free (zend_string * buf) {
if ( buf == NULL )
return;
if ( buf->val != NULL ) {
efree (buf->val);
buf->val = NULL;
}
efree (buf);
}
/* }}} */
#endif
/* End of PHP 5 APIs }}} */
/* end of internal APIs }}} */
/* {{{ +-- PHP_FUNCTION (string) screwim_encrypt (string)
*/
PHP_FUNCTION (screwim_encrypt) {
zend_string * text;
zend_string * ndata;
char * datap;
ULong datalen;
int i;
SCREWData key;
short * keybuf;
#if PHP_VERSION_ID < 60000
text = (zend_string *) emalloc (sizeof (zend_string));
ZSTR_VAL(text) = NULL;
ZSTR_LEN(text) = 0;
if ( zend_parse_parameters (ZEND_NUM_ARGS(), "s", &ZSTR_VAL(text), &ZSTR_LEN(text)) == FAILURE )
#else
if ( zend_parse_parameters (ZEND_NUM_ARGS(), "S", &text) == FAILURE )
#endif
{
#if PHP_VERSION_ID < 60000
zend_string_free (text);
#endif
return;
}
if ( ZSTR_LEN (text) == 0 ) {
#if PHP_VERSION_ID < 60000
zend_string_free (text);
#endif
RETURN_NULL ();
}
if ( memcmp (ZSTR_VAL (text), SCREWIM, SCREWIM_LEN) == 0 ) {
php_error (E_WARNING, "given data already crypted");
RETVAL_STR (text);
#if PHP_VERSION_ID < 60000
efree (text);
#endif
}
datap = zencode (ZSTR_VAL (text), ZSTR_LEN (text), (ULong *) &datalen);
#if PHP_VERSION_ID < 60000
zend_string_free (text);
#endif
key = mcryptkey (NULL);
keybuf = (short *) key.buf;
for( i=0; i<datalen; i++ ) {
datap[i] = (char) keybuf[(datalen - i) % key.len] ^ (~(datap[i]));
}
efree (key.buf);
ndata = zend_string_alloc (datalen + SCREWIM_LEN, 0);
memcpy (ZSTR_VAL(ndata), SCREWIM, SCREWIM_LEN);
memcpy (ZSTR_VAL(ndata) + SCREWIM_LEN, datap, datalen);
datalen += SCREWIM_LEN;
ZSTR_VAL(ndata)[datalen] = '\0';
efree (datap);
RETVAL_STR (ndata);
zend_string_free (ndata);
}
/* end of PHP_FUNCTION (screwim_encrypt) }}} */
/* {{{ +-- PHP_FUNCTION (string) screwim_decrypt (string, (optional) key, (optional) magickey_len)
* return strings
*/
#ifdef SCREWIM_DECRYPT
PHP_FUNCTION (screwim_decrypt) {
zend_string * text;
zend_string * key = NULL;
zend_long header_len = -1;
SCREWData newdata;
int hlen = 0;
size_t datalen = 0;
char * datap;
// only execute on cli mode
if ( strcmp (sapi_module.name, "cli") != 0 )
php_error (E_ERROR, "screwim_decrypt() can only be executed in CLI mode");
else {
int uid = getuid ();
if ( uid != 0 ) {
php_error (E_ERROR, "screwim_decrypt() can only be executed by root privileges");
}
}
#if PHP_VERSION_ID < 60000
text = (zend_string *) emalloc (sizeof (zend_string));
ZSTR_VAL(text) = NULL;
ZSTR_LEN(text) = 0;
key = (zend_string *) emalloc (sizeof (zend_string));
ZSTR_VAL(key) = NULL;
ZSTR_LEN(key) = 0;
if ( zend_parse_parameters (ZEND_NUM_ARGS(), "s|sl", &ZSTR_VAL(text), &ZSTR_LEN(text), &ZSTR_VAL(key), &ZSTR_LEN(key), &header_len) == FAILURE )
#else
if ( zend_parse_parameters (ZEND_NUM_ARGS(), "S|Sl", &text, &key, &header_len) == FAILURE )
#endif
{
#if PHP_VERSION_ID < 60000
zend_string_free (text);
zend_string_free (key);
#endif
return;
}
#if PHP_VERSION_ID < 60000
if ( ZEND_NUM_ARGS() == 1 ) {
zend_string_free (key);
key = NULL;
}
#endif
if ( header_len < 0 ) {
if ( memcmp (ZSTR_VAL (text), SCREWIM, SCREWIM_LEN) != 0 ) {
php_error (E_WARNING, "no Crypted data");
RETVAL_STR (text);
#if PHP_VERSION_ID < 60000
zend_string_free (text);
zend_string_free (key);
#endif
return;
}
}
hlen = (header_len < 0) ? SCREWIM_LEN : header_len;
datalen = ZSTR_LEN (text) - hlen;
datap = (char *) emalloc (datalen + 1);
memset (datap, 0, datalen + 1);
memcpy (datap, ZSTR_VAL (text) + hlen, datalen);
newdata = screwim_ext_buf (
datap, datalen, (key != NULL) ? ZSTR_VAL (key) : NULL
);
#if PHP_VERSION_ID < 60000
zend_string_free (text);
zend_string_free (key);
#endif
efree (datap);
RETVAL_SCREWDATA (newdata);
efree (newdata.buf);
}
#endif
/* end of PHP_FUNCTION(screwim_decrypt) }}} */
/* {{{ +-- PHP_FUNCTION (object) screwim_seed (void)
* return strings
*/
#ifdef SCREWIM_DECRYPT
PHP_FUNCTION (screwim_seed) {
SCREWData key;
int i, j, buflen;
short * keybuf;
char * tmp;
char * keybyte;
char * keystr;
// only execute on cli mode
if ( strcmp (sapi_module.name, "cli") != 0 )
php_error (E_ERROR, "screwim_seed() can only be executed in CLI mode");
else {
int uid = getuid ();
if ( uid != 0 ) {
php_error (E_ERROR, "screwim_seed() can only be executed by root privileges");
}
}
if ( ZEND_NUM_ARGS () > 0 ) {
php_error (E_WARNING, "screwim_seed() expects exactly 0 parameter, %d given", ZEND_NUM_ARGS ());
return;
}
key = mcryptkey (NULL);
keybuf = (short *) key.buf;
buflen = key.len * 4;
keybyte = emalloc (buflen + 1);
memset (keybyte, 0, buflen + 1);
for ( i=0; i<key.len; i++ ) {
j = i * 4;
sprintf (keybyte + j, "%04x", revert_endian (keybuf[i]));
}
buflen = key.len * 7;
keystr = emalloc (buflen + 1);
memset (keystr, 0, buflen + 1);
for ( i=0; i<key.len; i++ ) {
j = strlen (keystr);
sprintf (keystr + j, "%d, ", keybuf[i]);
}
tmp = strrchr (keystr, ',');
if ( tmp != NULL )
*tmp = 0;
object_init (return_value);
screwim_add_property_string (return_value, "keybyte", keybyte);
screwim_add_property_string (return_value, "keystr", keystr);
add_property_long (return_value, "headerlen", SCREWIM_LEN);
efree (keybyte);
efree (keystr);
}
#endif
/* end of PHP_FUNCTION(screwim_seed) }}} */
/* {{{ +-- PHP Module resgistration
*/
zend_module_entry screwim_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
"screwim",
screwim_functions,
PHP_MINIT(screwim),
PHP_MSHUTDOWN(screwim),
NULL,
NULL,
PHP_MINFO(screwim),
#if ZEND_MODULE_API_NO >= 20010901
SCREWIM_VERSION, /* Replace with version number for your extension */
#endif
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_SCREWIM
ZEND_GET_MODULE (screwim);
#endif
PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN("screwim.enable", "0", PHP_INI_ALL, OnUpdateBool, enabled, zend_screwim_globals, screwim_globals)
PHP_INI_END()
PHP_MINFO_FUNCTION (screwim)
{
php_info_print_table_start ();
php_info_print_table_colspan_header (2, "PHP SCREW Imporved support");
php_info_print_table_row (2, "Summary", "PHP script encryption tool");
php_info_print_table_row (2, "URL", "http://github.com/OOPS-ORG-PHP/mod_screwim");
php_info_print_table_row (2, "Build version", SCREWIM_VERSION);
php_info_print_table_end ();
}
PHP_MINIT_FUNCTION (screwim)
{
CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;
ZEND_INIT_MODULE_GLOBALS(screwim, php_screwim_init_globals, NULL);
REGISTER_INI_ENTRIES();
org_compile_file = zend_compile_file;
zend_compile_file = screwim_compile_file;
return SUCCESS;
}
PHP_MSHUTDOWN_FUNCTION(screwim)
{
CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;
zend_compile_file = org_compile_file;
return SUCCESS;
}
/* end of PHP Module registration }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
*/