I want to share a open-source project I made a year ago. This is my last C# project for VSRO. (I no longer use C#, da*n Microsoft)
Github:
- Please don't forget the give a Star if you like,
- Please don't forget the made a Fork if you wanna support this project.
Don't repeat yourself every time!
Ultra simple Silkroad Proxy Library Ever!
What It Is
EasySSA library for VSRO files is an easy and advanced way to create proxy programs.
EasySSA vs Security API
Uses : .NET Framework v4.6.1 Library
Controls and wizards are available for users to:
- Detect, block, replace, ignore features to incoming-outgoing packets
- Analyze server-side or client-side packets with details more details
- Replace, Inject, Response and Ingore incoming-outgoing packets and accept/deny or disconnect client with one line code only. for example.
- Advanced packet database library.
- is overridden! The new is overriding now.
- Not complex, not hard, dont repeat yourself.
How To Use
Example Usage
Create Server-Side Proxy
Code:
SROServiceComponent gateway = new SROServiceComponent(ServerServiceType, Index);
Code:
SROServiceComponent gateway = new SROServiceComponent(ServerServiceType.GATEWAY, 1) .SetFingerprint(new Fingerprint("SR_Client", 0, SecurityFlags.Handshake & SecurityFlags.Blowfish & SecurityFlags.SecurityBytes, "")) .SetLocalEndPoint(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 15779)) .SetLocalBindTimeout(10) .SetServiceEndPoint(new IPEndPoint(IPAddress.Parse("111.111.111.111"), 15779)) .SetServiceBindTimeout(100) .SetMaxClientCount(500) .SetDebugMode(false); gateway.OnLocalSocketStatusChanged += new Action<SocketError>(delegate (SocketError error) { if (error == SocketError.Success) { Console.WriteLine("LOCAL socket bind SUCCESS! : " + gateway.LocalEndPoint.ToString()); } else { Console.WriteLine("LOCAL socket bind FAILED! : " + error); } }); gateway.OnServiceSocketStatusChanged += new Action<Client, SocketError>(delegate (Client client, SocketError error) { if (error == SocketError.Success) { Console.WriteLine("SERVICE socket connect SUCCESS! : " + gateway.ServiceEndPoint.ToString()); } else { Console.WriteLine("SERVICE socket connect FAILED! : " + error); } }); gateway.OnClientConnected += new Func<Client, bool>(delegate (Client client) { Console.WriteLine("New client connected : " + client.Socket.RemoteEndPoint); if (string.IsNullOrEmpty(client.IPAddress)) { //Example return false; //Decline client } else { return true; //Accept client } }); gateway.OnClientDisconnected += new Action<Client, ClientDisconnectType>(delegate (Client client, ClientDisconnectType disconnectType) { Console.WriteLine("Client disconnected : " + client.IPAddress + " -- Reason : " + disconnectType); }); gateway.OnPacketReceived += new Func<Client, SROPacket, PacketSocketType, PacketResult>(delegate (Client client, SROPacket packet, PacketSocketType socketType) { switch (packet.Opcode) { case 0x1111: return new PacketResult(PacketOperationType.DISCONNECT, new PacketResult.PacketDisconnectResultInfo("DC Reason : 0x5555 received")); case 0x2222: return new PacketResult(PacketOperationType.IGNORE); case 0x3333: return new PacketResult(PacketOperationType.INJECT, new PacketResult.PacketInjectResultInfo(packet, new List<Packet> { new Packet(0x3334), new Packet(0x3335) }, true)); case 0x4444: return new PacketResult(PacketOperationType.REPLACE, new PacketResult.PacketReplaceResultInfo(packet, new List<Packet> { new Packet(0x4445) })); case 0x5555: return new PacketResult(PacketOperationType.RESPONSE, new PacketResult.PacketResponseResultInfo(new Packet(0x5556))); default: return new PacketResult(PacketOperationType.NOTHING); } }); gateway.DOBind(delegate (bool success, BindErrorType error) { if (success) { Console.WriteLine("EasySSA bind SUCCESS"); } else { Console.WriteLine("EasySSA bind FAILED -- Reason : " + error); } });
Code:
SROClientComponent clientComponent = new SROClientComponent(1) .SetFingerprint(new Fingerprint("SR_Client", 0, SecurityFlags.Handshake & SecurityFlags.Blowfish & SecurityFlags.SecurityBytes, string.Empty)) .SetAccount(new Account("furkan", "1"), "Dentrax") .SetCaptcha(string.Empty) .SetVersionID(191) .SetLocaleID(22) .SetClientless(false) .SetClientPath("D:\\vSRO\\vSRO Client") .SetLocalAgentEndPoint(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 25880)) .SetLocalGatewayEndPoint(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 25779)) .SetServiceEndPoint(new IPEndPoint(IPAddress.Parse("111.111.111.111"), 15779)) .SetBindTimeout(100) .SetDebugMode(false); clientComponent.OnClientStatusChanged += new Action<SROClient, ClientStatusType>(delegate (SROClient client, ClientStatusType status) { }); clientComponent.OnAccountStatusChanged += new Action<SROClient, AccountStatusType>(delegate (SROClient client, AccountStatusType status) { }); clientComponent.OnCaptchaStatusChanged += new Action<SROClient, CaptchaStatusType>(delegate (SROClient client, CaptchaStatusType status) { }); clientComponent.OnCharacterStatusChanged += new Action<SROClient, CharacterStatusType>(delegate (SROClient client, CharacterStatusType status) { }); clientComponent.OnLocalSocketStatusChanged += new Action<SocketError>(delegate (SocketError error) { if (error == SocketError.Success) { Console.WriteLine("LOCAL socket bind SUCCESS! : " + clientComponent.LocalGatewayEndPoint.ToString()); } else { Console.WriteLine("LOCAL socket bind FAILED! : " + error); } }); clientComponent.OnServiceSocketStatusChanged += new Action<SROClient, SocketError>(delegate (SROClient client, SocketError error) { if (error == SocketError.Success) { Console.WriteLine("SERVICE socket connect SUCCESS! : " + clientComponent.ServiceEndPoint.ToString()); } else { Console.WriteLine("SERVICE socket connect FAILED! : " + error); } }); clientComponent.OnSocketConnected += new Action<SROClient, bool>(delegate (SROClient client, bool connected) { Console.WriteLine("New client connected : " + client.Socket.RemoteEndPoint); }); clientComponent.OnSocketDisconnected += new Action<SROClient, ClientDisconnectType>(delegate (SROClient client, ClientDisconnectType disconnectType) { Console.WriteLine("Client disconnected : " + client.IPAddress + " -- Reason : " + disconnectType); }); clientComponent.OnPacketReceived += new Func<SROClient, SROPacket, PacketSocketType, PacketResult>(delegate (SROClient client, SROPacket packet, PacketSocketType socketType) { return new PacketResult(PacketOperationType.NOTHING); }); clientComponent.DOBind(delegate (bool success, BindErrorType error) { if (success) { Console.WriteLine("EasySSA bind SUCCESS"); } else { Console.WriteLine("EasySSA bind FAILED -- Reason : " + error); } });
Copyright & Licensing
All program code (i.e. C#, Java) is licensed under MIT unless otherwise specified. Please see the file for more information.
SilkroadSecurityApi
It was developed and made by Drew 'pushedx' Benton. For more information, please
Important Notes
- If you think there is a copyright infringement, please contact me to fix that.
- If you think that project have performance-issue or security-issue, just ignore that. The project is purely for educational and learning purposes.
- If I used code structure from a source I didn't reference, please contact me.
- I am no longer develop this project. If you find a bug or an error, feel free to make pull-requests.
Best wishes to everyone,
~Dentrax