Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server > SRO PServer Guides & Releases
You last visited: Today at 21:22

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

Advertisement



[Release] Certification Ip Addr Spoofer (Generic) - All Modules/files

Discussion on [Release] Certification Ip Addr Spoofer (Generic) - All Modules/files within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1
 
elite*gold: 62
Join Date: Mar 2011
Posts: 602
Received Thanks: 2,955
Talking [Release] Certification Ip Addr Spoofer (Generic) - All Modules/files

So, I wrote this pretty small tool to make patching certification ip addresses in modules easy (since there are many servers being pervert and stuff). This should work on any server file modules out there (even those which are not released to public).

Screenshot:
Link:

Requires .NET 2.0


Edit:

Source (includes WAN/LAN ip difference)
Code:
using System;
using System.Collections.Generic;
using System.IO;

namespace srSpoof_patcher
{
    class Program
    {
        static void Main(string[] args)
        {
            //TODO: nIP/ wIP - should be possible to make them different
            string fileName = string.Empty;
            string ip_wan = string.Empty;
            string ip_lan = string.Empty;

            Console.Title = "srSpoof_patcher [EBX7.NET], Chernobyl (2013) http://ebx7.net/";
            Console.BackgroundColor = ConsoleColor.White;
            Console.ForegroundColor = ConsoleColor.Blue;

            comment();

            Console.WriteLine("srSpoof_patcher [EBX7.NET], Chernobyl (2013)\nhttp://ebx7.net/");

            comment();

            Console.Write("File name to patch (example: MachineManager.exe):");
            fileName = Console.ReadLine();

            Console.Write("Enter WAN ip address to spoof (example: 195.130.25.13):");
            ip_wan = Console.ReadLine();


            Console.Write("Enter LAN ip address to spoof (example: 192.168.1.102):");
            ip_lan = Console.ReadLine();
          

            

            int img = 0x400000;
            int bytesRequired = 100;

            try
            {
                FileStream fs = File.Open(fileName, FileMode.Open);

                //StreamReader sr = new StreamReader(fs);

                BinaryReader br = new BinaryReader(fs);



                long fileLength = br.BaseStream.Length;
                long offset_write = 0;

                br.BaseStream.Seek(0, SeekOrigin.Begin);

                int sign_det1 = 0;
                int sign_det2 = 0;

                byte[] signature = new byte[] { 0x52, 0x50, 0x0F, 0xB6, 0xC9, 0x51 };
                bool found = false;
                for (int i = 0; i < fileLength - 1000; i++)
                {
                    try
                    {
                        if (br.BaseStream.Position < (fileLength - signature.Length))
                        {
                            for (int a = 0; a < signature.Length; a++)
                            {
                                if (br.ReadByte() == signature[a])
                                {
                                    found = true;
                                }
                                else
                                {
                                    found = false;
                                    // Console.WriteLine("not found");
                                    break;

                                }
                            }

                            if (found)
                            {
                                Console.WriteLine("Found push addr by signature [RVA:0x{0:X}]", (int)br.BaseStream.Position + img);
                                if (sign_det1 == 0) sign_det1 = (int)br.BaseStream.Position + img;
                                else sign_det2 = (int)br.BaseStream.Position + img;
                            }

                        }
                    }
                    catch { }

                }

                if (sign_det1 == 0 || sign_det2 == 0)
                {
                    Console.WriteLine("Something went wrong (one or both of addresses of push instructions are 0 !) - signature detection failed ?");
                    Console.ReadKey();
                    return;
                }



                br.BaseStream.Seek(0, SeekOrigin.Begin);

                //for finding out if there's enough free space (0x00 bytes)
                long nByte = 0;

                for (int i = 0; i < fileLength - bytesRequired; i++)
                {
                    if (br.ReadByte() == 0x00)
                    {
                        nByte++;
                    }
                    else nByte = 0;

                    if (nByte >= bytesRequired)
                    {
                        Console.WriteLine("Free space found at RVA offset [{0} bytes !] 0x{1:X} ", bytesRequired, (br.BaseStream.Position + img) - bytesRequired); //RVA offset
                        offset_write = br.BaseStream.Position + img - bytesRequired;
                        break;
                    }
                }


                //we dont need binary reader and it's filestream anymore
                br.Close();
                fs.Close();

                

                FileStream fs_w = new FileStream(fileName, FileMode.Open);
                BinaryWriter bw = new BinaryWriter(fs_w);

                //writing ip string to free space we found
                fs_w.Seek(offset_write - img, SeekOrigin.Begin);

                byte[] ip_wan_bytes = ASCIIEncoding.ASCII.GetBytes(ip_wan);
                for (int i = 0; i < ip_wan_bytes.Length; i++)
                {
                    fs_w.WriteByte(ip_wan_bytes[i]);
                }
                Console.WriteLine("WRITEN new ip [wan] bytes to offset 0x{0:X} at free space !\nNow setting push instruction operands !", offset_write);


                fs_w.Seek((offset_write - img) + ip_wan_bytes.Length + 5, SeekOrigin.Begin);
                
                byte[] ip_lan_bytes = ASCIIEncoding.ASCII.GetBytes(ip_lan);

                for(int i = 0; i < ip_lan_bytes.Length; i++)
                {
                    fs_w.WriteByte(ip_lan_bytes[i]);
                }

                Console.WriteLine("WRITEN new ip [lan] bytes to offset 0x{0:X} at free space !", offset_write);

                //+1 because of "push" instruction code
                fs_w.Seek((sign_det1 - img) + 1, SeekOrigin.Begin);

                //4 bytes of offset

                //convert address to byte array (sizeof(int)) == 4
                byte[] bytes_push1 = BitConverter.GetBytes(offset_write);

                for (int i = 0; i < 4; i++)
                {
                    fs_w.WriteByte(bytes_push1[i]);
                }

                Console.WriteLine("first push  writen !");



                //+1 because of "push" instruction code
                fs_w.Seek((sign_det2 - img) + 1, SeekOrigin.Begin);

                //convert address to byte array (sizeof(int)) == 4
                byte[] bytes_push2 = BitConverter.GetBytes(offset_write + ip_lan_bytes.Length);
                for (int i = 0; i < 4; i++)
                {
                    fs_w.WriteByte(bytes_push2[i]);
                }

                Console.WriteLine("second push  writen !");

                bw.Close();
                fs_w.Close();

                comment();
                Console.WriteLine("Patching finished !");

                if (offset_write == 0)
                {
                    Console.WriteLine("Something went wrong (no free space at PE ?!");
                }

                Console.ReadKey();

            }
            catch (Exception ex)
            {
                Console.WriteLine("Something went terribly wrong, exception: {0}", ex.Message);
                Console.ReadKey();
            }
        }

