ENTERPRISE packaging (closes #941);

introduce copyparty-en.pyz, affectionately known as companyparty.pyz

like copyparty-en.py, it is english-only but with a twist;
also remove smb support because the impacket references can look sus
This commit is contained in:
ed 2025-10-22 22:20:57 +00:00
parent b624a38747
commit 7f5810f1a7
5 changed files with 35 additions and 9 deletions

View file

@ -204,6 +204,7 @@ other places to download copyparty from (non-github links):
* https://copyparty.eu/py = https://copyparty.eu/copyparty-sfx.py = the sfx
* https://copyparty.eu/en = https://copyparty.eu/copyparty-en.py = the english-only sfx
* https://copyparty.eu/pyz = https://copyparty.eu/copyparty.pyz = the zipapp
* https://copyparty.eu/enz = https://copyparty.eu/copyparty-en.pyz = the enterprise pyz
* https://copyparty.eu/cli = online cli helptext
@ -3078,7 +3079,8 @@ another emergency alternative, [copyparty.pyz](https://github.com/9001/copyparty
run it by doubleclicking it, or try typing `python copyparty.pyz` in your terminal/console/commandline/telex if that fails
it is a python [zipapp](https://docs.python.org/3/library/zipapp.html) meaning it doesn't have to unpack its own python code anywhere to run, so if the filesystem is busted it has a better chance of getting somewhere
* but note that it currently still needs to extract the web-resources somewhere (they'll land in the default TEMP-folder of your OS)
> there is also [copyparty-en.pyz](https://github.com/9001/copyparty/releases/latest/download/copyparty-en.pyz), english-only and without smb support (enterprise-friendly)
# install on android

View file

@ -383,8 +383,8 @@ class HttpSrv(object):
if nloris < nconn / 2:
continue
t = "slowloris (idle-conn): {} banned for {} min"
self.log(self.name, t.format(ip, self.args.loris, nclose), 1)
t = "slow%s (idle-conn): %s banned for %d min" # slowloris
self.log(self.name, t % ("loris", ip, self.args.loris), 1)
self.bans[ip] = int(time.time() + self.args.loris * 60)
if self.args.log_conn:

View file

@ -41,8 +41,10 @@ rm -rf pyz
mkdir -p pyz
cd pyz
cp -pR ../sfx/{copyparty,partftpy} .
cp -pR ../sfx/{ftp,j2}/* .
cp -pR ../sfx/copyparty .
cp -pR ../sfx/j2/* .
[ -e ../sfx/partftpy ] && cp -pR ../sfx/partftpy .
[ -e ../sfx/ftp ] && cp -pR ../sfx/ftp/* .
true && {
rm -rf copyparty/web/mde.* copyparty/web/deps/easymde*

View file

@ -445,14 +445,27 @@ iawk '/^class _Base/{s=1}!s' ftp/pyftpdlib/authorizers.py
iawk '/^ {0,4}[a-zA-Z]/{s=0}/^ {4}def (serve_forever|_loop)/{s=1}!s' ftp/pyftpdlib/servers.py
rm -f ftp/pyftpdlib/{__main__,prefork}.py
[ $no_ftp ] &&
unhelp() {
iawk '!/add_argument\("--'$1'/{print;next}
/ent\("--'$1'"/{print gensub(/(help=")[^"]+/,"\\1not available in this build","1");next}
{sub(/help=.*/,"help=argparse.SUPPRESS)")}1' copyparty/__main__.py
}
[ $no_ftp ] && {
unhelp ftp
rm -rf copyparty/ftpd.py ftp
}
[ $no_tfp ] &&
[ $no_tfp ] && {
unhelp tftp
rm -rf copyparty/tftpd.py partftpy
}
[ $no_smb ] &&
[ $no_smb ] && {
unhelp smb
rm -f copyparty/smbd.py
ised 's/^( {8}elif )record\.name.*"impacket".*/\10:/' copyparty/util.py
}
[ $no_zm ] &&
rm -rf copyparty/mdns.py copyparty/stolen/dnslib

View file

@ -49,14 +49,23 @@ while [ "$1" ]; do
done
./make-pyz.sh
mv ../dist/copyparty{,-int}.pyz
./make-sfx.sh re lang eng "$@"
mv ../dist/copyparty-{sfx,en}.py
rm -rf /tmp/pe-copyparty* ../sfx
../dist/copyparty-en.py --version >/dev/null 2>&1
./make-sfx.sh re no-smb "$@"
./make-pyz.sh
mv ../dist/copyparty{,-en}.pyz
mv ../dist/copyparty{-int,}.pyz
mv ../dist/copyparty-{int,sfx}.py
./genhelp.sh
[ $rls ] || exit # ----------------------------------------------------
[ $rls ] || exit 0 # ----------------------------------------------------
./prep.sh
git add ../contrib/package/arch/PKGBUILD ../contrib/package/makedeb-mpr/PKGBUILD ../contrib/package/nix/copyparty/pin.json