How to stop your plugin working on cracked servers!

Discussion in 'Resources' started by Hoolean, Oct 16, 2012.

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

    JOPHESTUS

    If I'm not mistaken, the op's code works like this:
    Check if server is offline mode​
    Yes No​
    / \ ​
    Disable plugin Leave enabled ​
    Your way checks if a player is cracked, not the server.​
     
    jtjj222, 1mpre55 and Icyene like this.
  2. Offline

    Scizzr

    I was referring to this post. sorry if I confused you.

    Edit: Also, I don't really think the term "cracked" applies to servers. It's simply a configuration option that allows the server to accept clients that aren't authenticated through Minecraft's server. That's not really a crack. If someone modded the source themselves and added this (if it weren't in the server to begin with), that'd be more applicable.
     
  3. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    Important things to note about this stuff:

    1) If your plugin is popular enough, people will break it. Not worth wasting time disabling it like that.

    2) Instantly ruins server admins wanting to quickly test out features on a locally run server with fake accounts.

    3) haspaid.jsp has failed in the past, I wouldn't advise testing that sort of thing.
     
  4. Offline

    kroltan

    I must admit I was a pirate for 2 years, then I bought it, and more recently, MCPE too. And most of my pirate friends also bought the game after a while.
     
  5. Offline

    Hoolean

     
  6. Offline

    Infamous Jeezy

    Couldn't one just use this if statement in the onEnable part of the plugin?
    Code:java
    1.  
    2. if(Bukkit.getServer().getOnlineMode()==true)
    3.  

    If it returns false, just disable the plugin?
    Although this wouldn't be the best way to stop pirated clients, and some legitimate servers do use offline-mode.

    Also JOPHESTUS,
    That's true, but the pirated players usually wouldn't know that and may just stop trying to connect.
    Otherwise, this could be quite difficult to do, if even possible.
     
  7. Offline

    Hoolean

    LOL did you see the original post :D

    Infamous Jeezy
    Code:java
    1.  
    2. if(Bukkit.getServer().getOnlineMode()==true)
    3.  


    Also, Two things:
    1. (replacing [] with <>) You can do <syntax=java>, you don't need to do <syntax="java">
    2. if(Bukkit.getServer().getOnlinemode()) will work, you don't need the '==true'
    :D Sorry for being a perfectionist :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
  8. Offline

    Infamous Jeezy

    MrBluebear3
    Shame on me for not reading the whole thread thoroughly. :p
    Thanks for the advice for tagging java code!
    I had an idea you could just do that, but I do ==true just as to be safe although it's
    completely unnecessary. I don't believe it could cause potential problems, I could be wrong.
     
    MrBluebear3 likes this.
  9. Offline

    kroltan

    MrBluebear3
    The only one that didn't buy it yet is because he doesn't have a credit card and his dad is not helpful in that way.

    On topic: The ultimate protection I can think of is making your plugin require the person to type the minecraft.net credentials, then check if that person has paid. This would stop hacked clients from using someone else's account. However, that would probably require a dependency since multiple plugins could stack up this step and require thousands of logins.
     
  10. Offline

    Hoolean

    Do you mean typing their password? That would be incredibly insecure and would require a lot of modification to the plugin. :(

    Sadly, pirates will still be out whatever we do :(
     
  11. Offline

    Icyene

    It causes the worst problem of all. Unreadability. And unreadability counts if you're not the only one maintaining a project's code. Its a short step from if a == true to Yoda-style ifs.
     
    jtjj222 likes this.
  12. Offline

    Muffin89

    If offline server, only OP can use the plugin. So the plugin will load, but only users with OP can test with it.
    There for you can block ppl from running the plugins on offline servers if they arent OP. And most offline servers does not allow everybody to be op.

    So the plugin notice "AHh its a offline server", then it loads fhe plugin but its only usable by operator. If online server, then it is like "AHh do what its supposed to do"

    But then again, like mentioned ppl will break down the plugin and fix it. Also i started out as a pirate once, but i bought the game twice :)

    Also offline servers is just silly, but that above is just an idea how it could be blocked and still being used in development on offline servers with fake accounts.
     
    MrBluebear3 and kroltan like this.
  13. Offline

    MyPictures

    Agree on that: I don't see why a developer of a normal plugin (such as Essentials, Vault, LWC, ...) would add this to his/her code. It wont keep away the noobs anyways because if you add that code to your plugin then they will come with questions like: "Why does your plugin disable itself on my server?" Or anything like that.

    As plugin developer I wouldn't care much if my plugin will be used in online or offline mode, it should just work, be useful, stable and popular.
     
    blackwolf12333 and 1mpre55 like this.
  14. Offline

    Gravity

    It's relatively trivial to gain op on an some offline servers. It still creates security hazards.
     
  15. Offline

    Orcem12

    This is far from correct. The plugin will not and cannot load if it shuts itself down. When a plugin is forcibly shutdown using the method to simply detect the Boolean value in the server.properties file the plugin cannot possibly be used unless a direct modification to the code.

    Being operator defines nothing besides you having the basic command architecture and/or plugin permissions/commands. Being operator, then using the a command for the disabled plugin, on the offline server will not work. It would either return null or just give you the standard response for "Unknown Command".
     
  16. Offline

    Gravity

    He's talking about implementing a new mode into the plugin where it doesn't disable itself, it just restricts it's own use.
     
  17. Offline

    Muffin89

    The idea of this thread was to block ppl that runs offline servers to use plugins. This would only be for plugin developers who wants to add this into their plugin of course, nothing that would be added to bukkit it self.

    My idea to do this in a fashion was to enable them to use the plugin but only as a operator. But if online mode the plugin would work like normal.

    That would just mean that on offline servers for developers where they test the plugin with different accounts, would still enable them to test it out with fake accounts as long as they are op on thoose accounts.

    So the plugin would still load but only enable op's to use it.

    But if online then it would just run like it normally do.

    So this code would only check, ahh the server is offline, run so only op can use features
    If its online it would work like normal.


    Example:
    If i would run a offline server with this plugin that has this code inside. Then i would be able to load the plugin as normal but the plugin would notice, that it is a offline server and there for go into defensive stance. Then only the features of the plugin would work as a Operator on the server but for the rest of the members it would not work cause they aren op.


    If i ran a online server, then the plugin would work as it normaly does without forcing players to be op to use it.

    Its just a suggestion how to block offline servers to use a plugin you develop.

    ---


    Correct!
     
  18. Offline

    Orcem12

    Popularity off a stolen game does not fit my personal ethics code and it might not for them either.

    Again, this idea being possible, it supports the use of Offline servers. Which we go against completely. The idea of the code snippet is to reduce the amount of Offline or Cracked servers, not give them a loophole.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 29, 2016
  19. Offline

    Muffin89

    Thats partly true, but you dont really support them cause you force them all to be operator to use it. There for it would just mean that they cant use the plugin as it was thought to be used.

    There for it kinda ruins their fun using the plugin and there for they would not use it cause they cant let normal users use the plugin cause of its restriction.

    So you dont BLOCK it but you disable them to use it as it was ment to.

    When user that is not op tries to use it, it could say

    "%Plugin% does not support offline servers, this server is being run as a offline server"

    Then it would also give them why it doesnt work in their face :)
     
  20. Offline

    Orcem12

    This is still allowing the use of offline servers. Operators mean nothing among the lines of non-pirate. If anything, they are the ones that should be targeted for using the offline server option. I don't think you quite understand, we want to ruin their fun. That is the entire point, haha.
     
  21. Offline

    Muffin89

    With what i wrote you ruin them from using it on a server where not everybody is a operator. That for me is a nonusable plugin, cause i would never allow everybody to be a operator on my server.

    But then again, yes it does not shutdown the plugin but it enables developers to test things out.

    I think this is as close you can get it to work for both devs and blocking normal offline servers.

    The only servers that do run offline and ppl play on where everybody is op is either a "LAN" server or a "Test server" or a "Friend server". But public offline servers would not use a plugin where everybody is forced to be op to use it.

    But if you disslike the idea, then go block the whole thing so the server doesnt load it. But then other devs who does not own multiplie accounts for testing will have a issue.
     
  22. Offline

    MyPictures

    No its not like adding support for offline mode to your plugins, its more like "don't care about that". They can use it with whatever mod/config they want to. Its not my job to prevent piracy, if Notch adds the possibility to skip the minecraft.net authentication without even modding the game then its his issue and only he can fix/prevent this (well its actually @jeb_ now but you know what I mean...).
     
    jtjj222, 1mpre55 and kroltan like this.
  23. Offline

    Orcem12

    All I said is that I don't agree with piracy. Especially for a game that isn't even that expensive. If Notch doesn't either that's not my problem. If Jeb doesn't either, it's not my problem. My problem goes by my own code and that is to purchase the game and support the developers who pour their time and effort into the creation of their mod.
     
  24. Offline

    MyPictures

    Its your plugin and you can do with it whatever you want, I meant it more like for all the big plugins that are around here.

    The biggest problem here is that this restriction is a collective punishment, not everyone is using offline mode for "bad" things. Its also very nice to test permissions and other plugins.

    Its not like online-mode=false = 100% cracked/illegal/bad/worst/buyTheGameNoob user.
     
    1mpre55 and kroltan like this.
  25. This forum topic, for some reason, did not let me stop reading :p
    1. Offline mode does not, in any means, make the server cracked... However, I think, cracked servers have to be run in Offline mode
    2. Although I don't believe in the piracy of Minecraft, I don't deem it worth your time and effort to try to block it because someone is always going to be able to get around it somehow.
    3. If you definitely want to build in this type of feature, I would recommend you checking if the server is in Offline mode than restricting the plugin to ops. Even though there are security issues, I feel this is the best way to go about doing this.
     
    MyPictures likes this.
  26. Offline

    turt2live

    I don't give support to users who use my plugins on offline servers (I make this fairly well known too).

    I don't just disable my plugin if the server is in offline mode though, I just spam the console on enable with something like this:

    Code:
    if(!getServer().getOnlineMode()){
        if(!getConfig().getBoolean("other.quiet-offline-mode-warning")){
            getLogger().severe("**********************");
            getLogger().severe("Your server is in Offline Mode. AntiShare does not support offline mode servers.");
            getLogger().severe("AntiShare will still run, but you will not get help from turt2live!!");
            getLogger().severe("You can turn this message off in the configuration.");
            getLogger().severe("**********************");
        }
    }
    Simple.
     
  27. I didn't read the whole thread, but I have to add something to it:
    you should NOT, NEVER block offline servers.
    Why?
    1) Mojang itself doesn't care about piracy. The opposite is the case: You don't need to crack the server, just use a setting. They added this setting for a reason, don't you think? Also you don't need to crack the client. In the past you had to, but Mojang realized that it was stupid, so you can use any name you want in offline mode now. Again: They did this for a reason!
    2) Thinking every pirated game = money lost is not true. A lot of pirates wouldn't play the game at all if they hadn't pirated it, hence it would give the company no money no matter if it was pirated or not. A lot of pirates I personally know even do this cause they are poor and simply don't have the money to buy every game. None the less if they really like a game they buy it afterwards with the little money they have. If they couldn't pirate in the first place they would have never bought that games, so not pirating is loss of money for the company. Ofc. nobody has exact numbers but I guess the real numbers from money loss cause of piracy and money win cause of piracy are pretty equal. Again: Mojang seems to know that, so they support piracy.

    So stop stealing mojangs money, support piracy in your plugins!

    //EDIT: Also, even if you disagree with what I wrote: Who are you to have the right to take the decision of Mojang to support piracy away?
     
  28. Offline

    matejdro

    I bought the game because there was a pirated version available, so I could test it first. I really liked it, so then I bought full game. If there was no pirated version, I would never bought it. And I am sure there are many people like this.

    Also offline mode does not necessarily means pirated version. For example private servers can turn off that and play even when mojang servers are down (which was quite often lately). Offline mode is also invaluable when testing plugins - I can login with multiple accounts to test multiplayer stuff.
     
  29. Offline

    jtjj222

    After reading this thread, I thoroughly disagree with the concept of disabling your plugin on offline mode servers. I find it incredibly restrictive:
    • Users/devs would need to buy multiple accounts to test their plugins
    • If someone doesn't have and internet connection (or gets charged per mb), or mojang's auth servers go down, your plugin will stop working, even if they do have an account. Not only is their life made difficult by the fact that the bukkit forums don't support offline mode, even for legitimate purposes, and the fact that unless they wrote their own starter script, the ones provided by the wiki will reset their server to online mode (the -o option), you went through the extra trouble to make sure that your plugin would stop working when this mode (that mojang added for a reason) is activated.
    • If your plugin provides vital services such as economy or protection, you could be abusing the trust server administrators put in you by including a sneaky feature like this
    • If your plugin provides any sort of api for other plugins to use, you could create some serious bugs
    • And lastly, it is none of your business what I do with my server. You are plugin developers, not the piracy police.
     
    blackwolf12333 and V10lator like this.
  30. Offline

    Gravity

    V10lator
    First off, everything you said is true. Not arguing about that.

    The problem with offline mode is that if you're using it, you're typically doing something wrong or stupid.
    The amount of times people have come to me with issues about their server demanding that they be fixed without telling me it's in offline mode, only 2 hours later for me to realize that's the cause of the problem, is a very large number. I'm sure the rest of the staff can attest to that as well.

    The unintended consequences that the setting inflicts on your server as well as the false sense of security that plugins like xAuth or AuthMe give you when running in offline mode are very scary things to do to yourself and your players. It's something that shouldn't be considered lightly, but unfortunately every 12 year old who doesn't have a credit card does so because they can. That's where the issues come from.
     
Thread Status:
Not open for further replies.

Share This Page