GRAYBYTE WORDPRESS FILE MANAGER1721

Server IP : 68.65.123.43 / Your IP : 216.73.216.162
System : Linux server266.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
PHP Version : 8.0.30
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /usr/libexec/mc/extfs.d/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /usr/libexec/mc/extfs.d//ulha
#! /bin/sh

#
# LHa Virtual filesystem executive v0.1
# Copyright (C) 1996, 1997 Joseph M. Hinkle
# May be distributed under the terms of the GNU Public License
# <jhinkle@rockisland.com>
#

# Code for mc_lha_fs_run() suggested by:
# Jan 97	Zdenek Kabelac <kabi@informatics.muni.cz>

# Tested with mc 3.5.18 and gawk 3.0.0 on Linux 2.0.0
# Tested with lha v1.01 and lharc v1.02
# Information and sources for other forms of lha/lzh appreciated

# Nota bene:
# There are several compression utilities which produce *.lha files.
# LHArc and LHa in exist several versions, and their listing output varies.
# Another variable is the architecture on which the compressed file was made.
# This program attempts to sort out the variables known to me, but it is likely
# to display an empty panel if it encounters a mystery. 
# In that case it will be useful to execute this file from the command line:
# ./lha list Mystery.lha
# to examine the output directly on the console.  The output string must be
# precisely in the format described in the README in this directory.
# Caveat emptor.
# Learn Latin.

# Define your awk
AWK=gawk

# Define which archiver you are using with appropriate options
LHA_LIST="lha lq"
LHA_GET="lha pq"
LHA_PUT="lha aq"

# The 'list' command executive

mc_lha_fs_list()
{
   # List the contents of the archive and sort it out    
   $LHA_LIST "$1" | $AWK -v uid=`id -nu` -v gid=`id -ng` '
      # Strip a leading '/' if present in a filepath
      $(NF) ~ /^\// { $(NF) = substr($NF,2) }
      # Print the line this way if there is no permission string
      $1 ~ /^\[.*\]/ {
         # Invent a generic permission
         $1 = ($NF ~ /\/$/) ? "drwxr-xr-x":"-rwxr--r--";
         # Print it
         printf "%s 1 %-8s %-8s %-8d %s %s %s %s\n",
                 $1, uid, gid, $2, $4, $5, $6, $7;
         # Get the next line of the list
         next;
      }
      # Do it this way for a defined permission
      $1 !~ /^\[.*\]/ {
         # If the permissions and UID run together
         if ($1 ~ /\//) {
            $8 = $7;
            $7 = $6;
            $6 = $5;
            $5 = $4;
            $3 = $2;
            $2 = substr($1,10);
            $1 = substr($1,1,9);
         }
         # If the permission string is missing a type
         if (length($1) == 9) {
            if ($NF ~ /\/$/)
               $1 = ("d" $1);
            else
               $1 = ("-" $1);
         }
         # UID:GID might not be the same as on your system so print numbers
         # Well, that is the intent.  At the moment mc is translating them.
         split($2, id, "/");
         printf "%s 1 %-8d %-8d %-8d %s %s %s %s\n",
                 $1, id[1], id[2], $3, $5, $6, $7, $8;
         # Get the next line of the list
         next;
      }

   ' 
}

# The 'copyout' command executive to copy displayed files to a destination

mc_lha_fs_copyout()
{
   $LHA_GET "$1" "$2" > "$3"
}

# The 'copyin' command executive to add something to the archive

mc_lha_fs_copyin ()
{
   NAME2=`basename "$2"`; DIR2=${2%$NAME2}
   NAME3=`basename "$3"`; DIR3=${3%$NAME3}

   cd "${DIR3}"

   ONE2=${2%%/*}
   [ -n "${ONE2}" ] || exit 1
   [ -e "${ONE2}" ] && exit 1

   [ -e "${DIR2}" ] || mkdir -p "${DIR2}"
   ln "$3" "$2"       || exit 1

   $LHA_PUT "$1" "$2"
   rm -r "${ONE2}"
}

# The 'run' command executive to run a command from within an archive

mc_lha_fs_run()
{
   TMPDIR=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-ulha.XXXXXX"` || exit 1
   trap "rm -rf \"$TMPDIR\"; exit 0" 1 2 3 4 15
   TMPCMD=$TMPDIR/run
   $LHA_GET "$1" "$2" > $TMPCMD  
   chmod a+x "$TMPCMD"
   "$TMPCMD"
   rm -rf "$TMPDIR"
}


# The main routine
umask 077

cmd="$1"
shift

case "$cmd" in
   list)    mc_lha_fs_list    "$@" ;;
   copyout) mc_lha_fs_copyout "$@" ;;
   copyin)  mc_lha_fs_copyin  "$@" ;;
   run)     mc_lha_fs_run     "$@" ;;
   *)       exit 1 ;;
esac

exit 0

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
March 21 2024 09:31:16
root / root
0755
README
7.287 KB
March 04 2017 17:26:20
root / root
0644
README.extfs
1.107 KB
February 24 2017 20:25:57
root / root
0644
a+
3.131 KB
October 18 2019 20:37:56
root / root
0755
apt+
9.498 KB
October 18 2019 20:37:56
root / root
0755
audio
1.289 KB
October 18 2019 20:37:56
root / root
0755
bpp
1.179 KB
February 24 2017 20:25:57
root / root
0755
changesetfs
2.502 KB
February 24 2017 20:25:57
root / root
0755
deb
5.336 KB
October 18 2019 20:37:56
root / root
0755
deba
3.002 KB
October 18 2019 20:37:56
root / root
0755
debd
10.257 KB
October 18 2019 20:37:56
root / root
0755
dpkg+
8.787 KB
October 18 2019 20:37:56
root / root
0755
gitfs+
0.764 KB
February 24 2017 20:25:57
root / root
0755
hp48+
3.575 KB
October 18 2019 20:37:56
root / root
0755
iso9660
5.646 KB
October 18 2019 20:37:56
root / root
0755
lslR
1.377 KB
October 18 2019 20:37:56
root / root
0755
mailfs
5.586 KB
October 18 2019 20:37:56
root / root
0755
patchfs
10.885 KB
October 18 2019 20:37:56
root / root
0755
patchsetfs
2.256 KB
February 24 2017 20:25:57
root / root
0755
rpm
13.251 KB
March 04 2017 17:26:20
root / root
0755
rpms+
1.474 KB
October 18 2019 20:37:56
root / root
0755
trpm
7.652 KB
February 24 2017 20:25:57
root / root
0755
u7z
4.71 KB
March 04 2017 17:26:20
root / root
0755
uace
1.473 KB
October 18 2019 20:37:56
root / root
0755
ualz
1.25 KB
October 18 2019 20:37:56
root / root
0755
uar
1.292 KB
October 18 2019 20:37:56
root / root
0755
uarc
1.785 KB
October 18 2019 20:37:56
root / root
0755
uarj
1.616 KB
October 18 2019 20:37:56
root / root
0755
ucab
0.717 KB
October 18 2019 20:37:56
root / root
0755
uha
0.946 KB
October 18 2019 20:37:56
root / root
0755
ulha
3.779 KB
October 18 2019 20:37:56
root / root
0755
ulib
2.759 KB
October 18 2019 20:37:56
root / root
0755
urar
4.369 KB
October 18 2019 20:37:56
root / root
0755
uzip
14.903 KB
October 18 2019 20:37:56
root / root
0755
uzoo
1.563 KB
October 18 2019 20:37:56
root / root
0755

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF