/tech/ - Tech

Technology.

catalog
Mode: Reply
Name
E-mail
Subject
Message

Max message length: 8192

Files

Max file size: 80.00 MB

Max files: 5

Password

(used to delete files and postings)

Misc

Remember to follow the rules


Image restoration Comrade 01/10/2021 (Sun) 12:19:36 No. 6966
Any 1337 hackers wanna help find and restore the missing images?
Here's a script to find the missing images: #!/bin/bash board=$1 thread=$2 curl -s "https://bunkerchan.xyz/${board}/res/${thread}.json" \ | jq '.posts[].files[].path' \ | tr -d '"' \ | sort -u \ | sed s_^_https://bunkerchan.xyz_ \ | xargs -n 1 -P 1 \ curl -s -I -o /dev/null -w "%{http_code} %{url_effective}\\n" \ >> "${board}_${thread}.log" 2>&1 When run as "./missing-images.sh anime 101" it will produce "anime_101.log" that contains the status code of each file in the thread. You can filter out the okay ones with grep.
>>6968 Getting a list of threads is as easy as: #!/bin/sh board=$1 curl -s "https://bunkerchan.xyz/${board}/catalog.json" \ | jq ".[].threadId" \ | sort -un You can combine the two: ./find-threads dead | xargs -n1 -P4 ./missing-files.sh dead
If you have reasonable suspicion that a certain other site that runs a variant of tinyboard has some of the files you are looking for, this will get you all the files in a thread with the md5sum: #!/bin/bash site="${1}" board="${2}" thread="${3}" # normal images normal='.posts[] | select(has("ext")) | (.tim + .ext + " " + .md5)' extra='.posts[] | select(has("extra_files")) | .extra_files[] | .tim + .ext + " " + .md5' json=$(curl -s "https://${site}/${board}/res/${thread}.json") normal_files=$(jq "${normal}" [orange][orange][orange]"${json}" | tr -d '"') extra_files=$(jq "${extra}" [orange][orange][orange]"${json}" | tr -d '"') while read name md5; do echo "$(base64 -d [orange][orange][orange] "${md5}" | xxd -p) https://${site}/${board}/src/${name}" done [orange][orange][orange] "${normal_files} ${extra_files}"
>>6968 It seems to miss the extension in some cases?
>>6971 It seems that in this cases it is bunkerchan that is wrong, see >>>/dead/93 for example, both in the html and json the extensions are missing...

Delete
Report

no cookies?
__divBanCaptcha_location__