JMule project forum

JMule - Java file sharing client
 

It is currently Tue Sep 26, 2017 9:12 am

Your Ad Here


Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
Offline
 Post subject: Re: Search by HASH
PostPosted: Sun Jun 27, 2010 5:01 pm 
JMule staff member
JMule staff member
User avatar
 Profile

Joined: Fri Jul 11, 2008 4:10 pm
Posts: 33
With OP_GETSOURCES can be obtained ClientID and port of source but OP_GETSOURCES is used in Client - Server communication.

http://jmule.org/?page=protocol&protolid=10
http://jmule.org/?page=protocol&protolid=11


Top
 

Offline
 Post subject: Re: Search by HASH
PostPosted: Sun Jun 27, 2010 5:11 pm 
 Profile

Joined: Sun Jun 27, 2010 4:09 pm
Posts: 8
Yes, I know, but if you like to search a file by hash ... can you ask to the server which clients have the file? 'Found Sources' return a list of clients (ip:port) that have the file you search by a 'Get Sources' ... or I am wrong?


Top
 

Offline
 Post subject: Re: Search by HASH
PostPosted: Sun Jun 27, 2010 5:18 pm 
JMule staff member
JMule staff member
User avatar
 Profile

Joined: Fri Jul 11, 2008 4:10 pm
Posts: 33
After receiving OP_FOUNDSOURCES you can connect to returned sources and obtain information about file : name, availability, rating etc.


Top
 

Offline
 Post subject: Re: Search by HASH
PostPosted: Sun Jun 27, 2010 5:30 pm 
 Profile

Joined: Sun Jun 27, 2010 4:09 pm
Posts: 8
I try to send:

E3 11 00 00 00 19 A4 4A 2A 81 43 DE 78 CA A2 3E A1 73 BB 96 40 BD

Protocol E3
Size 11 00 00 00
Type 19 // OP_GETSOURCES
Hash file A4 4A 2A 81 43 DE 78 CA A2 3E A1 73 BB 96 40 BD

But obtain ... 'ERROR : Your client is too old, please upgrade it to last version'

Any idea?

thanks


Top
 

Offline
 Post subject: Re: Search by HASH
PostPosted: Sun Jun 27, 2010 5:32 pm 
JMule staff member
JMule staff member
User avatar
 Profile

Joined: Fri Jul 11, 2008 4:10 pm
Posts: 33
You must send hash and file size...

http://jmule.org/?page=protocol&protolid=10


Top
 

Offline
 Post subject: Re: Search by HASH
PostPosted: Sun Jun 27, 2010 5:39 pm 
 Profile

Joined: Sun Jun 27, 2010 4:09 pm
Posts: 8
If I try to send hash and filesize (with type 0x58) no obtain response :(

protocol E3
size 15 00 00 00
type 58
hash A4 4A 2A 81 43 DE 78 CA A2 3E A1 73 BB 96 40 BD
filesize 02 38 E6 02


Top
 

Offline
 Post subject: Re: Search by HASH
PostPosted: Sun Jun 27, 2010 5:55 pm 
JMule staff member
JMule staff member
User avatar
 Profile

Joined: Fri Jul 11, 2008 4:10 pm
Posts: 33
File size is represented in little endian byte order, 0x58 is used in client-client communications.

Before request file from peer you must establish initial handshake :
0. Connect to specified client if high id / request callback if client is low id
1. send hello
2. wait for response
3. request file, request file status, hash set etc.


Top
 

Offline
 Post subject: Re: Search by HASH
PostPosted: Sun Jun 27, 2010 6:08 pm 
 Profile

Joined: Sun Jun 27, 2010 4:09 pm
Posts: 8
how can connect client-client if I don't know the client IP? I do:

(C->S) Send Login (Hello)
(S->C) Connect to port 23504 with a Hello
(C->S) Response from port 23504 with a Hello Answer
(S->C) Response with an ID change (we obtain the Client ID)
(C->S) Send a Search request
(S->C) Obtain a Search Answer

and with the search answer i find a hashfile and try to obtain a list of clients (with Get Sources) .... is wrong?

thanks a lot


Top
 

Offline
 Post subject: Re: Search by HASH
PostPosted: Sun Jun 27, 2010 6:14 pm 
JMule staff member
JMule staff member
User avatar
 Profile

Joined: Fri Jul 11, 2008 4:10 pm
Posts: 33
(S->C) Obtain a Search Answer : server reply with list of ClientIDs and ports, if ClientID is HighID you can use ClientID as IP address and connect to specified IP and port, if ClientID is LowID request callback from server.
You can't just request OP_FILEREQUEST, first establish handshake(send hello, receive hello answer).


Top
 

Offline
 Post subject: Re: Search by HASH
PostPosted: Sun Jun 27, 2010 6:18 pm 
 Profile

Joined: Sun Jun 27, 2010 4:09 pm
Posts: 8
I send Hello and recived a High ID

If I try to do a search I obtain data

I'm going to try a File Request

thanks a lot


Top
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2, 3  Next


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
cron
Contact : jmule [at] jmule.org
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group