Jump to content
  • 0
Sign in to follow this  
callmax

Unkown Backdoor / Homecall in Source?

Question

Hey guys, i don't really know much about c++, but i can see that in this file, a IP gets called, this IP is hosted in peking. Does anybody know what this script especially does?

#include "stdafx.h"
#include "constants.h"
#include "passpod.h"

extern BOOL g_test_server;
extern int test_server;
const char ERR_STRINGS[6][32] = 
{
	"AUTH_SUCCESS" ,
	"AUTH_FAILURE:PASSPOD_ERROR" ,
	"AUTH_FAILURE:USER_NOT_FOUND" ,
	"AUTH_FAILURE:SYSTEM_NOT_FOUND" ,
	"AUTH_FAILURE:TOKEN_DISABLED" ,
	"AUTH_FAILURE:EMPTY",
};

const char ERR_MESSAGE[6][64] =
{
	"SUCCESS",
	"PASERR1",
	"PASERR2",
	"PASERR3",
	"PASERR4",
	"PASERR5"
};

CPasspod::CPasspod()
	: m_sock(INVALID_SOCKET), m_lpFDW(NULL)
{
}


CPasspod::~CPasspod()
{
}

int CPasspod::ConfirmPasspod( const char * account, const char * passpod )
{
	const char * servername = "1001";
	const char * algname = "plaintext";
	const char * posspod_server = "/passpod-server";
	const char * auth = "/auth.s";


	char szRequest[1024];
	char szResult[1024];
	char szTmp[128];

	int ret_code = 1; // 0 ÀÌ ¼º°ø 

	snprintf( szRequest, sizeof(szRequest), "username=%s&systemname=%s&passpod=%s&algname=%s", account, servername, passpod, algname );
	snprintf( szResult, sizeof(szResult), "POST %s%s HTTP/1.0rn", posspod_server, auth );
	snprintf( szTmp, sizeof(szTmp), "Host: %srn", "218.99.6.103" );
	strlcat( szResult, szTmp, sizeof(szResult) );
	strlcat( szResult, "Content-type: application/x-www-form-urlencodedrn", sizeof(szResult) ); 
	snprintf( szTmp, sizeof(szTmp), "Content-length: %drn", strlen(szRequest));
	strlcat( szResult, szTmp, sizeof(szResult) );
	strlcat( szResult, "Connection: Closernrn", sizeof(szResult) );
	strlcat( szResult, szRequest, sizeof(szResult) );

	if ( !Connect( NULL ) )
	{
		sys_log( 0, "PASSPOD : Can not connect to passpod server" );
		Disconnect();
		return ret_code; 
	}
	
	int ret = socket_write( m_sock, (const char *)szResult, strlen(szResult));

	sys_log( 0, "PASSPOD : Write End %s %s", account, passpod );
	if ( test_server )
	{
		sys_log( 0, "PASSPOD : %s", szResult );
		
	}
	char Read[1024];
	int nCount = 5;
	while (--nCount)
	{
		ret = recv(m_sock, Read, 1024, 0);

		if ( ret > 0 )
		{
			if ( test_server )
			{
				sys_log( 0, "PASSPOD : %d", ret );
			}
			break;
		}
		else
		{	
			if ( test_server )
			{
				sys_log( 0, "PASSPOD : %d", ret );
			}
			Disconnect();
			return ret_code;
		}
	}
	sys_log( 0, "PASSPOD : Read End %s %s n %sn", account, passpod, Read );
	
	char * pos = Read;
	nCount = 15;
	while ( --nCount )
	{
		int n = 0;

		//¶óÀγѱâ±â
		for (; pos[n]!='n'; ++n  ) {}
	
		//n¿¡¼­ ¸ØÃß±â Çϳª´õ ³²°ÜÁÖÀÚ 	
		pos = pos+n+1;

		
		//Return Value ¸¦ ºñ±³ 
		if ( 0 == strncmp( pos, "AUTH_SUCCESS", strlen(ERR_STRINGS[0]) ) )
		{
			ret_code = E_PASSPOD_SUCCESS;
			break;
		}
		if ( 0 == strncmp( pos, "AUTH_FAILURE:PASSPOD_ERROR", strlen(ERR_STRINGS[1]) ) )
		{
			ret_code = E_PASSPOD_FAILED_PASSPOD_ERROR;
			break;
		}
		if ( 0 == strncmp( pos, "AUTH_FAILURE:USER_NOT_FOUND", strlen(ERR_STRINGS[2] ) ) )
		{
			ret_code = E_PASSPOD_FAILED_USER_NOT_FOUND;
			break;
		}
		if ( 0 == strncmp( pos, "AUTH_FAILURE:SYSTEM_NOT_FOUND", strlen(ERR_STRINGS[3] ) ) )
		{
			ret_code = E_PASSPOD_FAILED_SYSTEM_NOT_FOUND;
			break;
		}
		if ( 0 == strncmp( pos, "AUTH_FAILURE:TOKEN_DISABLED", strlen(ERR_STRINGS[4] ) ) )
		{
			ret_code = E_PASSPOD_FAILED_TOKEN_DISABLED;
			break;
		}
		if ( 0 == strncmp( pos, "AUTH_FAILURE:EMPTY", strlen(ERR_STRINGS[5] )  ) )
		{
			ret_code = E_PASSPOD_FAILED_EMPTY;
			break;
		}

	}

	sys_log(0, "PASSPOD Ret Value = %s ", ERR_STRINGS[ret_code] );
	

	this->Disconnect();
	return ret_code;
	
}

bool CPasspod::Connect( LPFDWATCH fdw )
{

//	m_lpFDW = fdw;

	if ( m_sock != INVALID_SOCKET )
	{
		sys_err( "Sock != INVALID_SOCKET " );
		return false;
	}
		
	m_sock = socket_connect( "218.99.6.103", 8080 );

	if ( m_sock == INVALID_SOCKET )
	{
		sys_err( "Sock == INVALID_SOCKET " );
		return false;
	}



	//fdwatch_add_fd( m_lpFDW, m_sock, this, FDW_READ, false );
	//fdwatch_add_fd( m_lpFDW, m_sock, this, FDW_WRITE, false );
	
	
	return true;
}

bool CPasspod::Disconnect()
{
	//fdwatch_del_fd( m_lpFDW, m_sock );
	socket_close(m_sock);
	m_sock = INVALID_SOCKET;
	return true;
}

bool CPasspod::IConv( const char * src, char * desc )
{
	return true;
}

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

This passpod stuff is a default function in the game, binary and in the py files. It has been written not by "someone" on the forums and I think these functions are something like the Brasil Ongame auth system, not a backdoor.

Share this post


Link to post
  • 0

Passpod is in authentication system used in China, and by the chinese Yitian2 (Metin2) server as well I guess.

Share this post


Link to post
  • 0
bool	g_bNoPasspod = false;

So i think this should be set to "true", or I'm wrong?

Share this post


Link to post
  • 0

Yes, but the function will be not active because you are using Europe, not NewCIBN.

 

79ygQ.png

 

Anyway, you can remove the complete passpod system if you want, but its not a backdoor.

  • Love 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.