Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C# Internal Classes

Name: Anonymous 2007-11-25 16:54

Hello, /prog/.

I have been creating plugins in C# for a custom Ultima Online client to do various cheaty things. However, with that custom client now blocked because of abusive plugins, I am looking into other ways to cheat at UO.

There is a UO assistant utilising packet injection by the name of Razor. It is closed source and the creator is very hush-hush about its inner workings. Thankfully, it is written in C#, and adding it as a reference opens up a few classes for my usage; however, the most important ones are revealed to me as 'internal' in .Net Reflector.

I have read that it is possible to get around the 'internal' keyword and access the methods and classes, but I have not found anything telling me how to do it.

So, /prog/, is there a way to access an internal class or method in C# from another program?

http://www.runuo.com/razor/ is where Razor is located.

Name: Anonymous 2007-11-25 16:56

Read SICP, I'm serious.

Name: Anonymous 2007-11-25 16:58

>>2
yarly

Name: Anonymous 2007-11-25 17:05

What can I learn from SICP in relation to this task?

Name: Anonymous 2007-11-25 17:08

>>4
abstract bullshite and how to program

Name: Anonymous 2007-11-25 17:11

I'm not interested in abstract bullshite, and I know how to program. I'm looking for how to wrap an internal C# class or method from a .dll into a program of my own.

Name: Anonymous 2007-11-25 17:23

System.Reflection

Also, read SICP.

Name: Anonymous 2007-11-25 17:43

>>1
Ultima Online
The 20th century called, etc.

Name: Anonymous 2007-11-25 17:46

>>8

Ahahah...I play on freeservers emulating the old style of PvP. I've tried all of the new games and I just can't let go of UO.

>>7

Is there a good guide to Reflection with an application such as this? I looked and found only very broad stuff that didn't seem to point me in the right direction.

Name: fairX the haxx0r 2007-11-25 17:52

>>1
payme enough for access to a private area of haxx ;)

Name: Anonymous 2007-11-25 18:00

>>9
Assembly.CreateInstance
Assembly.LoadFile

Name: Anonymous 2007-11-25 18:14

>>7,11
dotnet fag

Name: Anonymous 2007-11-25 19:39

OP here...

Got this:

        static void Main(string[] args)
        {
            //look at the registry to find the razor install path
            Microsoft.Win32.RegistryKey razorKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Razor");
            razorPath = (string)razorKey.GetValue("InstallDir");
            razorKey.Close();
            //handle the AssemblyResolve event
            System.AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
            //Call Razor's Main()
            CallRazorMain(args);
        }

Unfortunately, this provides a pre-defined exception in Razor as viewed through .Net Reflector:
            if ((ClientCommunication.InitializeLibrary(Version) == 0) || !System.IO.File.Exists(Path.Combine(BaseDirectory, "Updater.exe")))
            {
                throw new InvalidOperationException("This Razor installation is corrupted.");
            }

How can I get around this?

Name: Anonymous 2007-11-25 20:45

>>13
Go away.

Save yourself from the wrath of /prog/ and leave.

Name: Anonymous 2007-11-26 10:56

>>13
Load it into a disassembler like IDA Pro and patch out the bits of code you don't like. Hint: NOP is 0x00.

You might find this useful http://dotnet.di.unipi.it/EcmaSpec/PartitionIII/index.html

Name: Anonymous 2007-11-26 15:08

yah thats what I dont get. why cant you just replace 'internal' with 'public' MSIL

Name: Anonymous 2007-11-26 15:44

>>15
Incorrect, a NOP is 0x90.

Name: Anonymous 2007-11-26 15:59

>>17
A NOP in  x86 is 0x90. NOP in MSIL is 0x00.

Name: Anonymous 2007-11-26 16:29

Read SICP, you should do it!

Name: Anonymous 2007-11-26 16:35

A NOP in some architectures is just an alias.

Name: Anonymous 2007-11-26 17:01

>>16
You can (in the metadata).

Name: Anonymous 2007-11-26 20:56

NOP in MSIL is EVERYTHING

Name: Anonymous 2007-11-27 4:33

Microsoft.Win32.Registry.LocalMachine.OpenSubKey()
System.AppDomain.CurrentDomain.AssemblyResolve

Name: Anonymous 2007-11-27 9:17

Only wankers say "creating".

Name: Anonymous 2009-03-18 2:15

I wants lots and lots of some delectable pot!

Marijuana MUST be legalized.

Name: Anonymous 2011-02-04 17:31


Don't change these.
Name: Email:
Entire Thread Thread List