Gnutella Forums  

Go Back   Gnutella Forums > Current Gnutella Client Forums > GnucDNA Based Clients > Gnucleus (Windows)
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

Gnucleus (Windows) For assistance for users with the Gnucleus program. Important links: Updated Gnucleus 2.2.0.0 Installer! and also Updated Connection Caches for Gnucleus!


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old March 12th, 2002
Unregistered
Guest
 
Posts: n/a
Default Mad as hell and won't take vinnie anymore!

Swabby, please add a little edit box so I can have a choice as to who's network I don't want to contribute to, in my case I don't want to contribute my files to any commercial ventures on gnutella.
In the box I can put as many client ID id names as I want to block sharing / connecting to, comma separated. If I include a version number then only that version is included. If you can add a wildcard "*" for the version number that would be nice too.
Thanks for a great open source program.
Reply With Quote
  #2 (permalink)  
Old March 12th, 2002
Unregistered
Guest
 
Posts: n/a
Default

Here it is, simply replace CGnuNode::ParseHandshake in the file "GnuNode.cpp" with the following and recompile! Add as many checks as you like for each $$$ client you would like to block. (4 total lines, two places to check the connect strings, added to the original code, see below)

Code:
/////////////////////////////////////////////////////////////////////////////
// New connections

bool CGnuNode::ParseHandshake(CString Data, byte* Stream, int StreamLength)
{
	int i;
	CString Handshake;
	CString NetworkName = m_pDoc->ModeNetwork;
	bool	Guerilla = false;

	// Making an inbound connect
	if(m_Inbound)
	{
		// Version 6
		if(Data.Find("\r\n\r\n") != -1)
		{
			Handshake = Data.Mid(0, Data.Find("\r\n\r\n") + 4);
			m_Handshake += Handshake;

			if(m_Handshake.Find("GUERILLA ") != -1)
			{
				NetworkName = "GUERILLA";
				Guerilla    = true;
			}

			// keep any BS off my screen
			if(Handshake.Find("BearShare") != -1) { Close(); return true; }


			// Connect string, GNUTELLA CONNECT/0.6\r\n
			if(Handshake.Find(NetworkName + " CONNECT/") != -1)
			{
				if(m_pPrefs->m_NetworkModel == NETWORK_PRIVATE && m_pPrefs->m_Lan)
					if(Handshake.Find("LAN: " + m_pPrefs->m_LanName + "\r\n") == -1)
					{
						Close();
						return true;
					}

				Send_ConnectOK(true, false, Guerilla);

				return true;
			}

			// Ok string, GNUTELLA/0.6 200 OK\r\n
			else if(Handshake.Find(" 200 OK\r\n") != -1)
			{
				SetConnected();

				// Stream begins
				for(i = 0; i < StreamLength - 4; i++)
					if(strncmp((char*) &Stream[i], "\r\n\r\n", 4) == 0)
					{
						m_dwExtraLength = StreamLength - (i + 4);
						memcpy(m_pExtra, &Stream[i + 4], m_dwExtraLength);
					}

				return true;
			}
		}

		// Version 4
		else if(Data.Find(VERSION_4_CONNECT) != -1 && !m_pPrefs->m_Lan)
		{
			m_Handshake += "GNUTELLA CONNECT/0.4\r\n";

			Send_ConnectOK(false, false, false);
			SetConnected();

			return true;
		}
	}

	// Making an outbound connect
	else
	{
		if((m_pDoc->ModeVersion6 || m_pPrefs->m_NetworkModel == NETWORK_PRIVATE) && Data.Find("\r\n\r\n") != -1)
		{
			Handshake = Data.Mid(0, Data.Find("\r\n\r\n") + 4);
			m_Handshake += Handshake;

			// Ok string, GNUTELLA/0.6 200 OK\r\n
			if(Handshake.Find(" 200 OK\r\n") != -1)
			{

			// keep any BS off my screen
			if(Handshake.Find("BearShare") != -1) { Close(); return true; }


				// Check if remote host has our IP
				int ipPos = Handshake.Find("Remote-IP: ");
				if(ipPos != -1)
				{
					ipPos  += 11;
					int ipBack = Handshake.Find("\r\n", ipPos);

					m_pPrefs->m_LocalHost = StrtoIP( Handshake.Mid(ipPos, ipBack - ipPos));
				}


				if(m_pPrefs->m_NetworkModel == NETWORK_PRIVATE && m_pPrefs->m_Lan)
					if(Handshake.Find("LAN: " + m_pPrefs->m_LanName + "\r\n") == -1)
					{
						Close();
						return true;
					}

				Send_ConnectOK(true, true, false);

				SetConnected();
			}
			else
				Close();

			return true;
		}
		else if(Data.Find(VERSION_4_CONNECT_OK) != -1)
		{
			m_Handshake += "GNUTELLA OK\r\n";

			// Stream begins
			for(i = 0; i < StreamLength - 2; i++)
				if(strncmp((char*) &Stream[i], "\n\n", 2) == 0)
				{
					m_dwExtraLength = StreamLength - (i + 2);
					memcpy(m_pExtra, &Stream[i + 2], m_dwExtraLength);
				}

			SetConnected();

			return true;
		}
	}

	return false;
}
Reply With Quote
  #3 (permalink)  
Old March 12th, 2002
Unregistered
Guest
 