        private static void comment()
        {
            Console.WriteLine("--------------------------------------------");
        }
    }
}
Chernobyl* is offline  
Thanks
10 Users
Old 02/28/2013, 12:04   #2
Chat Killer In Duty


 
PortalDark's Avatar
 
elite*gold: 5
Join Date: May 2008
Posts: 16,390
Received Thanks: 6,507
#approved
PortalDark is offline  
Old 03/01/2013, 19:20   #3
 
elite*gold: 20
Join Date: Feb 2013
Posts: 180
Received Thanks: 121
Quote:
Originally Posted by Chernobyl* View Post
So, I wrote this pretty small tool to make patching certification ip addresses in modules easy (since there are many servers being pervert and stuff). This should work on any server file modules out there (even those which are not released to public).

Screenshot:
Link:

Requires .NET 2.0
great tool !
MNX-Style is offline  
Old 03/01/2013, 22:16   #4
 
elite*gold: 0
Join Date: Sep 2010
Posts: 193
Received Thanks: 97
please please please NEED server medifire or any server free I no.t know how DAwnload please up server media fireeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeee
محمدفريد is offline  
Old 03/03/2013, 15:42   #5
 
elite*gold: 0
Join Date: Jul 2012
Posts: 105
Received Thanks: 21
thxx Bro
safwatoxy is offline  
Old 03/05/2013, 00:05   #6
 
elite*gold: 0
Join Date: Sep 2010
Posts: 193
Received Thanks: 97
Need HElp please
محمدفريد is offline  
Old 03/08/2013, 12:02   #7
 
elite*gold: 0
Join Date: Jan 2013
Posts: 3
Received Thanks: 0
guys i need emulator can u give me!! DL site! plss!
mcsux is offline  
Old 07/05/2013, 08:15   #8
 
elite*gold: 62
Join Date: Mar 2011
Posts: 602
Received Thanks: 2,955
First post updated, source for updated version given away. Maybe, someone will find it useful.
Chernobyl* is offline  
Old 07/06/2013, 08:46   #9
 
elite*gold: 0
Join Date: Feb 2008
Posts: 962
Received Thanks: 650
"The name 'ASCIIEncoding' does not exist in the current context"

What is the problem?


Edit: Fixed.
magicanoo is offline  
Reply

Tags
generic, patcher, spoof




All times are GMT +1. The time now is 21:23.


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.