Register for your free account! | Forgot your password?

You last visited: Today at 02:15

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



ServerInfo On Binary

Discussion on ServerInfo On Binary within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2014
Posts: 20
Received Thanks: 37
ServerInfo On Binary

//Find in PythonNetworkStreamModule.cpp:
Code:
PyObject* netGetBettingGuildWarValue(PyObject* poSelf, PyObject* poArgs)
{
	char* szName;
	if (!PyTuple_GetString(poArgs, 0, &szName))
		return Py_BuildException();

	
	CPythonNetworkStream& rkNetStream=CPythonNetworkStream::Instance();
	return Py_BuildValue("i", rkNetStream.EXPORT_GetBettingGuildWarValue(szName));
}
///Add;
Code:
static const char* ServerIPVName[4][2] = {
	{"192.168.0.100", 	"BETA-1"}, 
	{"76.342.12.12", 	"BETA-2"}, 
	{"145.12.231.12", 	"BETA-3"}, 
	{"192.31.52.69", 	"BETA-4"}
};
static unsigned int ServerPORT[] = {{13000},{1600},{1900},{21000},{11002},{13000}};
PyObject* netGetServer_IPNAME(PyObject* poSelf, PyObject* poArgs)
{
	return Py_BuildValue("ssssssss", 
		ServerIPVName[0][0], ServerIPVName[0][1],
		ServerIPVName[1][0], ServerIPVName[1][1],
		ServerIPVName[2][0], ServerIPVName[2][1],
		ServerIPVName[3][0], ServerIPVName[3][1]
	);
}
PyObject* netGetServer_PORT(PyObject* poSelf, PyObject* poArgs)
{
	return Py_BuildValue("iiiiii", ServerPORT[0],ServerPORT[1],ServerPORT[2],ServerPORT[3],ServerPORT[4],ServerPORT[5]);
}
//Find:
Code:
{ "SendOnClickPacket",					netOnClickPacket,						METH_VARARGS },
///Add;
Code:
{ "GetServer_IPNAME",					netGetServer_IPNAME,					METH_VARARGS },
		{ "GetServer_PORT",						netGetServer_PORT,						METH_VARARGS },
///Example ServerInfo.py;
Code:
import net
(sv1_ip, sv1_name, sv2_ip, sv2_name, sv3_ip, sv3_name, sv4_ip, sv4_name) = net.GetServer_IPNAME()
(ch1_port, ch2_port, ch3_port, ch4_port, auth_port, mark_port) = net.GetServer_PORT()

CH_1_NAME	= "|cFF00FFFF|hCH1"
CH_2_NAME	= "|cFF00FFFF|hCH2"
CH_3_NAME	= "|cFF00FFFF|hCH3"
CH_4_NAME	= "|cFF00FFFF|hCH4"

STATE_NONE = "|cFFFF0000|hKAPALI"
	
STATE_DICT = {
	0 : "|cFFFF0000|hKAPALI",
	1 : "|cff00ff00|hNORMAL",
	2 : "|cff00ff00|hYOGUN",
	3 : "|cff00ff00|hDOLU"
}

SERVER01_CHANNEL_DICT = {
	1:{"key":11,"name":CH_1_NAME,"ip":sv1_ip,"tcp_port":ch1_port,"udp_port":ch1_port,"state":STATE_NONE,},
	2:{"key":12,"name":CH_2_NAME,"ip":sv1_ip,"tcp_port":ch2_port,"udp_port":ch2_port,"state":STATE_NONE,},
	3:{"key":13,"name":CH_3_NAME,"ip":sv1_ip,"tcp_port":ch3_port,"udp_port":ch3_port,"state":STATE_NONE,},
	4:{"key":14,"name":CH_4_NAME,"ip":sv1_ip,"tcp_port":ch4_port,"udp_port":ch4_port,"state":STATE_NONE,},
}

SERVER02_CHANNEL_DICT = {
	1:{"key":11,"name":CH_1_NAME,"ip":sv2_ip,"tcp_port":ch1_port,"udp_port":ch1_port,"state":STATE_NONE,},
	2:{"key":12,"name":CH_2_NAME,"ip":sv2_ip,"tcp_port":ch2_port,"udp_port":ch2_port,"state":STATE_NONE,},
	3:{"key":13,"name":CH_3_NAME,"ip":sv2_ip,"tcp_port":ch3_port,"udp_port":ch3_port,"state":STATE_NONE,},
	4:{"key":14,"name":CH_4_NAME,"ip":sv2_ip,"tcp_port":ch4_port,"udp_port":ch4_port,"state":STATE_NONE,},
}

SERVER03_CHANNEL_DICT = {
	1:{"key":11,"name":CH_1_NAME,"ip":sv3_ip,"tcp_port":ch1_port,"udp_port":ch1_port,"state":STATE_NONE,},
	2:{"key":12,"name":CH_2_NAME,"ip":sv3_ip,"tcp_port":ch2_port,"udp_port":ch2_port,"state":STATE_NONE,},
	3:{"key":13,"name":CH_3_NAME,"ip":sv3_ip,"tcp_port":ch3_port,"udp_port":ch3_port,"state":STATE_NONE,},
	4:{"key":14,"name":CH_4_NAME,"ip":sv3_ip,"tcp_port":ch4_port,"udp_port":ch4_port,"state":STATE_NONE,},
}

