From ce36c52bafda740f532fad890d5639097dd117a4 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 24 Jun 2020 23:52:42 +0000 Subject: [PATCH] 1234 too popular --- bin/copyparty-fuse.py | 2 +- bin/up2k.sh | 8 ++++---- copyparty/__main__.py | 2 +- docs/notes.sh | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/copyparty-fuse.py b/bin/copyparty-fuse.py index a12b8220..f5b1468f 100644 --- a/bin/copyparty-fuse.py +++ b/bin/copyparty-fuse.py @@ -32,7 +32,7 @@ except: mount a copyparty server (local or remote) as a filesystem usage: - python copyparty-fuse.py ./music http://192.168.1.69:1234/ + python copyparty-fuse.py ./music http://192.168.1.69:3923/ dependencies: sudo apk add fuse-dev diff --git a/bin/up2k.sh b/bin/up2k.sh index b5b1920c..e81ed332 100755 --- a/bin/up2k.sh +++ b/bin/up2k.sh @@ -118,7 +118,7 @@ printf ']}' >> /dev/shm/$salt.hs printf '\033[36m' -#curl "http://$target:1234$posturl/handshake.php" -H "Content-Type: text/plain;charset=UTF-8" -H "Cookie: cppwd=$passwd" --data "$(cat "/dev/shm/$salt.hs")" | tee /dev/shm/$salt.res +#curl "http://$target:3923$posturl/handshake.php" -H "Content-Type: text/plain;charset=UTF-8" -H "Cookie: cppwd=$passwd" --data "$(cat "/dev/shm/$salt.hs")" | tee /dev/shm/$salt.res { { @@ -135,7 +135,7 @@ EOF cat /dev/shm/$salt.hs } | tee /dev/shm/$salt.hsb | -ncat $target 1234 | +ncat $target 3923 | tee /dev/shm/$salt.hs1r wark="$(cat /dev/shm/$salt.hs1r | getwark)" @@ -190,7 +190,7 @@ EOF nchunk=$((nchunk+1)) done | -ncat $target 1234 | +ncat $target 3923 | tee /dev/shm/$salt.pr t=$(date +%s.%N) @@ -201,7 +201,7 @@ t=$(date +%s.%N) printf '\033[36m' -ncat $target 1234 < /dev/shm/$salt.hsb | +ncat $target 3923 < /dev/shm/$salt.hsb | tee /dev/shm/$salt.hs2r | grep -E '"hash": ?\[ *\]' diff --git a/copyparty/__main__.py b/copyparty/__main__.py index 621e2f91..9facd25e 100644 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -127,7 +127,7 @@ def main(): "-c", metavar="PATH", type=str, action="append", help="add config file" ) ap.add_argument("-i", metavar="IP", type=str, default="0.0.0.0", help="ip to bind") - ap.add_argument("-p", metavar="PORT", type=int, default=1234, help="port to bind") + ap.add_argument("-p", metavar="PORT", type=int, default=3923, help="port to bind") ap.add_argument("-nc", metavar="NUM", type=int, default=16, help="max num clients") ap.add_argument( "-j", metavar="CORES", type=int, default=1, help="max num cpu cores" diff --git a/docs/notes.sh b/docs/notes.sh index 0ac321c5..ba66ff2e 100644 --- a/docs/notes.sh +++ b/docs/notes.sh @@ -13,7 +13,7 @@ head -c $((2*1024*1024*1024)) /dev/zero | openssl enc -aes-256-ctr -pass pass:hu ## testing multiple parallel uploads ## usage: para | tee log -para() { for s in 1 2 3 4 5 6 7 8 12 16 24 32 48 64; do echo $s; for r in {1..4}; do for ((n=0;n&1 & done; wait; echo; done; done; } +para() { for s in 1 2 3 4 5 6 7 8 12 16 24 32 48 64; do echo $s; for r in {1..4}; do for ((n=0;n&1 & done; wait; echo; done; done; } ## @@ -36,13 +36,13 @@ for dir in "${dirs[@]}"; do for fn in ふが "$(printf \\xed\\x93)" 'qwe,rty;asd fn=$(printf '\xba\xdc\xab.cab') echo asdf > "$fn" -curl --cookie cppwd=wark -sF "act=bput" -F "f=@$fn" http://127.0.0.1:1234/moji/%ED%91/ +curl --cookie cppwd=wark -sF "act=bput" -F "f=@$fn" http://127.0.0.1:3923/moji/%ED%91/ ## ## test compression -wget -S --header='Accept-Encoding: gzip' -U 'MSIE 6.0; SV1' http://127.0.0.1:1234/.cpr/deps/ogv.js -O- | md5sum; p=~ed/dev/copyparty/copyparty/web/deps/ogv.js.gz; md5sum $p; gzip -d < $p | md5sum +wget -S --header='Accept-Encoding: gzip' -U 'MSIE 6.0; SV1' http://127.0.0.1:3923/.cpr/deps/ogv.js -O- | md5sum; p=~ed/dev/copyparty/copyparty/web/deps/ogv.js.gz; md5sum $p; gzip -d < $p | md5sum ##