Posts: n/a
Default

For uploads, modify CGnuUpload::OnReceive in the file GnuUpload.cpp, two lines added for one header check, works for push or normal uploads.

Code:
void CGnuUpload::OnReceive(int nErrorCode)
{
	byte* pBuff = new byte[6000];

	DWORD dwBuffLength = Receive(pBuff, 4096);

	switch (dwBuffLength)
	{
	case 0:
		m_pShell->m_Error = "Bad Push";
		Close();
		delete [] pBuff;
		return;
		break;
	case SOCKET_ERROR:
		m_pShell->m_Error = "Bad Push";
		Close();
		delete [] pBuff;
		return;
		break;
	}

	pBuff[dwBuffLength] = 0;
	CString Header(pBuff);
	m_pShell->m_Handshake += Header;
	m_pShell->m_GetRequest += Header;

	// New Upload
	if(m_pShell->m_GetRequest.Find("\r\n\r\n") != -1)
	{
		CString Handshake = m_pShell->m_GetRequest;

		// keep any BS off my screen
		if(Handshake.Find("BearShare") != -1) Close();

		if(Handshake.Find("GET /get/") == 0)
		{
			// Get Node info
			CString Host;
			UINT    nPort;
			GetPeerName(Host, nPort);

			// Set Variables
			m_pShell->m_Host = StrtoIP(Host);
			m_pShell->m_Port = 0;

			m_pShell->VerifyFile(Handshake);
		}
		else
		{
			m_pShell->m_Error = "Bad Push";
			Close();
		}
	}

	delete [] pBuff;

	CAsyncSocket::OnReceive(nErrorCode);
}
Reply With Quote
  #4 (permalink)  
Old March 13th, 2002
theSelkie
Guest
 
Posts: n/a
Default

how stupid is that?
i mean maybe BS is a client for less advanced users etc. etc.
!!BUT!! all those users have files YOU want
why block em

and in addition to that you would be the person throwing the first stone (you know? thats from the bible) until now no one blocked a client from the network (as far as i know).
do you want to do that? be the first to block? and even worse use gnucleus for it? the bad image of the "blocker" might fall back on gnucleus....

what did vinne do to you?
Reply With Quote
  #5 (permalink)  
Old March 13th, 2002
Unregistered
Guest
 
Posts: n/a
Default

Where have you been? Vinnie cut off xolox and has moved toward a bearshare only network.
Reply With Quote
  #6 (permalink)  
Old March 14th, 2002
theSelkie
Guest
 
Posts: n/a
Default

uhm
he blocked xolox?
all i read was that IF he would block a client, xolox would be his first choice
but if he really blocks it, sorry
Reply With Quote
  #7 (permalink)  
Old March 14th, 2002
Gnubie
 
Join Date: June 8th, 2001
Posts: 39
Aeroe is flying high
Default

even though i hate BS and vinnie, starting a war between clients won't help anything.
basically the best damage would to recommend users to switch to gnucleus.


vinnie is all in it for profit (obviously), nothing wrong with that. but what he does ****es me off.
and yes he Did just recently block xolox. he seemed to have changed his mind awhile back while he weighed the option.
Reply With Quote
  #8 (permalink)  
Old March 14th, 2002
Gnutella Veteran
 
Join Date: September 21st, 2001
Posts: 110
gnutellafan is flying high
Default hypocrits

Ok, you hate BS because you think it block Xolox (well 2.5 will not work with 0.4 HSs, but BS doesnt stop ANY clients from uploading/downloading from it) so you want to block BS. Aint dat da sh*t.

BS only prefers to connect to other BS clients. It is still connected to the rest of the network. It is just better for BS users to be connected to eachother (as LW does) to take more advantage of features that BS has that other clients dont yet.

Since you know how to program why dont you be a bit more productive and help improve gnucleus and the network. It would be a much better route than working on destroying the network!

BTW, most of the people that upload from me are non-BS users

Last edited by gnutellafan; March 14th, 2002 at 03:02 PM.
Reply With Quote
  #9 (permalink)  
Old March 14th, 2002
Gnutella Veteran
 
Join Date: September 21st, 2001
Posts: 110
gnutellafan is flying high
Default

Xolox is dead people. LET IT GO!!! The only thing it had was multisource dl. That was great!! It forced all the other clients to finally add it. Now that they have it and xolox is no longer being developed let it go.

If someone can talk to the xolox programmers and get the source code that would be great. But until that time use a living client.
Reply With Quote
  #10 (permalink)  
Old March 14th, 2002
Gnutella Veteran
 
Join Date: September 21st, 2001
Posts: 110
gnutellafan is flying high
Default

I dont know anything about coding so you will have to tell me. Does your code prevent you from downloading from BS or are you just a LEECH?
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
Re: Re: Vinnie, You have no excuse Unregistered Site Feedback 0 July 6th, 2002 11:23 AM
Vinnie vs. Morgwen??? Morgwen General Gnutella / Gnutella Network Discussion 21 December 30th, 2001 06:22 AM
Vinnie kills Phex, mad as hell Unregistered Gnucleus (Windows) 0 July 16th, 2001 11:17 AM
*Vinnie... Unregistered BearShare Open Discussion 2 May 25th, 2001 11:09 AM


All times are GMT -7. The time now is 01:31 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.