Introduction
You are having enough of crackers, reverse engineers? With LiteCode you can host your code remotely at a server where no cracker can touch it. Your source code will become even more private than ever with more protection and no source code obfuscation required.
Features
- Using the SSP protocol for having a scalable server and having the traffic Encrypted/Compressed http://ssp.codeplex.com/
- Host your code where no cracker can ever touch it to get your software cracked
- You don't need a lot of knowledge about networking how to send packets and such that is all being done in the background
- Shared Classes is a new technique to remotely call methods in the client or server to make it easy for the end-user to understand what is going on in the code
- Shared classes
- System classes (under construction); currently there is
Graphics
, Cursor
- Delegates (callback methods), example is shown below
- Supports properties, overloaded methods
- Call methods over the UDP protocol using the attribute
UdpMethod
- The
NoWait
attribute will not wait till the other side completed the method and does not wait till the packet is being sent - The
PacketQueue
attribute will use the PacketQueue
from SSP, could increase performance
What happens in the background
A dummy class is being created in the background used to inject code but that's not important. Code is being injected in the dummy class so that you're able to call method's at the server/client side. The code from the server/client side will never leave or is sent to the server/client side. The most important part here is that the server contains all the sensitive information and the client does not. The injected code in the dummy class will only say to the server/client, call this method for me and if you can return the result. This way both sides can never inject each other with possible malicious code.
If people are interested in the code injection here you go:
internal class DynamicClassCreator
{
static object Locky = new object();
internal static SortedList<string, Type>
Using the code
Server sided:
namespace Server
{
class Program
{
static void Main(string[] args)
{
LiteServer server = new LiteServer(1234, "0.0.0.0",
NetworkProtocol.TCP | NetworkProtocol.UDP);
server.onClientConnect += (Client client) =>
{
ITest test = client.GetSharedClass<ITest>("test");
test.TestDelegate(":O", new TestDel((string val) =>
{
Console.WriteLine("Message from client: " + val);
}));
};
Console.WriteLine("Providing remote code at port 1234");
Process.GetCurrentProcess().WaitForExit();
}
}
}
Client side:
namespace Client
{
class Program
{
static void Main(string[] args)
{
LiteClient client = new LiteClient("127.0.0.1", 1234,
SecureSocketProtocol.NetworkProtocol.TCP |
SecureSocketProtocol.NetworkProtocol.UDP, null, null,
(LiteClient c) =>
{
c.ShareClass("test", typeof(Dummy_Testy));
}, (LiteClient c) =>
{
Process.GetCurrentProcess().WaitForExit();
});
}
}
public class Dummy_Testy : ITest
{
[RemoteExecution]
public string TestMe()
{
return "This is a message from the client";
}
[RemoteExecution]
public void TestDelegate(string SomeValue,
[UdpMethod] [UncheckedRemoteExecution] TestDel CallMe)
{
while(true)
CallMe("some string from Client Side :)");
}
}
}
public delegate void TestDel(string ar);
public interface ITest
{
string TestMe();
void TestDelegate(string test, TestDel CallMe);
}
This is just a very basic server/client as you can see when the client is connected to the server. The server is now able to call two methods, TestMe
and TestDelegate
. You can see when the server calls TestMe();
it will return "This is a message from the client". And if the server calls TestDelegate
and gives a delegate with it the client will be able to call. The method the server gave in that example will just keep calling the delegate in a while(true)
.
Points of interest
The interest I had to code this library was to make networking super easy for anyone for new and advanced users. Even myself if I had to make a program used in networking I would use my LiteCode library. Just because it's too easy to setup a secure connection and calling methods and communicating synchronized with the client/server. I also was becoming lazy of using the... SendPacket(...)
and after that Receive(...)
for an answer. What if the program was doing like 10 things at the same time, you might receive a different packet than you expected? In LiteCode it's so easy you just call the method and give it a delegate so it can return whatever value.
Links