1234 too popular

This commit is contained in:
ed 2020-06-24 23:52:42 +00:00
parent a7da1dd233
commit ce36c52baf
4 changed files with 9 additions and 9 deletions

View file

@ -32,7 +32,7 @@ except:
mount a copyparty server (local or remote) as a filesystem mount a copyparty server (local or remote) as a filesystem
usage: usage:
python copyparty-fuse.py ./music http://192.168.1.69:1234/ python copyparty-fuse.py ./music http://192.168.1.69:3923/
dependencies: dependencies:
sudo apk add fuse-dev sudo apk add fuse-dev

View file

@ -118,7 +118,7 @@ printf ']}' >> /dev/shm/$salt.hs
printf '\033[36m' 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 cat /dev/shm/$salt.hs
} | } |
tee /dev/shm/$salt.hsb | tee /dev/shm/$salt.hsb |
ncat $target 1234 | ncat $target 3923 |
tee /dev/shm/$salt.hs1r tee /dev/shm/$salt.hs1r
wark="$(cat /dev/shm/$salt.hs1r | getwark)" wark="$(cat /dev/shm/$salt.hs1r | getwark)"
@ -190,7 +190,7 @@ EOF
nchunk=$((nchunk+1)) nchunk=$((nchunk+1))
done | done |
ncat $target 1234 | ncat $target 3923 |
tee /dev/shm/$salt.pr tee /dev/shm/$salt.pr
t=$(date +%s.%N) t=$(date +%s.%N)
@ -201,7 +201,7 @@ t=$(date +%s.%N)
printf '\033[36m' printf '\033[36m'
ncat $target 1234 < /dev/shm/$salt.hsb | ncat $target 3923 < /dev/shm/$salt.hsb |
tee /dev/shm/$salt.hs2r | tee /dev/shm/$salt.hs2r |
grep -E '"hash": ?\[ *\]' grep -E '"hash": ?\[ *\]'

View file

@ -127,7 +127,7 @@ def main():
"-c", metavar="PATH", type=str, action="append", help="add config file" "-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("-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("-nc", metavar="NUM", type=int, default=16, help="max num clients")
ap.add_argument( ap.add_argument(
"-j", metavar="CORES", type=int, default=1, help="max num cpu cores" "-j", metavar="CORES", type=int, default=1, help="max num cpu cores"

View file

@ -13,7 +13,7 @@ head -c $((2*1024*1024*1024)) /dev/zero | openssl enc -aes-256-ctr -pass pass:hu
## testing multiple parallel uploads ## testing multiple parallel uploads
## usage: para | tee log ## 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<s;n++)); do curl -sF "act=bput" -F "f=@garbage.file" http://127.0.0.1:1234/ 2>&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<s;n++)); do curl -sF "act=bput" -F "f=@garbage.file" http://127.0.0.1:3923/ 2>&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') fn=$(printf '\xba\xdc\xab.cab')
echo asdf > "$fn" 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 ## 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
## ##