| View previous topic :: View next topic |
| Author |
Message |
tecneeq neophyte

Joined: 30 Oct 2002 Posts: 2 Location: Germany
|
Posted: Wed Dec 12, 2012 1:33 pm Post subject: Oh no, downloaded files are intact, but lost their names ;( |
|
|
I have a 1 TB USB disk with all my downloaded files on it. Suddenly one of my scripts went bottom up and renamed all my files from 00001 to 01311.
Oh no!
The files are still ok, i can create a hash with ed2k_hash, but how can i get the names of the files back? They are most likely still out there somewhere.
Is it possible to search for a hash with mldonky, so that it returns a list of names? Wich i can then use outside of mldonkey to pick the most likely opne manually?
Also: Hi! This is my first post in the last 10 years.  |
|
| Back to top |
|
 |
ygrek professional

Joined: 20 Mar 2010 Posts: 521
|
Posted: Thu Dec 13, 2012 10:45 am Post subject: |
|
|
mldonkey stores names and hashes of all shared files in one of the ini files in it's home directory, but you will have to do some parsing to extract them. _________________ Download | Report bugs | git mirror |
|
| Back to top |
|
 |
tecneeq neophyte

Joined: 30 Oct 2002 Posts: 2 Location: Germany
|
Posted: Thu Dec 13, 2012 2:41 pm Post subject: |
|
|
Right! However, i installed my system new around 2010, so there aren't as many filenames in there as i hoped. Some files are from osloskop, so i fetched all the links from there. I now have about 20% of the filenames recovered.
In case someone wants to wrap his head around it:
| Code: | #!/bin/bash
# get-osloskop-ed2k-links - print ed2k links from osloskop.net
# On osloskop.net the ed2k links are in a javascript array and obfuscated
# with rot13. So i need to do some magic to get them in plain text.
# The links are in pages from 00001 up to 60940 as of dez.13.2012
start=60935
stop=60940
for ((i=$start;i<=$stop;i++)); do
[[ $i -lt $start ]] && continue
wget -O- "http://www.osloskop.net/r/$(printf "%0*d\n" 5 $i).html" 2>/dev/null | \
grep lista | \
sed -e 's/Array("/\n"/g' -e 's/")/"\n/g' -e 'y/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM/' | \
grep "^\"" | \
while IFS=, read name size hash csum ; do
[[ ${#name} -lt 3 ]] && continue
[[ ${#csum} -gt 2 ]] && echo "ed2k://|file|${name//\"/}|${size//\"/}|${hash//\"/}|${csum//\"/}|/" || echo "ed2k://|file|${name//\"/}|${size//\"/}|${hash//\"/}|/"
done
sleep $(($RANDOM%10))
done |
I'm still looking for ways to get names from a hash, so i'm open to suggestions. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © phpBB Group
|
|
|
|