Giter VIP home page Giter VIP logo

osu-hope's Introduction

osu!HOPE

HoLLy's osu! Packet Editor

Summary

osu!HOPE allows you to view and edit all traffic going to and coming from osu!Bancho, excluding the very first login request (for security reasons). This allows you to do all sorts of cool things, such as:

  • Integrating osu!'s chat with external programs
  • Dynamically blocking chat messages
  • Creating chat macro's, where you can automatically replace parts of outgoing messages with other text
  • Showing a notification ingame for important events
  • Logging the user's Bancho status (eg. Idle, Playing x, Multiplaying, ...) to a file for use in stream overlays
  • Debugging custom/private servers by being able to look at any packet going through bancho
  • and so much more...

Warning

While osu!HOPE in itself does not break any rules, it allows the user to create plugins that do. For this reason, peppy may or may not ban the use of this program, so I would not recommend using it on the official osu! servers.

Dependencies:

osu-hope's People

Contributors

dependabot[bot] avatar holly-hacker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

osu-hope's Issues

Improve plugin interface

I'd want to add a second interface for plugins to implement, and the current plugin interface renamed. The interfaces should look like this:

  1. IHopePluginMeta
    • void GetPluginMetadata(), like the previous version.
    • int GetHopeVersion(), returns the version of the osu!HOPE "api". This is to prevent breaking changes in the future to silently fail. For this to work, this interface should not be changed.
  2. IHopeModule
    • void Load(), like the previous version.
    • void OnStart()
    • void OnStop()
    • void Unload(), to allow disposing of objects and threads. A bit of a design flaw in the current version.
    • void OnBanchoRequest(ref List<BanchoPacket>), like the previous version.
    • void OnBanchoResponse(ref List<BanchoPacket>), like the previous version.

This should get tweaked some more before implementing.

Allow toggling of plugins

Plugins should be toggleable, especially since it comes with 4 examples plugins you most likely don't want to be enabled.

Injecting custom packages returns System.NullReferenceException

After fiddling around with the plugin interface I got to the following code:

using System.Collections.Generic;
using HOPEless.Bancho;
using HOPEless.Bancho.Objects;
using osu_HOPE.Plugin;

namespace Hope.Plugin.UserStatusRequest
{
    public class UserStatusRequestPlugin : IHopePlugin
    {
        public PluginMetadata GetMetadata()
        {
            return new PluginMetadata
            {
                Name = "UserStatusRequest",
                Author = "Node",
                ShortDescription = "requests user info without manually opening the users list",
                Version = "1.0"
            };
        }

        public void Load() { }

        public void OnBanchoRequest(ref List<BanchoPacket> plist) { }

        public void OnBanchoResponse(ref List<BanchoPacket> plist) {
            var requestedUsers = new BanchoIntList();
            requestedUsers.Value.Add(754565); // hard-coded value for testing
            plist.Add(
                new BanchoPacket(PacketType.ClientUserStatsRequest, requestedUsers)
            );
        }
    }
}

I used custom channel injection from Example2 as reference, however when trying to run it I get the following error:

Exception occured in plugin UserStatusRequest OnBanchoRequest: System.NullReferenceException: Object reference not set to an instance of an object.
   on Hope.Plugin.UserStatusRequest.UserStatusRequestPlugin.OnBanchoResponse(List`1& plist)
   on osu_HOPE.Program.<OnResponse>d__4.MoveNext() in C:\Users\Node\Documents\osu-HOPE\osu!HOPE\Program.cs:Line 124.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.