JMule project forum
http://forum.jmule.org/

Search by HASH
http://forum.jmule.org/viewtopic.php?f=7&t=690
Page 2 of 3

Author:  binary256 [ Sun Jun 27, 2010 5:01 pm ]
Post subject:  Re: Search by HASH

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

Author:  pepelux [ Sun Jun 27, 2010 5:11 pm ]
Post subject:  Re: Search by HASH

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?

Author:  binary256 [ Sun Jun 27, 2010 5:18 pm ]
Post subject:  Re: Search by HASH

After receiving OP_FOUNDSOURCES you can connect to returned sources and obtain information about file : name, availability, rating etc.

Author:  pepelux [ Sun Jun 27, 2010 5:30 pm ]
Post subject:  Re: Search by HASH

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

Author:  binary256 [ Sun Jun 27, 2010 5:32 pm ]
Post subject:  Re: Search by HASH

You must send hash and file size...

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

Author:  pepelux [ Sun Jun 27, 2010 5:39 pm ]
Post subject:  Re: Search by HASH

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

Author:  binary256 [ Sun Jun 27, 2010 5:55 pm ]
Post subject:  Re: Search by HASH

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.

Author:  pepelux [ Sun Jun 27, 2010 6:08 pm ]
Post subject:  Re: Search by HASH

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

Author:  binary256 [ Sun Jun 27, 2010 6:14 pm ]
Post subject:  Re: Search by HASH

(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).

Author:  pepelux [ Sun Jun 27, 2010 6:18 pm ]
Post subject:  Re: Search by HASH

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

Page 2 of 3 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/