Jump to content

c000kie

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

c000kie's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yea' that's what I'm trying to do.. because I don't really need to use it as a client but as a peer connector to verify if there really is a peer at that given IP address. (best solution against fakers that I could think at) The python code is very large.. that's why I'm having trouble with understanding it.. Here is torrentflux: http://tf-b4rt.berlios.de/ The most popular PHP(interface) client.
  2. Well, problem is I tried that, but it's not that easy to understand..I mean I know some PHP, but @ python I really suck, they're not very different from one another but still.. Thing is on the BitTorrent Wiki (http://wiki.theory.org/index.php/BitTorrentSpecification#Handshake) they say when the handshake (connection between peers) is something like: The handshake is a required message and must be the first message transmitted by the client. It is (49+len(pstr)) bytes long. handshake: <pstrlen><pstr><reserved><info_hash><peer_id> * pstrlen: string length of <pstr>, as a single raw byte * pstr: string identifier of the protocol * reserved: eight ( reserved bytes. All current implementations use all zeroes. Each bit in these bytes can be used to change the behavior of the protocol. An email from Bram suggests that trailing bits should be used first, so that leading bits may be used to change the meaning of trailing bits. * info_hash: 20-byte SHA1 hash of the info key in the metainfo file. This is the same info_hash that is transmitted in tracker requests. * peer_id: 20-byte string used as a unique ID for the client. This is usually the same peer_id that is transmitted in tracker requests (but not always e.g. an anonymity option in Azureus). In version 1.0 of the BitTorrent protocol, pstrlen = 19, and pstr = "BitTorrent protocol". Thing is I will find the info_hash in a MySQL database and the peer_id will be some fixed value taken from a client, how do I send this and all the rest? How would the syntax look like?
  3. Tried using fsockopen but I don't really know what to send, anybody has some knowledge about this? I've also tried to look trough some "php bittorrent clients" but in fact they're not clients they're just php interfaces to clients written in python. THANKS alot
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.