Server IP : 127.0.0.2 / Your IP : 13.59.90.172 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/mc/fish/ |
Upload File : |
#RETR $FISH_FILENAME $FISH_START_OFFSET LC_TIME=C export LC_TIME fish_get_perl () { FILENAME=$1 OFFSET=$2 perl -e ' use strict; use POSIX; use Fcntl; my $filename = $ARGV[0]; my $pos = $ARGV[1]; my $content; my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = lstat("$filename"); my $n; if (open IFILE,$filename) { if ($size<$pos) { printf("0\n"); } else { $size-=$pos; printf("$size\n"); } printf("### 100\n"); seek (IFILE, $pos, 0); while ($n = read(IFILE,$content,$blksize)!= 0) { print $content; } close IFILE; printf("### 200\n"); } else { printf("### 500\n"); } exit 0 ' "${FILENAME}" $OFFSET } fish_get_tail () { FILENAME=$1 OFFSET=$2 LC_TIME=C export LC_TIME if dd if="${FILENAME}" of=/dev/null bs=1 count=1 2>/dev/null ; then file_size=`ls -ln "${FILENAME}" 2>/dev/null | ( read p l u g s r echo $s )` if [ $OFFSET -gt 0 ]; then file_size=`expr $file_size - $OFFSET` OFFSET=`expr $OFFSET + 1` fi if [ $file_size -gt 0 ]; then echo $file_size else echo 0 fi echo "### 100" if [ $OFFSET -gt 0 ]; then tail -c +${OFFSET} "${FILENAME}" else cat "${FILENAME}" fi echo "### 200" else echo "### 500" fi } fish_get_dd () { FILENAME=$1 OFFSET=$2 LC_TIME=C export LC_TIME if dd if="${FILENAME}" of=/dev/null bs=1 count=1 2>/dev/null ; then file_size=`ls -ln "${FILENAME}" 2>/dev/null | ( read p l u g s r echo $s )` file_size=`expr $file_size - $OFFSET` if [ $file_size -gt 0 ]; then echo $file_size else echo 0 fi echo "### 100" if [ $OFFSET -gt 0 ]; then dd skip=$OFFSET ibs=1 if="${FILENAME}" 2>/dev/null else cat "${FILENAME}" fi echo "### 200" else echo "### 500" fi } if [ -n "${FISH_HAVE_PERL}" ]; then fish_get_perl "/${FISH_FILENAME}" ${FISH_START_OFFSET} elif [ -n "${FISH_HAVE_TAIL}" ]; then fish_get_tail "/${FISH_FILENAME}" ${FISH_START_OFFSET} else fish_get_dd "/${FISH_FILENAME}" ${FISH_START_OFFSET} fi