SERVER04_CHANNEL_DICT = {
	1:{"key":11,"name":CH_1_NAME,"ip":sv4_ip,"tcp_port":ch1_port,"udp_port":ch1_port,"state":STATE_NONE,},
	2:{"key":12,"name":CH_2_NAME,"ip":sv4_ip,"tcp_port":ch2_port,"udp_port":ch2_port,"state":STATE_NONE,},
	3:{"key":13,"name":CH_3_NAME,"ip":sv4_ip,"tcp_port":ch3_port,"udp_port":ch3_port,"state":STATE_NONE,},
	4:{"key":14,"name":CH_4_NAME,"ip":sv4_ip,"tcp_port":ch4_port,"udp_port":ch4_port,"state":STATE_NONE,},
}

REGION_NAME_DICT = {
	0 : "",	
}

REGION_AUTH_SERVER_DICT = {
	0 : {
		1 : { "ip":sv1_ip, "port":auth_port, },
		2 : { "ip":sv2_ip, "port":auth_port, },
		3 : { "ip":sv3_ip, "port":auth_port, },
		4 : { "ip":sv4_ip, "port":auth_port, },
	}		
}

REGION_DICT = {
	0 : {
		1 : { "name" :sv1_name, "channel" : SERVER01_CHANNEL_DICT, },
		2 : { "name" :sv2_name, "channel" : SERVER02_CHANNEL_DICT, },
		3 : { "name" :sv3_name, "channel" : SERVER03_CHANNEL_DICT, },
		4 : { "name" :sv4_name, "channel" : SERVER04_CHANNEL_DICT, },
	},
}

MARKADDR_DICT = {
	10 : { "ip" : sv1_ip, "tcp_port" : mark_port, "mark" : "10.tga", "symbol_path" : "10", },
	20 : { "ip" : sv2_ip, "tcp_port" : mark_port, "mark" : "20.tga", "symbol_path" : "20", },
	30 : { "ip" : sv3_ip, "tcp_port" : mark_port, "mark" : "30.tga", "symbol_path" : "30", },
	40 : { "ip" : sv4_ip, "tcp_port" : mark_port, "mark" : "40.tga", "symbol_path" : "40", },
}
blackdraonx61 is offline  
Thanks
2 Users
Old 01/08/2018, 10:45   #2
 
Lauling's Avatar
 
elite*gold: 315
Join Date: Jun 2012
Posts: 5,158
Received Thanks: 4,814
nice work! But it is easy to find the ip over the cmd.
go cmd, write netstat -n ,after login, u can see the ip adress and port from the server...

Okay it is usefull if u use a proxy server
Lauling is offline  
Old 01/08/2018, 11:15   #3

 
elite*gold: 0
Join Date: Dec 2008
Posts: 2,825
Received Thanks: 1,538
Quote:
Originally Posted by Lauling View Post
nice work! But it is easy to find the ip over the cmd.
go cmd, write netstat -n ,after login, u can see the ip adress and port from the server...

Okay it is usefull if u use a proxy server
why should it be useful when you use a proxy server?
the only good thing if you hardcode the credentials is that no one can use your binary
.Colossus. is offline  
Thanks
1 User
Old 01/09/2018, 02:30   #4
 
elite*gold: 0
Join Date: Aug 2017
Posts: 4
Received Thanks: 0
Totally pointless.
tierrilopes is offline  
Old 01/09/2018, 10:20   #5
 
Lauling's Avatar
 
elite*gold: 315
Join Date: Jun 2012
Posts: 5,158
Received Thanks: 4,814
Quote:
Originally Posted by .Colossus. View Post
why should it be useful when you use a proxy server?
the only good thing if you hardcode the credentials is that no one can use your binary
yes but otherway, if u have the ip information on the binary and u use a proxy, nobody can resolf the ip adress from you server.

i can with idea disable this and then i can also use the binary...
Lauling is offline  
Reply


Similar Threads Similar Threads
[C#] Write Hex to Binary File & Compare binary & hex
07/20/2014 - Coding Snippets - 0 Replies
For those who like to make a binary hack (write hexadecimal to a specified adress in a binary file) and use a checkbox - checker if the hack has already been enabled or not, here are two usefull functions: This code snippets require the IO namespace. using System.IO; To use this functions, you'll need 3 other ones that were not written by me, but unfortunatelly I couldn't find the original author of them again, sorry.
Binary 38801, Latest binary.
03/24/2014 - Metin2 PServer Guides & Strategies - 75 Replies
This is latest binary unpacked. Has R6002 error. Hasn't any modification. https://mega.co.nz/#!BEV0jb6J!MPcP3xCGenYIGQXAzsV PeHiEx4wSCVHYDf9vBKpCPTs
[Relese]Tq Binary translation 98% + all Binary Files
07/07/2009 - CO2 Private Server - 20 Replies
#Removed



All times are GMT +1. The time now is 02:15.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.