Gnutella Forums  

Go Back   Gnutella Forums > Gnutella News and Gnutelliums Forums > General Gnutella Development Discussion
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

General Gnutella Development Discussion For general discussion about Gnutella development.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old December 20th, 2005
Enthusiast
 
Join Date: November 29th, 2005
Posts: 43
snayit is flying high
Default Trying to upload a file

But i've encountered several problems that lead me to the conclusion that i am missing something here.

Right now my biggest problem is that sending queryHit with a different sha1 for the file (not the correct one, just one i made up) starts the DL, where as using the correct one (should be, i've calculated the sha1) give me "no sources" in gtk-gnutella and the DL won't start. Other than the sha1 - the queryHit is the same - but with the fake sha1 i also get the HTTP GET message that asks for the file and i don't get it using the real sha1.

The reason i'm doing that is to test calculating the sha1 for a file i already have - when using the fake sha1 after i finish DL (using both gtk-gnutella and Phex for DL the file from my program) - it gives me a message about wrong sha1 (of course, i made the sha1 up) and restarting DL. Now i wanted to check the correct sha1 - and expected not to see this message.

This is my biggest problem right now, please help.
Reply With Quote
  #2 (permalink)  
Old December 20th, 2005
flame-retardant
 
Join Date: November 22nd, 2005
Posts: 196
Hyper-kun is a great assister to others; your light through the dark tunnel
Default

The problem might be that Gtk-Gnutella remembers the SHA1s of files it has downloaded before. That could cause the "no sources" issue if you try to run your test multiple times. Remove ~/gtk-gnutella/done.* or hack the sources to skip this check in src/core/ignore.c.
Reply With Quote
  #3 (permalink)  
Old December 20th, 2005
Enthusiast
 
Join Date: November 29th, 2005
Posts: 43
snayit is flying high
Default Thanks for the response

But i have more info - the thing is more complex than what i thought:
My sha1 as i calculated it is: 3IRE53N5YXBD2AFSPHPWPMINI53O63DB.
If i change the first I to R or T - it works! meaning the only thing that does not work for me is this particular sha1 or something.

Also - this happens in LimeWire as well. I have the code on my Eclipse so i can debug it and see why the sha1 i've calculated using the LW/FW's code does not work (meaning it does not send me the GET message) but if i destroy it (change it randomally) - it does.

Any thoughts? Maybe where to look in the code (i'm starting digging, i'll see what i come up with).
Reply With Quote
  #4 (permalink)  
Old December 20th, 2005
flame-retardant
 
Join Date: November 22nd, 2005
Posts: 196
Hyper-kun is a great assister to others; your light through the dark tunnel
Default

Try a file consisting of 500 NUL bytes. What urn:sha1 do you get?
Reply With Quote
  #5 (permalink)  
Old December 20th, 2005
Enthusiast
 
Join Date: November 29th, 2005
Posts: 43
snayit is flying high
Default I tried what you said

I printed this buffer - 500 times 0 that i've created like this:
ByteBuffer buffer = ByteBuffer.allocate(500);
printed to a file, than i asked my method call to generate sha1 for this and the result is: 7RLNJM6HFKF74WJTOPDUBVKY5QJUBLDT
Is it okay?

Other than that, i don't understand - if i faked a sha1 it asks for the file and if i give it the sha1 the i generated i don't? why is the fake better than the calculated one?
Reply With Quote
  #6 (permalink)  
Old December 20th, 2005
flame-retardant
 
Join Date: November 22nd, 2005
Posts: 196
Hyper-kun is a great assister to others; your light through the dark tunnel
Default

Yes, the SHA1 one is correct. If you share this file and report it in a query hit, there's no attempt at all to download it?
Reply With Quote
  #7 (permalink)  
Old December 20th, 2005
Enthusiast
 
Join Date: November 29th, 2005
Posts: 43
snayit is flying high
Default See?! now i've inserted the sha1 of the nulls

and still it asked me the file. I change only the sha1 to the one for the file with the nulls and i got a request:
GET /uri-res/N2R?urn:sha1:7RLNJM6HFKF74WJTOPDUBVKY5QJUBLDT HTTP/1.1

Why when i change the sha1 to the URN for the real file it doesn't request anything? it doesn't check for validation, so what's wrong?
Again, the only thing i change is the sha1 string - nothing else.
Reply With Quote
  #8 (permalink)  
Old December 20th, 2005
flame-retardant
 
Join Date: November 22nd, 2005
Posts: 196
Hyper-kun is a great assister to others; your light through the dark tunnel
Default

Gtk-Gnutella - and the same applies probably to most clients - won't download files you share respectively already own. Maybe that's the reason?
Reply With Quote
  #9 (permalink)  
Old December 20th, 2005
Enthusiast
 
Join Date: November 29th, 2005
Posts: 43
snayit is flying high
Default No - every time i try it's the same file name

the only thing i change in the queryHit is the sha1 - i change letters and sometimes the whole sha1. It allows me to DL the same file over and over again - just when i double click on the search result with the calculated sha1 it doesn't send me the GET request - only with the sha1 i stated in my msg. Every other sha1 i insert is ok for the clients.

I will now search in FW/LW's code what happens after i double click the file name from the search result - and take it from there. If anyone can help i'll be gratefull.
Reply With Quote
  #10 (permalink)  
Old December 20th, 2005
flame-retardant
 
Join Date: November 22nd, 2005
Posts: 196
Hyper-kun is a great assister to others; your light through the dark tunnel
Default

For what it's worth, the file is badly encoded or recorded.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
upload non existent file? lagrepr Download/Upload Problems 2 April 2nd, 2007 01:39 PM
How do I upload a file? UnderDog28 Download/Upload Problems 12 April 14th, 2006 11:00 PM
How To Upload a file??? SlowFinger Download/Upload Problems 3 February 24th, 2006 12:49 AM
how i upload i file? REDRIDER16 Open Discussion topics 1 January 6th, 2005 07:36 PM
how do you upload a SIT file? eskmo Download/Upload Problems 2 September 8th, 2002 10:30 AM


All times are GMT -7. The time now is 06:57 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.