Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 17:37

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

Advertisement



[C++] Silkroad Redirect IP

Discussion on [C++] Silkroad Redirect IP within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2009
Posts: 3
Received Thanks: 0
Question [C++] Silkroad Redirect IP

Hi!

Currently, I'm trying to redirect the IP by patching the memory of the sro_client at the connect function, to call my own function. However, there is a problem which I can't figure out, why it happens.
If i'm moving the Socket of the ECX register into my own Socket variable, I get the WSAENOTSOCK error, when trying to duplicate it, to get the Protocol Information.
Same happens, when I push the unchanged parameters to call the connect function.
If i create my own Socket, it connects to the proxy but still ends with the C9 MessageBox:


This is the function, that is being called instead of the original connect:
Code:
void Redirect()
{
	__asm MOV sock, ECX
	__asm MOV pSockAddr, EDI
	
	int af = AF_INET;
	int type = SOCK_STREAM;
	int protocol = IPPROTO_TCP;

	sockaddr_in *addr_in = (sockaddr_in*)pSockAddr;
	addr_in->sin_addr.S_un.S_addr = inet_addr("127.0.0.1");
	addr_in->sin_port = htons(16000);
	addr_in->sin_family = AF_INET;
	pSockAddr = (PSOCKADDR)addr_in;
	SOCKET s = socket(af, type, protocol);
	
	DWORD d = PtrToUlong(GetProcAddress(GetModuleHandle("WS2_32.dll"), "connect"));
	int result;

	__asm MOV ECX, s
	__asm MOV EDI, pSockAddr
	__asm PUSH 16
	__asm PUSH EDI
	__asm PUSH ECX
	__asm CALL DWORD PTR DS:[d]
	__asm MOV result, EAX

	if(result == -1)
	{
		std::stringstream ss;
		ss<<"Error on redirecting: "<<WSAGetLastError()<<"\n";
		printf(ss.str().c_str());
	}
	
	//connect function
	byte connect_pattern[10] = { 0x6A, 0x10,				//PUSH 10
				     0x57,					//PUSH EDI 
				     0x51,					//PUSH ECX
				     0xFF, 0x15,    0x30, 0xB6, 0xE4, 0x00 };	//CALL DWORD PTR DS:[<&WS2_32.#4>]

	//patch it back to original connect
	WriteProcessMemory(GetCurrentProcess(), UlongToPtr(ConnectAddress), connect_pattern, 10, NULL);
}
Any help is appreciated.
Thanks in advance!
user000user is offline  
Old 11/02/2012, 01:06   #2
 
elite*gold: 0
Join Date: Oct 2012
Posts: 22
Received Thanks: 3
I'd strongly recommend you to check old sro loaders sources one of them was called(testosterone) or smth
OverlimitOnline is offline  
Reply

Tags
c++, error, ip, redirect, silkroad


Similar Threads Similar Threads
Fr1 redirect to pb
04/04/2012 - DarkOrbit - 3 Replies
when i try to login to fr1 it redires me to bp site any 1 knows why ? i tried with 2 acc existing and botted with and a other acc no botted at all still cant login
Can't redirect ip o_0?
08/10/2011 - Silkroad Online - 1 Replies
Hey everybody! I'm having a problem installing my ibot. First of all it doesn't detect silkroad because i can't redirect using edxsilkroad launcher or PHmediapatcher. Let me explain more in detail. I have everything installed (i think o_0) Whenever i redirect the ip and launch to silkroad, nothing happens when i enter my info in the login screen. It just stay there for a while. If i try launching silkroad using edxsilkroadlauncher5 it give me some random error like %/"!%?/$". Is there...
Redirect
11/28/2010 - Silkroad Online - 0 Replies
Something weird is happening since i formated my computer, when i run the SRO launcher it says the server is in inspection, but with the bot i can launch it, after some research i found out that my client is redirecting to 127.0.0.1 (localhost) instead of joymax host, is there any way to fixe this? already reinstalled and redownloaded it, it works but when i reboot the computer it gets the default redirect to localhost...
[Guide] Using Windows Detours to Redirect Silkroad to a Proxy
11/25/2010 - SRO Coding Corner - 28 Replies
This is the second guide in a three part series. The first part is the "A Simple Silkroad Proxy Reference" guide, which sets up a simple proxy. This guide shows how to create your own hook and detour to use that proxy (or any other for that matter) with the client. The third and final guide will show how to use a clientless with the proxy and illustrate the power of the design. There is not that much code across the three projects in this guide, but some of the concepts are advanced. It took...
Redirect Ip???
08/14/2009 - Silkroad Online - 20 Replies
Hi. Icannot find this. What i can use for Redirect Ip in Tsro??? I search something, what have Redirect Ip, because i need this for Bot.... Old Loader don't work and http://www.elitepvpers.com/forum/sro-exploits-hacks -bots-guides/301503-tsro-pserver-loader.html that too. Anyone have something for change redirect ip?



All times are GMT +1. The time now is 17:39.


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.