Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#158 closed Enhancement (fixed)

shareaza peerid

Reported by: trager Owned by: somebody
Priority: Normal Milestone: Sometime
Component: libtransmission Version: 0.6
Severity: Minor Keywords:
Cc:

Description

Earlier versions of Shareaza do not use the SZ identifier. I am seeing ids like '21------' and doing a bit of searching it turns out that is an old-style Shareaza peerid. And here is the code which proves it: http://shareaza.cvs.sourceforge.net/shareaza/shareaza/DownloadWithTorrent.cpp?r1=1.12&r2=1.13 This is how Azureus detects the old-style id:

      iFirstNonZeroPos = 20;
      for( int i=0; i < 20; i++ ) {
        if( peerID[i] != (byte)0 ) {
          iFirstNonZeroPos = i;
          break;
        }
      }
      
      
      //Shareaza check
      if( iFirstNonZeroPos == 0 ) {
        boolean bShareaza = true;
        for( int i=0; i < 16; i++ ) {
          if( peerID[i] == (byte)0 ) {
            bShareaza = false;
            break;
          }
        }
        if( bShareaza ) {
          for( int i=16; i < 20; i++ ) {
            if( peerID[i] != ( peerID[i % 16] ^ peerID[15 - (i % 16)] ) ) {
              bShareaza = false;
              break;
            }
          }
          if( bShareaza )  return "Shareaza";
        }
      }

Change History (2)

comment:1 Changed 15 years ago by JohnClay

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in revision r1448.

comment:2 Changed 11 years ago by jordan

  • Component changed from Transmission to libtransmission
  • Severity changed from Normal to Minor
  • Type changed from Defect to Enhancement
Note: See TracTickets for help on using tickets.