MLDonkey Forum Index
Homepage •  Bugs •  Tasks •  Patches •  SF.net Project Page •  ChangeLog •  German forum •  Links •  Wiki •  Downloads
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Oh no, downloaded files are intact, but lost their names ;(

 
Post new topic   Reply to topic    MLDonkey Forum Index -> Problems with MLDonkey Client (in general, and ed2k, kad, overnet)
View previous topic :: View next topic  
Author Message
tecneeq
neophyte


Joined: 30 Oct 2002
Posts: 2
Location: Germany

PostPosted: Wed Dec 12, 2012 1:33 pm    Post subject: Oh no, downloaded files are intact, but lost their names ;( Reply with quote

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! Embarassed


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. Very Happy
Back to top
View user's profile Send private message
ygrek
professional


Joined: 20 Mar 2010
Posts: 595

PostPosted: Thu Dec 13, 2012 10:45 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
tecneeq
neophyte


Joined: 30 Oct 2002
Posts: 2
Location: Germany

PostPosted: Thu Dec 13, 2012 2:41 pm    Post subject: Reply with quote

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. Very Happy

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    MLDonkey Forum Index -> Problems with MLDonkey Client (in general, and ed2k, kad, overnet) All times are GMT
Page 1 of 1

 
Jump to:  
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


Sourceforge.net Logo