Server interact with client

Discussion in 'Plugin Development' started by MCCoding, Apr 18, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    MCCoding

    I'm wanting to know on how I could make a plugin interact with a client or a specific file in the client so I can check on specific client mods they are using. I know that this would require a few files added to the client, but I'm just wanting to know if in any way this is possible. Pretty much what I'm looking for is a plugin to scan over the client and look for any added files or mods that don't match with the vanilla a minecraft, or don't match any mods I have allowed like opti-fine etc, any information on this is really appreciated because at this point I'm not sure on where I should start
     
  2. Offline

    codermason

    impossible to gain any data like you've said without any third party mods. there's no access to this from server-side plugins
     
  3. Offline

    MCCoding

    codermason
    I know that, it would require players to download a custom jar. Which I don't mind as I'm aiming for it to be some sort of anti hack system so that after a certain amount of time the server would require them to download this jar to be able to play which then would have the added files to scan their .jar to make sure they don't have any added files that could be mods used to hack etc
     
  4. Offline

    ZeusAllMighty11

    This can't be done without a modified craftbukkit server and/or custom client mods.
     
  5. Offline

    MCCoding

    ZeusAllMighty11
    Yea this would require a client mod, but is it possible for the client mod to gather information with what other mods the client is using and feed it to the plugin or to a database over to the plugin ?
     
  6. Offline

    ZeusAllMighty11

    MCCoding

    You would have to hook into the other mods, with permission from their authors.
     
  7. Offline

    MCCoding

    Hmm, would I be able get all the existing vanilla files and then check to see if any files have been added/removed? Or something more simple, not to sure if adding mods to minecraft still works this way is check if the Meta-Inf file still exists as I do remember for mods to work you would have to remove that file.
     
  8. Offline

    Plo124

    MCCoding
    I would use the Plugin Message API and query the player for the data, and the player will respond within 5 seconds, if it doesnt respond within 5 seconds kick them and ask them to download the custom jar. If they get a response, plugin message all the class files that should be in minecraft.jar and then reply if it succeeds. if the success plugin message isnt recieved, also kick them.
     
  9. Offline

    ZeusAllMighty11

    Plo124
    MCCoding

    There is no way to detect the files a client is running.
     
  10. Offline

    Plo124

  11. Offline

    Not2EXceL

    So what if I write a simple bytecode injector? It completely bypasses that theory seeing as you're not checking the classes in the current classloader. Not to mention could hardcode a response too.
     
    AoH_Ruthless likes this.
  12. Offline

    RawCode

    1. write forge based mod
    2. sent to client specific packet
    3. if client not responded - kick him with message about "you must have evil spyware mod in order to play on this server"
    4. packet may contain any data, i will suggest to sent classfiles and execute them on client's side, this will make reversing your protection a bit longer.

    5. on server side this can be done by plugin (not mod) since bukkit already have inbuild custompayload packet.
     
  13. Offline

    MCCoding

    Not2EXceL
    What would this bytecode injector do exactly?

    Plo124
    I will look into the plugin message API
     
  14. Offline

    Not2EXceL

    I was stating if someone released a mod or a modded jar file to check that its the vanilla jar, all someone would have to do is bytecode inject their classes on runtime, and boom bypassed. It's not that difficult and there's a world you can do with bytecode manipulation.
     
  15. Offline

    Plo124

    Not2EXceL
    Ahh I see, your saying people will manipulate the packet to say the minecraft.jar is legit.
     
  16. Offline

    MCCoding

    Not2EXceL Plo124
    Ah I see, that is very true. What I'm best to do it add in a few ways to check for hacks. I have a few ways to stop auto-clickers and force field, but how would I go about fly hacks? my plugin changes players velocitys but I don't want it to kick them while I have set their velocity and make it mistake them as flying, what would be the best way to approach this?
     
  17. Offline

    ZeusAllMighty11

    Why don't you check how NoCheatPlus does it?
     
  18. Offline

    Plo124

    MCCoding
    If there is a NoCheat API, you might be able to disable kicking of the player for flying for a few seconds after you set their velocity.
     
Thread Status:
Not open for further replies.

Share This Page